[llvm] c1aa0dc - [SCEV] Remove -verify-scev-maps flag

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 02:52:36 PDT 2023


Author: Nikita Popov
Date: 2023-06-09T11:51:53+02:00
New Revision: c1aa0dce48ced5c3cdd1b860bd80c0591ccdc4ed

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

LOG: [SCEV] Remove -verify-scev-maps flag

This is now checked as part of the usual SCEV verification. There
is little value in checking this on each lookup.

These two maps are strictly synchronized nowadays, which was not
the case historically.

Added: 
    

Modified: 
    llvm/lib/Analysis/ScalarEvolution.cpp
    llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-unroll.ll
    llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-vect.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index dc13e5b128cf4..7272fdee26d24 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -161,10 +161,6 @@ static cl::opt<bool, true> VerifySCEVOpt(
 static cl::opt<bool> VerifySCEVStrict(
     "verify-scev-strict", cl::Hidden,
     cl::desc("Enable stricter verification with -verify-scev is passed"));
-static cl::opt<bool>
-    VerifySCEVMap("verify-scev-maps", cl::Hidden,
-                  cl::desc("Verify no dangling value in ScalarEvolution's "
-                           "ExprValueMap (slow)"));
 
 static cl::opt<bool> VerifyIR(
     "scev-verify-ir", cl::Hidden,
@@ -4458,13 +4454,6 @@ ArrayRef<Value *> ScalarEvolution::getSCEVValues(const SCEV *S) {
   ExprValueMapType::iterator SI = ExprValueMap.find_as(S);
   if (SI == ExprValueMap.end())
     return std::nullopt;
-#ifndef NDEBUG
-  if (VerifySCEVMap) {
-    // Check there is no dangling Value in the set returned.
-    for (Value *V : SI->second)
-      assert(ValueExprMap.count(V));
-  }
-#endif
   return SI->second.getArrayRef();
 }
 

diff  --git a/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-unroll.ll b/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-unroll.ll
index 8f7fe2b9f760c..444a7ba2ff610 100644
--- a/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-unroll.ll
+++ b/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-unroll.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=loop-unroll -unroll-runtime -unroll-count=2 -verify-scev-maps -S | FileCheck %s
+; RUN: opt < %s -passes=loop-unroll -unroll-runtime -unroll-count=2 -S | FileCheck %s
 
 ; Check SCEV expansion uses existing value when unrolling an inner loop with runtime trip count in a loop nest.
 ; The outer loop gets unrolled twice, so we see 2 selects in the outer loop blocks.

diff  --git a/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-vect.ll b/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-vect.ll
index c092d8c1d93ca..fc2ae503bdb5b 100644
--- a/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-vect.ll
+++ b/llvm/test/Analysis/ScalarEvolution/scev-expander-reuse-vect.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -passes=loop-vectorize -force-vector-width=4 -verify-scev-maps -S |FileCheck %s
+; RUN: opt < %s -passes=loop-vectorize -force-vector-width=4 -S |FileCheck %s
 
 ; SCEV expansion uses existing value when the SCEV has no AddRec expr.
 ; CHECK-LABEL: @foo(


        


More information about the llvm-commits mailing list