[MachineVerifier] Try harder to verify LiveStacks
authorJay Foad <jay.foad@amd.com>
Wed, 6 Jul 2022 13:00:32 +0000 (14:00 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 12 Jul 2022 08:54:54 +0000 (09:54 +0100)
Verify the LiveStacks analysis after a pass that claims to preserve it,
even if there are no further passes (apart from the verifier itself)
that would use the analysis.

Differential Revision: https://reviews.llvm.org/D129200

llvm/lib/CodeGen/MachineVerifier.cpp

index db04f2b..7a008ba 100644 (file)
@@ -293,6 +293,7 @@ namespace {
       }
 
     void getAnalysisUsage(AnalysisUsage &AU) const override {
+      AU.addUsedIfAvailable<LiveStacks>();
       AU.setPreservesAll();
       MachineFunctionPass::getAnalysisUsage(AU);
     }