[StandardInstrumentations] Verify function doesn't change if analyses are preserved
authorArthur Eubanks <aeubanks@google.com>
Tue, 14 Mar 2023 17:44:14 +0000 (10:44 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 15 Mar 2023 20:13:08 +0000 (13:13 -0700)
commit20a7ea49f40e2d47eb6b87acf835782dece92f08
treeb61931fcbc6b479974c1c497d5b95510aa0c1cbb
parent361cba22b2013f66e5b18896ffcf2564b332ab7b
[StandardInstrumentations] Verify function doesn't change if analyses are preserved

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.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D146003
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