From: Nikita Popov Date: Sat, 6 Nov 2021 16:12:18 +0000 (+0100) Subject: [SCEV] Make eraseValueFromMap() private (NFC) X-Git-Tag: upstream/15.0.7~26546 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8627877a94f539893fc85fe2bcd2b3ab7bf1127;p=platform%2Fupstream%2Fllvm.git [SCEV] Make eraseValueFromMap() private (NFC) 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. --- diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index bb5f75f..6e86f9c 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 b1c98ae..d9f68110 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(); } }