[llvm] f862787 - [SCEV] Make eraseValueFromMap() private (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 6 09:14:11 PDT 2021
Author: Nikita Popov
Date: 2021-11-06T17:14:02+01:00
New Revision: f8627877a94f539893fc85fe2bcd2b3ab7bf1127
URL: https://github.com/llvm/llvm-project/commit/f8627877a94f539893fc85fe2bcd2b3ab7bf1127
DIFF: https://github.com/llvm/llvm-project/commit/f8627877a94f539893fc85fe2bcd2b3ab7bf1127.diff
LOG: [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.
Added:
Modified:
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h
index bb5f75fa3e04b..6e86f9c9b1b11 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolution.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolution.h
@@ -523,9 +523,6 @@ class ScalarEvolution {
/// 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 @@ class ScalarEvolution {
/// 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 b1c98aec6a532..d9f6811098d8d 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2034,7 +2034,6 @@ class GeneratedRTChecks {
if (MemCheckExp.isInsertedInstruction(&I))
continue;
SE.forgetValue(&I);
- SE.eraseValueFromMap(&I);
I.eraseFromParent();
}
}
More information about the llvm-commits
mailing list