diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index bb5f75fa3e04..6e86f9c9b1b1 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -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; diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index b1c98aec6a53..d9f6811098d8 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2034,7 +2034,6 @@ public: if (MemCheckExp.isInsertedInstruction(&I)) continue; SE.forgetValue(&I); - SE.eraseValueFromMap(&I); I.eraseFromParent(); } }