[polly] 30df6d5 - Preprocessor conditionalize some assert-only functions to suppress -Wunused-function
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 3 14:21:27 PDT 2021
Author: David Blaikie
Date: 2021-04-03T14:03:43-07:00
New Revision: 30df6d5d6a8537d3ec7d8fe4299289a4c5a74d5c
URL: https://github.com/llvm/llvm-project/commit/30df6d5d6a8537d3ec7d8fe4299289a4c5a74d5c
DIFF: https://github.com/llvm/llvm-project/commit/30df6d5d6a8537d3ec7d8fe4299289a4c5a74d5c.diff
LOG: Preprocessor conditionalize some assert-only functions to suppress -Wunused-function
Added:
Modified:
polly/lib/Transform/ScheduleTreeTransform.cpp
Removed:
################################################################################
diff --git a/polly/lib/Transform/ScheduleTreeTransform.cpp b/polly/lib/Transform/ScheduleTreeTransform.cpp
index 32cef0ff959d7..7397f3b26da50 100644
--- a/polly/lib/Transform/ScheduleTreeTransform.cpp
+++ b/polly/lib/Transform/ScheduleTreeTransform.cpp
@@ -375,21 +375,23 @@ static MDNode *findOptionalNodeOperand(MDNode *LoopMD, StringRef Name) {
findMetadataOperand(LoopMD, Name).getValueOr(nullptr));
}
-/// Is this node of type band?
-static bool isBand(const isl::schedule_node &Node) {
- return isl_schedule_node_get_type(Node.get()) == isl_schedule_node_band;
-}
-
/// Is this node of type mark?
static bool isMark(const isl::schedule_node &Node) {
return isl_schedule_node_get_type(Node.get()) == isl_schedule_node_mark;
}
+#ifndef NDEBUG
+/// Is this node of type band?
+static bool isBand(const isl::schedule_node &Node) {
+ return isl_schedule_node_get_type(Node.get()) == isl_schedule_node_band;
+}
+
/// Is this node a band of a single dimension (i.e. could represent a loop)?
static bool isBandWithSingleLoop(const isl::schedule_node &Node) {
return isBand(Node) && isl_schedule_node_band_n_member(Node.get()) == 1;
}
+#endif
/// Create an isl::id representing the output loop after a transformation.
static isl::id createGeneratedLoopAttr(isl::ctx Ctx, MDNode *FollowupLoopMD) {
More information about the llvm-commits
mailing list