Reuse StructuralHash and allow it to be used in non-expensive checks builds.
Move PreservedAnalysisChecker further down StandardInstrumentations so other Instrumentations (e.g. printing) have a chance to run before PreservedAnalysisChecker crashes.
Paths
| Differential D146003
[StandardInstrumentations] Verify function doesn't change if analyses are preserved ClosedPublic Authored by aeubanks on Mar 13 2023, 5:11 PM.
Details Summary Reuse StructuralHash and allow it to be used in non-expensive checks builds. Move PreservedAnalysisChecker further down StandardInstrumentations so other Instrumentations (e.g. printing) have a chance to run before PreservedAnalysisChecker crashes.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 13 2023, 5:11 PM Comment Actions Looks good in general, but it would be better to have this patch split into several smaller patches: renaming NFC, InstructionCounter intro, one for each particular pass fix.
Comment Actions Please split out the fixes to individual passes.
This revision now requires changes to proceed.Mar 14 2023, 2:23 AM aeubanks retitled this revision from [StandardInstrumentations] Check that the number of instructions doesn't change if analyses are preserved to [StandardInstrumentations] Verify function doesn't change if analyses are preserved. Comment Actionssplit out other changes, use StructuralHash instead Comment Actions nontrivial-unswitch-markloopasdeleted.ll failure looks legit.
This revision now requires changes to proceed.Mar 14 2023, 2:12 PM This revision is now accepted and ready to land.Mar 15 2023, 9:32 AM This revision was landed with ongoing or failed builds.Mar 15 2023, 1:17 PM Closed by commit rG20a7ea49f40e: [StandardInstrumentations] Verify function doesn't change if analyses are… (authored by aeubanks). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions The improved verification found this: https://github.com/llvm/llvm-project/issues/61574
Revision Contents
Diff 505605 llvm/include/llvm/IR/StructuralHash.h
llvm/lib/IR/StructuralHash.cpp
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-markloopasdeleted.ll
llvm/unittests/IR/PassManagerTest.cpp
|
Better move the default behind EXPENSIVE_CHECKS.