This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Add callback for skipped passes
ClosedPublic

Authored by aeubanks on Aug 6 2020, 3:21 PM.

Details

Summary

Parallel to https://reviews.llvm.org/D84772.

Will use this for printing when a pass is skipped.

Diff Detail

Event Timeline

aeubanks created this revision.Aug 6 2020, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 3:21 PM
aeubanks requested review of this revision.Aug 6 2020, 3:21 PM

I'm having trouble figuring out how where "<string>" is coming from...

ychen added inline comments.Aug 6 2020, 4:52 PM
llvm/unittests/IR/PassBuilderCallbacksTest.cpp
534

Add an empty line and a short comment, the underscore should be "<string>". Please also do this for

  • TEST_F(FunctionCallbacksTest, InstrumentedPasses)
  • TEST_F(LoopCallbacksTest, InstrumentedPasses)
  • TEST_F(CGSCCCallbacksTest, InstrumentedPasses)
553

Maybe we don't need this? This test fixture is for module passes. foo is a function name. Since the Module is always in memory without a filename, the Module::getName(() gives "<string>".

567

move up before the AnalysisHandle check. Use "<string>" for the underscore.

743

move up before the AnalysisHandle check. Use "foo" for the underscore.

745

Thanks for catching these runBeforeNonSkippedPass that I missed previously. Maybe move these to a separate patch?

898

move up before the AnalysisHandle check. Use "loop" for the underscore.

1052

move up before the AnalysisHandle check. Use "(foo)" for the underscore.

aeubanks updated this revision to Diff 283788.Aug 6 2020, 6:29 PM
aeubanks marked 5 inline comments as done.

Address review comments

aeubanks added inline comments.Aug 6 2020, 6:30 PM
llvm/unittests/IR/PassBuilderCallbacksTest.cpp
553

This test runs a module pass, a function pass, and a loop pass, which is why this is necessary.

745

I'm lazy and think it's too much work for a new patch :)

ychen added a comment.Aug 6 2020, 6:42 PM

LGTM with one nit.

llvm/unittests/IR/PassBuilderCallbacksTest.cpp
553

I see. Thanks.

737

underscore?

ychen accepted this revision.Aug 6 2020, 6:42 PM
This revision is now accepted and ready to land.Aug 6 2020, 6:42 PM
aeubanks updated this revision to Diff 283790.Aug 6 2020, 6:56 PM

One last fix

This revision was landed with ongoing or failed builds.Aug 6 2020, 6:59 PM
This revision was automatically updated to reflect the committed changes.