This includes isl_id_to_str, which is used in Michael's upcoming DeLICM patch.
llvm-svn: 284689
-isl-0.17.1-233-gc911e6a
+isl-0.17.1-236-ga9c6cc7
directly using the following functions, which always print
in isl format.
+ #include <isl/id.h>
+ __isl_give char *isl_id_to_str(
+ __isl_keep isl_id *id);
+
#include <isl/space.h>
__isl_give char *isl_space_to_str(
__isl_keep isl_space *space);
C<isl_union_access_info_to_str> prints the information in flow format.
-The output of C<isl_union_access_info_compute_flow> can be examined
-and freed using the following functions.
+The output of C<isl_union_access_info_compute_flow> can be examined,
+copied, and freed using the following functions.
#include <isl/flow.h>
__isl_give isl_union_map *isl_union_flow_get_must_dependence(
__isl_keep isl_union_flow *flow);
__isl_give isl_union_map *isl_union_flow_get_may_no_source(
__isl_keep isl_union_flow *flow);
+ __isl_give isl_union_flow *isl_union_flow_copy(
+ __isl_keep isl_union_flow *flow);
__isl_null isl_union_flow *isl_union_flow_free(
__isl_take isl_union_flow *flow);
__isl_give char *isl_union_pw_aff_to_str(__isl_keep isl_union_pw_aff *upa);
__isl_give isl_printer *isl_printer_print_union_pw_aff(
__isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa);
+void isl_union_pw_aff_dump(__isl_keep isl_union_pw_aff *upa);
ISL_DECLARE_MULTI(union_pw_aff)
ISL_DECLARE_MULTI_NEG(union_pw_aff)
__isl_take isl_union_access_info *access);
isl_ctx *isl_union_flow_get_ctx(__isl_keep isl_union_flow *flow);
+__isl_give isl_union_flow *isl_union_flow_copy(
+ __isl_keep isl_union_flow *flow);
__isl_export
__isl_give isl_union_map *isl_union_flow_get_must_dependence(
__isl_keep isl_union_flow *flow);
__isl_give isl_id *isl_id_set_free_user(__isl_take isl_id *id,
void (*free_user)(void *user));
+__isl_give char *isl_id_to_str(__isl_keep isl_id *id);
__isl_give isl_printer *isl_printer_print_id(__isl_take isl_printer *p,
__isl_keep isl_id *id);
void isl_id_dump(__isl_keep isl_id *id);
return NULL;
}
+/* Copy this isl_union_flow object.
+ */
+__isl_give isl_union_flow *isl_union_flow_copy(__isl_keep isl_union_flow *flow)
+{
+ isl_union_flow *copy;
+
+ if (!flow)
+ return NULL;
+
+ copy = isl_union_flow_alloc(isl_union_map_get_space(flow->must_dep));
+
+ if (!copy)
+ return NULL;
+
+ copy->must_dep = isl_union_map_union(copy->must_dep,
+ isl_union_map_copy(flow->must_dep));
+ copy->may_dep = isl_union_map_union(copy->may_dep,
+ isl_union_map_copy(flow->may_dep));
+ copy->must_no_source = isl_union_map_union(copy->must_no_source,
+ isl_union_map_copy(flow->must_no_source));
+ copy->may_no_source = isl_union_map_union(copy->may_no_source,
+ isl_union_map_copy(flow->may_no_source));
+
+ if (!copy->must_dep || !copy->may_dep ||
+ !copy->must_no_source || !copy->may_no_source)
+ return isl_union_flow_free(copy);
+
+ return copy;
+}
+
/* Drop the schedule dimensions from the iteration domains in "flow".
* In particular, the schedule dimensions have been prepended
* to the iteration domains prior to the dependence analysis by