This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Don't run before pass instrumentation on required passes
ClosedPublic

Authored by aeubanks on Oct 31 2020, 11:11 PM.

Details

Summary

This allows those instrumentation to log when they decide to skip a
pass. This provides extra helpful info for optnone functions and also
will help with opt-bisect.

Have OptNoneInstrumentation print when it skips due to seeing optnone.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 31 2020, 11:11 PM
aeubanks requested review of this revision.Oct 31 2020, 11:11 PM
cuviper added a subscriber: cuviper.Nov 2 2020, 1:26 PM
asbirlea accepted this revision.Nov 3 2020, 6:25 PM
asbirlea added inline comments.
llvm/include/llvm/IR/PassInstrumentation.h
194

Could you add a doxygen comment that the BeforePassCallbacks are only called if the pass is not required around the declaration of BeforePassCallbacks?
Would be useful to have comments on each of the vectors of callbacks.

This revision is now accepted and ready to land.Nov 3 2020, 6:25 PM
aeubanks updated this revision to Diff 302752.Nov 3 2020, 10:42 PM

add doxygen comments

nikic added a subscriber: nikic.Nov 4 2020, 12:46 AM
nikic added inline comments.
llvm/include/llvm/IR/PassInstrumentation.h
194

Maybe also rename it to BeforeRequiredPassCallbacks?

aeubanks updated this revision to Diff 302868.Nov 4 2020, 9:22 AM

rename to ShouldRunOptionalPassCallbacks

This revision was landed with ongoing or failed builds.Nov 4 2020, 9:47 AM
This revision was automatically updated to reflect the committed changes.