From 30df6d5d6a8537d3ec7d8fe4299289a4c5a74d5c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 3 Apr 2021 14:02:11 -0700 Subject: [PATCH] Preprocessor conditionalize some assert-only functions to suppress -Wunused-function --- polly/lib/Transform/ScheduleTreeTransform.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/polly/lib/Transform/ScheduleTreeTransform.cpp b/polly/lib/Transform/ScheduleTreeTransform.cpp index 32cef0ff959d7a..7397f3b26da50e 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) {