[llvm] 25d3421 - [LV] Replace use of getMaxSafeDepDist with isSafeForAnyVector (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 13:06:05 PDT 2023
Author: Florian Hahn
Date: 2023-07-21T22:05:50+02:00
New Revision: 25d34215bb80459dd328d6f8eb86c43684375d88
URL: https://github.com/llvm/llvm-project/commit/25d34215bb80459dd328d6f8eb86c43684375d88
DIFF: https://github.com/llvm/llvm-project/commit/25d34215bb80459dd328d6f8eb86c43684375d88.diff
LOG: [LV] Replace use of getMaxSafeDepDist with isSafeForAnyVector (NFC)
Replace the use of getMaxSafeDepDistBytes with the more direct
isSafeForAnyVector. This removes the need to define getMaxSafeDepDistBytes.
Added:
Modified:
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h b/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
index f97029ce7e50f6..01c905946379d0 100644
--- a/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
+++ b/llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
@@ -371,8 +371,6 @@ class LoopVectorizationLegality {
return LAI->getDepChecker().isSafeForAnyVectorWidth();
}
- unsigned getMaxSafeDepDistBytes() { return LAI->getMaxSafeDepDistBytes(); }
-
uint64_t getMaxSafeVectorWidthInBits() const {
return LAI->getDepChecker().getMaxSafeVectorWidthInBits();
}
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index e1bd92eb6cb5d2..d7e40e8ef978c6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5784,7 +5784,7 @@ LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
return 1;
// We used the distance for the interleave count.
- if (Legal->getMaxSafeDepDistBytes() != -1U)
+ if (!Legal->isSafeForAnyVectorWidth())
return 1;
auto BestKnownTC = getSmallBestKnownTC(*PSE.getSE(), TheLoop);
More information about the llvm-commits
mailing list