diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2009-11-28 20:16:03 +0100 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2009-12-07 16:56:29 +0100 |
commit | 4e2cbb309f88e1d847d55dbd81d900b22151a866 (patch) | |
tree | 81ca2cf8e90532f6780d390c9a5f6e5d875cf724 /isl_coalesce.c | |
parent | 6fd2691af8b426078996469960834e9bdd65ab9d (diff) | |
download | isl-4e2cbb309f88e1d847d55dbd81d900b22151a866.tar.gz isl-4e2cbb309f88e1d847d55dbd81d900b22151a866.tar.bz2 isl-4e2cbb309f88e1d847d55dbd81d900b22151a866.zip |
isl_tab_detect_redundant: return status instead of isl_tab *
Diffstat (limited to 'isl_coalesce.c')
-rw-r--r-- | isl_coalesce.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/isl_coalesce.c b/isl_coalesce.c index 0716916f..33399d92 100644 --- a/isl_coalesce.c +++ b/isl_coalesce.c @@ -184,8 +184,7 @@ static int fuse(struct isl_map *map, int i, int j, struct isl_tab **tabs, ISL_F_SET(fused, ISL_BASIC_MAP_RATIONAL); fused_tab = isl_tab_from_basic_map(fused); - fused_tab = isl_tab_detect_redundant(fused_tab); - if (!fused_tab) + if (isl_tab_detect_redundant(fused_tab) < 0) goto error; isl_basic_map_free(map->p[i]); @@ -196,6 +195,7 @@ static int fuse(struct isl_map *map, int i, int j, struct isl_tab **tabs, return 1; error: + isl_tab_free(fused_tab); isl_basic_map_free(fused); return -1; } @@ -582,7 +582,8 @@ struct isl_map *isl_map_coalesce(struct isl_map *map) if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT)) tabs[i] = isl_tab_detect_implicit_equalities(tabs[i]); if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT)) - tabs[i] = isl_tab_detect_redundant(tabs[i]); + if (isl_tab_detect_redundant(tabs[i]) < 0) + goto error; } for (i = map->n - 1; i >= 0; --i) if (tabs[i]->empty) |