[llvm] 5509a18 - [MachineVerifier] Try harder to verify SlotIndexes

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 07:23:57 PDT 2023


Author: Jay Foad
Date: 2023-04-04T15:23:36+01:00
New Revision: 5509a18b5a38868e29fae1f7b19390b029c53091

URL: https://github.com/llvm/llvm-project/commit/5509a18b5a38868e29fae1f7b19390b029c53091
DIFF: https://github.com/llvm/llvm-project/commit/5509a18b5a38868e29fae1f7b19390b029c53091.diff

LOG: [MachineVerifier] Try harder to verify SlotIndexes

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

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineVerifier.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index d26b5547bc94..84ebcd1be72f 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -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);
     }


        


More information about the llvm-commits mailing list