Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
return band ? isl_union_pw_multi_aff_get_ctx(band->pma) : NULL;
}
+__isl_give isl_band *isl_band_alloc(isl_ctx *ctx)
+{
+ isl_band *band;
+
+ band = isl_calloc_type(ctx, isl_band);
+ if (!band)
+ return NULL;
+
+ band->ref = 1;
+
+ return band;
+}
+
/* We not only increment the reference count of the band,
* but also that of the schedule that contains this band.
* This ensures that the schedule won't disappear while there
isl_band_list *children;
};
+__isl_give isl_band *isl_band_alloc(isl_ctx *ctx);
+
__isl_give isl_union_map *isl_band_list_get_suffix_schedule(
__isl_keep isl_band_list *list);
isl_band *band;
unsigned start, end;
- band = isl_calloc_type(ctx, isl_band);
+ band = isl_band_alloc(ctx);
if (!band)
return NULL;
- band->ref = 1;
band->schedule = schedule;
band->parent = parent;