[llvm] 0e19ff0 - [DSE, MSSA] Remove unused arguments for isDSEBarrier (NFC).
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 02:59:13 PDT 2020
Author: Florian Hahn
Date: 2020-06-22T10:58:53+01:00
New Revision: 0e19ff02d801df894873ddaacae783b6651e9006
URL: https://github.com/llvm/llvm-project/commit/0e19ff02d801df894873ddaacae783b6651e9006
DIFF: https://github.com/llvm/llvm-project/commit/0e19ff02d801df894873ddaacae783b6651e9006.diff
LOG: [DSE,MSSA] Remove unused arguments for isDSEBarrier (NFC).
Added:
Modified:
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 80da42d99b00..dee9faa2fddd 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -1900,9 +1900,8 @@ struct DSEState {
// * A memory instruction that may throw and \p SI accesses a non-stack
// object.
// * Atomic stores stronger that monotonic.
- bool isDSEBarrier(Instruction *SI, MemoryLocation &SILoc,
- const Value *SILocUnd, Instruction *NI,
- MemoryLocation &NILoc) const {
+ bool isDSEBarrier(Instruction *SI, const Value *SILocUnd,
+ Instruction *NI) const {
// If NI may throw it acts as a barrier, unless we are to an alloca/alloca
// like object that does not escape.
if (NI->mayThrow() && !InvisibleToCallerBeforeRet.count(SILocUnd))
@@ -2040,10 +2039,9 @@ bool eliminateDeadStoresMemorySSA(Function &F, AliasAnalysis &AA,
continue;
}
- MemoryLocation NILoc = *State.getLocForWriteEx(NI);
// Check for anything that looks like it will be a barrier to further
// removal
- if (State.isDSEBarrier(SI, SILoc, SILocUnd, NI, NILoc)) {
+ if (State.isDSEBarrier(SI, SILocUnd, NI)) {
LLVM_DEBUG(dbgs() << " ... skip, barrier\n");
continue;
}
@@ -2058,6 +2056,7 @@ bool eliminateDeadStoresMemorySSA(Function &F, AliasAnalysis &AA,
if (!DebugCounter::shouldExecute(MemorySSACounter))
continue;
+ MemoryLocation NILoc = *State.getLocForWriteEx(NI);
// Check if NI overwrites SI.
int64_t InstWriteOffset, DepWriteOffset;
auto Iter = State.IOLs.insert(
More information about the llvm-commits
mailing list