This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Use PassInstrumentation for -verify-each
ClosedPublic

Authored by aeubanks on Oct 2 2020, 4:36 PM.

Details

Summary

This removes "VerifyEachPass" parameters from a lot of functions which is nice.

Don't verify after special passes or VerifierPass.

This introduces verification on loop and cgscc passes, verifying the corresponding function/module.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 2 2020, 4:36 PM
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks requested review of this revision.Oct 2 2020, 4:36 PM
aeubanks updated this revision to Diff 295937.Oct 2 2020, 4:51 PM

cleanup, verify loops/cgscc

aeubanks edited the summary of this revision. (Show Details)Oct 2 2020, 4:52 PM
aeubanks added reviewers: ychen, asbirlea.
ychen added a comment.Oct 7 2020, 3:08 PM

Nice cleanup!

llvm/lib/Passes/StandardInstrumentations.cpp
741

To encode more information in the output, how about adding the suffix "for loop <loop name>" for loop pass?

Ditto for cgscc pass. Also, check the full string such as "Verifying module <x>", "Verifying module <x> for loop <y>" etc.

llvm/test/Other/new-pass-manager-verify-each.ll
5

If it is not added by VerifyInstrumentation, maybe we don't need to check it?

aeubanks added inline comments.Oct 7 2020, 3:50 PM
llvm/lib/Passes/StandardInstrumentations.cpp
741

It's a little misleading since it's verifying the entire module/function, not only the cgscc/loop.
The proper information is already printed in the "Running pass:" when specifying -debug-pass-manager.

llvm/test/Other/new-pass-manager-verify-each.ll
5

I added it because this test is basically replacing the test in new-pass-manager.ll. So I'd say this test should cover both the pass instrumentation and the verify passes added at the very beginning and end.

ychen added inline comments.Oct 7 2020, 4:04 PM
llvm/lib/Passes/StandardInstrumentations.cpp
741

Sounds good. Add checks in the test that "Verifying .." is following "Running pass:"?

772

remove brace

llvm/test/Other/new-pass-manager-verify-each.ll
5

make sense.

aeubanks updated this revision to Diff 296853.Oct 7 2020, 7:00 PM

remove extra braces
update test:
add CHECK: Running pass lines
add -passes=verify to make sure we don't verify a verify pass

ychen accepted this revision.Oct 7 2020, 7:08 PM

LGTM.

This revision is now accepted and ready to land.Oct 7 2020, 7:08 PM
This revision was landed with ongoing or failed builds.Oct 7 2020, 7:24 PM
This revision was automatically updated to reflect the committed changes.