aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2024-08-24 13:22:52 +0100
committerFlorian Hahn <flo@fhahn.com>2024-08-24 13:22:54 +0100
commit40975da950c95124155b752cd683d945f7d203fd (patch)
tree8107f39f40379a3b5efba7c5aa2fa074c49e0239
parentbe5ecc35efc902a4742669d41a88cfd88babb245 (diff)
downloadllvm-40975da950c95124155b752cd683d945f7d203fd.zip
llvm-40975da950c95124155b752cd683d945f7d203fd.tar.gz
llvm-40975da950c95124155b752cd683d945f7d203fd.tar.bz2
[VPlan] Wrap planContainsAdditionalSimplifications in NDEBUG (NFC)
Only used for an assertion.
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index b12121d..6fd89ef 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7239,11 +7239,12 @@ InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan,
return Cost;
}
+#ifndef NDEBUG
/// Return true if the original loop \ TheLoop contains any instructions that do
/// not have corresponding recipes in \p Plan and are not marked to be ignored
/// in \p CostCtx. This means the VPlan contains simplification that the legacy
/// cost-model did not account for.
-[[maybe_unused]] static bool
+static bool
planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
VPCostContext &CostCtx, Loop *TheLoop,
LoopVectorizationCostModel &CM) {
@@ -7288,6 +7289,7 @@ planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
});
});
}
+#endif
VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
if (VPlans.empty())