From 75880d1ffaf4155df97c1e0b7f0b5890df9bc200 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 25 Sep 2010 15:51:53 +0200 Subject: [PATCH] export isl_access_info_free 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 --- doc/user.pod | 4 ++++ include/isl_flow.h | 1 + isl_flow.c | 5 +---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/user.pod b/doc/user.pod index e09149c..1609df5 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -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 token is again used to identify the source access. The range of the source access relation C should have the same dimension as the range of the sink access relation. +The C function should usually not be +called explicitly, because it is called implicitly by +C. The result of the dependence analysis is collected in an C. There may be elements in the domain of diff --git a/include/isl_flow.h b/include/isl_flow.h index 0beca8e..b3d868b 100644 --- a/include/isl_flow.h +++ b/include/isl_flow.h @@ -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), diff --git a/isl_flow.c b/isl_flow.c index a471a7d..4f4b0fc 100644 --- a/isl_flow.c +++ b/isl_flow.c @@ -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; -- 2.7.4