diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-05-18 21:29:58 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-05-18 21:29:58 +0000 |
commit | 1638f987f11fa1f8b4292b476b0ee3b92ca9b84c (patch) | |
tree | 9c67a614d329b8bd83748fe8921c8fa98ef4cc9a /polly/lib/External/isl/isl_convex_hull.c | |
parent | f91cebf7c58c005d2e55f788277da95d7a8e8700 (diff) | |
download | bcm5719-llvm-1638f987f11fa1f8b4292b476b0ee3b92ca9b84c.tar.gz bcm5719-llvm-1638f987f11fa1f8b4292b476b0ee3b92ca9b84c.zip |
Update isl to 6be6768e
Besides a couple of interface cleanups, this change also contains a performance
optimization of isl_mat_product that should give us up to almost 6% compiletime
reduction.
llvm-svn: 237616
Diffstat (limited to 'polly/lib/External/isl/isl_convex_hull.c')
-rw-r--r-- | polly/lib/External/isl/isl_convex_hull.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/polly/lib/External/isl/isl_convex_hull.c b/polly/lib/External/isl/isl_convex_hull.c index 62d1b29462b..b5ca0d9d53e 100644 --- a/polly/lib/External/isl/isl_convex_hull.c +++ b/polly/lib/External/isl/isl_convex_hull.c @@ -1914,6 +1914,18 @@ error: return NULL; } +/* Return an empty basic map living in the same space as "map". + */ +static __isl_give isl_basic_map *replace_map_by_empty_basic_map( + __isl_take isl_map *map) +{ + isl_space *space; + + space = isl_map_get_space(map); + isl_map_free(map); + return isl_basic_map_empty(space); +} + /* Compute the convex hull of a map. * * The implementation was inspired by "Extended Convex Hull" by Fukuda et al., @@ -1932,11 +1944,8 @@ struct isl_basic_map *isl_map_convex_hull(struct isl_map *map) if (!map) goto error; - if (map->n == 0) { - convex_hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return convex_hull; - } + if (map->n == 0) + return replace_map_by_empty_basic_map(map); model = isl_basic_map_copy(map->p[0]); set = isl_map_underlying_set(map); @@ -2330,11 +2339,8 @@ static __isl_give isl_basic_map *map_simple_hull(__isl_take isl_map *map, if (!map) return NULL; - if (map->n == 0) { - hull = isl_basic_map_empty_like_map(map); - isl_map_free(map); - return hull; - } + if (map->n == 0) + return replace_map_by_empty_basic_map(map); if (map->n == 1) { hull = isl_basic_map_copy(map->p[0]); isl_map_free(map); |