This is an archive of the discontinued LLVM Phabricator instance.

Print remarks from WholeProgramDevirt pass for each call site.
ClosedPublic

Authored by krasin on Jul 11 2016, 6:33 PM.

Details

Summary

It's useful to have some visibility about which call sites are devirtualized,
especially for debug purposes. Another use case is a regression test on the
application side (like, Chromium).

Diff Detail

Event Timeline

krasin updated this revision to Diff 63618.Jul 11 2016, 6:33 PM
krasin retitled this revision from to Print remarks from WholeProgramDevirt pass for each call site..
krasin updated this object.
krasin added a reviewer: pcc.
pcc edited edge metadata.Jul 11 2016, 6:40 PM

Please add a negative test. You can piggyback on one of the many negative tests in the test/Transforms/WholeProgramDevirt directory.

lib/Transforms/IPO/WholeProgramDevirt.cpp
403

There should also be a remark emitted in this case.

test/Transforms/WholeProgramDevirt/virtual-const-prop-check.ll
6

These lines won't be matched against unless you prefix them with CHECK:.

krasin updated this revision to Diff 63629.Jul 11 2016, 7:00 PM
krasin edited edge metadata.

Add negative test; fix positive test (add CHECK:)

pcc added inline comments.Jul 11 2016, 7:02 PM
lib/Transforms/IPO/WholeProgramDevirt.cpp
403

Please address this and add a test for this case.

test/Transforms/WholeProgramDevirt/non-constant-vtable.ll
1

I think you need -pass-remarks=wholeprogramdevirt here.

krasin updated this revision to Diff 63633.Jul 11 2016, 7:27 PM
krasin marked an inline comment as done.

Fix negative test; add remarks for single use case.

krasin marked 3 inline comments as done.Jul 11 2016, 7:28 PM

Thank you for all the catches. Hopefully, all the comments are now addressed. Please, take another look.

pcc accepted this revision.Jul 11 2016, 7:38 PM
pcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 11 2016, 7:38 PM
krasin closed this revision.Jul 11 2016, 7:45 PM