Skip to content

Commit

Permalink
Preprocessor conditionalize some assert-only functions to suppress -W…
Browse files Browse the repository at this point in the history
…unused-function
  • Loading branch information
dwblaikie committed Apr 3, 2021
1 parent 9f6649d commit 30df6d5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions polly/lib/Transform/ScheduleTreeTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 30df6d5

Please sign in to comment.