[llvm] 5a670f1 - [SLP] Kill an unused param and use a for-loop in calculateDependencies [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 13:58:31 PST 2022
Author: Philip Reames
Date: 2022-01-20T13:58:20-08:00
New Revision: 5a670f1378aef27e8fe21fdf4aa47eea0e97f7f5
URL: https://github.com/llvm/llvm-project/commit/5a670f1378aef27e8fe21fdf4aa47eea0e97f7f5
DIFF: https://github.com/llvm/llvm-project/commit/5a670f1378aef27e8fe21fdf4aa47eea0e97f7f5.diff
LOG: [SLP] Kill an unused param and use a for-loop in calculateDependencies [NFC]
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 1b4e90e78d95..f0a031168f48 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -581,7 +581,7 @@ static bool InTreeUserNeedToExtract(Value *Scalar, Instruction *UserInst,
}
/// \returns the AA location that is being access by the instruction.
-static MemoryLocation getLocation(Instruction *I, AAResults *AA) {
+static MemoryLocation getLocation(Instruction *I) {
if (StoreInst *SI = dyn_cast<StoreInst>(I))
return MemoryLocation::get(SI);
if (LoadInst *LI = dyn_cast<LoadInst>(I))
@@ -7551,12 +7551,12 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
Instruction *SrcInst = BundleMember->Inst;
assert(SrcInst->mayReadOrWriteMemory() &&
"NextLoadStore list for non memory effecting bundle?");
- MemoryLocation SrcLoc = getLocation(SrcInst, SLP->AA);
+ MemoryLocation SrcLoc = getLocation(SrcInst);
bool SrcMayWrite = BundleMember->Inst->mayWriteToMemory();
unsigned numAliased = 0;
unsigned DistToSrc = 1;
- while (DepDest) {
+ for ( ; DepDest; DepDest = DepDest->NextLoadStore) {
assert(isInSchedulingRegion(DepDest));
// We have two limits to reduce the complexity:
@@ -7586,7 +7586,6 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
WorkList.push_back(DestBundle);
}
}
- DepDest = DepDest->NextLoadStore;
// Example, explaining the loop break condition: Let's assume our
// starting instruction is i0 and MaxMemDepDistance = 3.
More information about the llvm-commits
mailing list