[llvm] ac3ee1b - [Transforms] Fix -Wunused-variable and remove redundant VerifyStates after #75826 (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 06:56:01 PST 2024


Author: Jie Fu
Date: 2024-01-22T22:55:53+08:00
New Revision: ac3ee1b1aec424c60660fd245f5b53aaffa2f5b1

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

LOG: [Transforms] Fix -Wunused-variable and remove redundant VerifyStates after #75826 (NFC)

llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1064:18: error: unused variable 'I' [-Werror,-Wunused-variable]
    Instruction *I = cast<Instruction>(Pair.first);
                 ^
llvm-project/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:1066:11: error: unused variable 'BaseValue' [-Werror,-Wunused-variable]
    auto *BaseValue = State.getBaseValue();
          ^
2 errors generated.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index c09983702d6e2f..45ce3bf3ceae23 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1056,7 +1056,6 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache,
   for (const auto &Pair : States) {
     LLVM_DEBUG(dbgs() << " " << Pair.second << " for " << *Pair.first << "\n");
   }
-#endif
 
   // since we do the conflict marking as part of the fixpoint iteration this
   // loop only asserts that invariants are met
@@ -1072,9 +1071,6 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache,
         "why did it get added?");
     assert(!State.isUnknown() && "Optimistic algorithm didn't complete!");
   }
-
-#ifndef NDEBUG
-  VerifyStates();
 #endif
 
   // Insert Phis for all conflicts


        


More information about the llvm-commits mailing list