[llvm] 41c9f4c - [LoopVectorize] NFC: Fix unused variable warning for MaxSafeDepDist
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 09:42:39 PST 2020
Author: Sander de Smalen
Date: 2020-11-19T17:41:35Z
New Revision: 41c9f4c1cea7314c0a6a32f2e59dab60cd575c1f
URL: https://github.com/llvm/llvm-project/commit/41c9f4c1cea7314c0a6a32f2e59dab60cd575c1f
DIFF: https://github.com/llvm/llvm-project/commit/41c9f4c1cea7314c0a6a32f2e59dab60cd575c1f.diff
LOG: [LoopVectorize] NFC: Fix unused variable warning for MaxSafeDepDist
rGf571fe6df585127d8b045f8e8f5b4e59da9bbb73 led to a warning of an unused
variable for MaxSafeDepDist (written but not used). It seems this
variable and assignment can be safely removed.
Added:
Modified:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 75ecb505b985..7404c92cdb2f 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5789,12 +5789,6 @@ LoopVectorizationCostModel::calculateRegisterUsage(ArrayRef<ElementCount> VFs) {
TransposeEnds[Interval.second].push_back(Interval.first);
SmallPtrSet<Instruction *, 8> OpenIntervals;
-
- // Get the size of the widest register.
- unsigned MaxSafeDepDist = -1U;
- if (Legal->getMaxSafeDepDistBytes() != -1U)
- MaxSafeDepDist = Legal->getMaxSafeDepDistBytes() * 8;
-
SmallVector<RegisterUsage, 8> RUs(VFs.size());
SmallVector<SmallMapVector<unsigned, unsigned, 4>, 8> MaxUsages(VFs.size());
More information about the llvm-commits
mailing list