This is an archive of the discontinued LLVM Phabricator instance.

[RS4GC] Strengthen coverage: add more tests
ClosedPublic

Authored by anna on Oct 6 2016, 12:25 PM.

Details

Summary

Add tests for cases where we have zero coverage in RS4GC.

Diff Detail

Repository
rL LLVM

Event Timeline

anna updated this revision to Diff 73833.Oct 6 2016, 12:25 PM
anna retitled this revision from to [RS4GC] Strengthen coverage: add more tests.
anna updated this object.
anna added reviewers: sanjoy, reames.
anna added a subscriber: llvm-commits.
sanjoy accepted this revision.Oct 6 2016, 1:31 PM
sanjoy edited edge metadata.

Thanks Anna, this is great!

Can you check if it makes sense to put statepoint-attrs.ll into some pre-existing file? If not a separate file is fine.

This revision is now accepted and ready to land.Oct 6 2016, 1:31 PM
anna added a comment.Oct 7 2016, 5:29 AM

Thanks Anna, this is great!

Can you check if it makes sense to put statepoint-attrs.ll into some pre-existing file? If not a separate file is fine.

Hi Sanjoy,

Yes, all other test files were for some specific test scenarios.

More importantly the statepoint-attrs.ll is a somewhat flaky test, and can have unintended consequences with multiple tests/function declarations in a file. The attributes list (attribute #1) can be modified to another attribute list during opt, if we were to have more tests, or function declarations. Example:
After opt:

call token (i64, i32, void (i8 addrspace(1)*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp1i8f(i64 2882400000, i32 0, void (i8 addrspace(1)*)* @f, i32 1, i32 0, i8 addrspace(1)* %arg, i32 0, i32 0, i8 addrspace(1)* %arg) #2

attributes #1 = {.. some new attributes added to some func declaration..}
attributes #2 = { norecurse noimplicitfloat }
...

The CHECK would fail (since `CHECK` is for the specific `attribute #1`). I'm not sure if there is any way to get around this, i.e. force attribute list to remain the same.
This revision was automatically updated to reflect the committed changes.