[SCEV] Make eraseValueFromMap() private (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 6 Nov 2021 16:12:18 +0000 (17:12 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 6 Nov 2021 16:14:02 +0000 (17:14 +0100)
The public API for this functionality is forgetValue(). There was
only one call from LoopVectorize, which was directly next to a
forgetValue() call and as such redundant.

llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index bb5f75f..6e86f9c 100644 (file)
@@ -523,9 +523,6 @@ public:
   /// scAddRecExpr. The result will be cached in HasRecMap.
   bool containsAddRecurrence(const SCEV *S);
 
-  /// Erase Value from ValueExprMap and ExprValueMap.
-  void eraseValueFromMap(Value *V);
-
   /// Is operation \p BinOp between \p LHS and \p RHS provably does not have
   /// a signed/unsigned overflow (\p Signed)?
   bool willNotOverflow(Instruction::BinaryOps BinOp, bool Signed,
@@ -1904,6 +1901,9 @@ private:
   /// Return an existing SCEV for V if there is one, otherwise return nullptr.
   const SCEV *getExistingSCEV(Value *V);
 
+  /// Erase Value from ValueExprMap and ExprValueMap.
+  void eraseValueFromMap(Value *V);
+
   /// Return false iff given SCEV contains a SCEVUnknown with NULL value-
   /// pointer.
   bool checkValidity(const SCEV *S) const;
index b1c98ae..d9f6811 100644 (file)
@@ -2034,7 +2034,6 @@ public:
         if (MemCheckExp.isInsertedInstruction(&I))
           continue;
         SE.forgetValue(&I);
-        SE.eraseValueFromMap(&I);
         I.eraseFromParent();
       }
     }