export isl_access_info_free
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 25 Sep 2010 13:51:53 +0000 (15:51 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 25 Sep 2010 16:49:48 +0000 (18:49 +0200)
It was thought before that there was no need to export this function,
because it is called implicitly by isl_access_info_compute_flow,
but if some error occurs in the application before the call
to isl_access_info_compute_flow, isl_access_info_free should be
called to free the (partially constructed) isl_access_info.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl_flow.h
isl_flow.c

index e09149c..1609df5 100644 (file)
@@ -2086,6 +2086,7 @@ then value based dependence analysis is performed.
                __isl_take isl_access_info *acc,
                __isl_take isl_map *source, int must,
                void *source_user);
+       void isl_access_info_free(__isl_take isl_access_info *acc);
 
        __isl_give isl_flow *isl_access_info_compute_flow(
                __isl_take isl_access_info *acc);
@@ -2127,6 +2128,9 @@ The C<source_user> token is again used to identify
 the source access.  The range of the source access relation
 C<source> should have the same dimension as the range
 of the sink access relation.
+The C<isl_access_info_free> function should usually not be
+called explicitly, because it is called implicitly by
+C<isl_access_info_compute_flow>.
 
 The result of the dependence analysis is collected in an
 C<isl_flow>.  There may be elements in the domain of
index 0beca8e..b3d868b 100644 (file)
@@ -26,6 +26,7 @@ __isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink,
 __isl_give isl_access_info *isl_access_info_add_source(
        __isl_take isl_access_info *acc, __isl_take isl_map *source,
        int must, void *source_user);
+void isl_access_info_free(__isl_take isl_access_info *acc);
 __isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc);
 int isl_flow_foreach(__isl_keep isl_flow *deps,
        int (*fn)(__isl_take isl_map *dep, int must, void *dep_user, void *user),
index a471a7d..4f4b0fc 100644 (file)
@@ -85,11 +85,8 @@ error:
 }
 
 /* Free the given isl_access_info structure.
- * This function is static because the user is expected to call
- * isl_access_info_compute_flow on any isl_access_info structure
- * he creates.
  */
-static void isl_access_info_free(__isl_take isl_access_info *acc)
+void isl_access_info_free(__isl_take isl_access_info *acc)
 {
        int i;