This is an archive of the discontinued LLVM Phabricator instance.

PMB: Run the whole-program-devirt pass during LTO at --lto-O0.
ClosedPublic

Authored by pcc on May 25 2017, 3:19 PM.

Details

Summary

The whole-program-devirt pass needs to run at -O0 because only it
knows about the llvm.type.checked.load intrinsic: it needs to both
lower the intrinsic itself and handle it in the summary.

Event Timeline

pcc created this revision.May 25 2017, 3:19 PM
tejohnson edited edge metadata.May 25 2017, 4:40 PM

Looks like the new pass manager needs a similar fix. Test?

pcc added a comment.May 25 2017, 4:43 PM

Looks like the new pass manager needs a similar fix.

None of the CFI/whole-program-devirt stuff seems like it will work with the new PM because it isn't threading the pointer to the summary index through to the passes :(

Test?

I guess we could add an "end to end" test for this with llvm-lto2.

pcc updated this revision to Diff 100343.May 25 2017, 5:19 PM

add test case

This revision was automatically updated to reflect the committed changes.