[MachineVerifier] Try harder to verify SlotIndexes
authorJay Foad <jay.foad@amd.com>
Wed, 6 Jul 2022 13:26:16 +0000 (14:26 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 4 Apr 2023 14:23:36 +0000 (15:23 +0100)
Verify the SlotIndexes 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/D129201

llvm/lib/CodeGen/MachineVerifier.cpp

index d26b554..84ebcd1 100644 (file)
@@ -296,6 +296,7 @@ namespace {
     void getAnalysisUsage(AnalysisUsage &AU) const override {
       AU.addUsedIfAvailable<LiveStacks>();
       AU.addUsedIfAvailable<LiveVariables>();
+      AU.addUsedIfAvailable<SlotIndexes>();
       AU.setPreservesAll();
       MachineFunctionPass::getAnalysisUsage(AU);
     }