[llvm] b661a55 - [ScalarEvolution] Remove unused ExitLimit::hasOperand() method (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 09:42:27 PDT 2021


Author: Nikita Popov
Date: 2021-05-19T18:42:14+02:00
New Revision: b661a55a253f4a1cf5a0fbcb86e5ba7b9fb1387b

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

LOG: [ScalarEvolution] Remove unused ExitLimit::hasOperand() method (NFC)

We only use BackedgeTakenInfo::hasOperand().

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ScalarEvolution.h
    llvm/lib/Analysis/ScalarEvolution.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index e84b7101bfdf..b80b929e26f6 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -1340,8 +1340,6 @@ class ScalarEvolution {
              !isa<SCEVCouldNotCompute>(MaxNotTaken);
     }
 
-    bool hasOperand(const SCEV *S) const;
-
     /// Test whether this ExitLimit contains all information.
     bool hasFullInfo() const {
       return !isa<SCEVCouldNotCompute>(ExactNotTaken);

diff  --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 6447c3d4dec7..126e0c310ce2 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -12606,14 +12606,6 @@ bool ScalarEvolution::hasOperand(const SCEV *S, const SCEV *Op) const {
   return SCEVExprContains(S, [&](const SCEV *Expr) { return Expr == Op; });
 }
 
-bool ScalarEvolution::ExitLimit::hasOperand(const SCEV *S) const {
-  auto IsS = [&](const SCEV *X) { return S == X; };
-  auto ContainsS = [&](const SCEV *X) {
-    return !isa<SCEVCouldNotCompute>(X) && SCEVExprContains(X, IsS);
-  };
-  return ContainsS(ExactNotTaken) || ContainsS(MaxNotTaken);
-}
-
 void
 ScalarEvolution::forgetMemoizedResults(const SCEV *S) {
   ValuesAtScopes.erase(S);


        


More information about the llvm-commits mailing list