[llvm] 40975da - [VPlan] Wrap planContainsAdditionalSimplifications in NDEBUG (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 05:23:31 PDT 2024
Author: Florian Hahn
Date: 2024-08-24T13:22:54+01:00
New Revision: 40975da950c95124155b752cd683d945f7d203fd
URL: https://github.com/llvm/llvm-project/commit/40975da950c95124155b752cd683d945f7d203fd
DIFF: https://github.com/llvm/llvm-project/commit/40975da950c95124155b752cd683d945f7d203fd.diff
LOG: [VPlan] Wrap planContainsAdditionalSimplifications in NDEBUG (NFC)
Only used for an assertion.
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 b12121d4688c65..6fd89ef76f9aae 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())
More information about the llvm-commits
mailing list