This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Verify LoopAnalysisResults after a loop pass
ClosedPublic

Authored by aeubanks on Mar 17 2021, 2:55 PM.

Details

Summary
All loop passes should preserve all analyses in LoopAnalysisResults. Add
checks for those.

Note that due to PR44815, we don't check LAR's ScalarEvolution.
Apparently calling SE.verify() can change its results.

Only verify MSSA when VerifyMemorySSA, normally it's very expensive.

Diff Detail

Event Timeline

aeubanks created this revision.Mar 17 2021, 2:55 PM
aeubanks requested review of this revision.Mar 17 2021, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2021, 2:55 PM
aeubanks updated this revision to Diff 331394.Mar 17 2021, 3:24 PM

rebase past revert

aeubanks retitled this revision from [NewPM] Only verify MSSA when VerifyMemorySSA to [NewPM] Verify LoopAnalysisResults after a loop pass.Mar 17 2021, 3:24 PM
aeubanks edited the summary of this revision. (Show Details)
asbirlea accepted this revision.Mar 18 2021, 6:16 PM
This revision is now accepted and ready to land.Mar 18 2021, 6:16 PM
This revision was automatically updated to reflect the committed changes.
uabelho added a subscriber: uabelho.Jul 8 2021, 2:53 AM

I wrote
https://bugs.llvm.org/show_bug.cgi?id=51020
about a case where the verifier finds something to complain about.

I wrote
https://bugs.llvm.org/show_bug.cgi?id=51020
about a case where the verifier finds something to complain about.

The original reproducer in PR51020 used loop-unroll-full but I've found cases failing the same way with loop-reroll. I updated the PR with this case too.