[MachineVerifier] Try harder to verify LiveVariables
authorJay Foad <jay.foad@amd.com>
Wed, 6 Jul 2022 13:00:32 +0000 (14:00 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 25 Oct 2022 08:21:51 +0000 (09:21 +0100)
Verify the LiveVariables 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/D129213

llvm/lib/CodeGen/MachineVerifier.cpp

index 011d60d..6ef36d8 100644 (file)
@@ -294,6 +294,7 @@ namespace {
 
     void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addUsedIfAvailable<LiveStacks>();
+      AU.addUsedIfAvailable<LiveVariables>();
       AU.setPreservesAll();
       MachineFunctionPass::getAnalysisUsage(AU);
     }