diff options
| author | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-08-20 11:11:25 +0000 |
|---|---|---|
| committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-08-20 11:11:25 +0000 |
| commit | b76f385334405e6517ee60b5dfdf569ff4e94f1f (patch) | |
| tree | f1bd4056fc00da863dd7ebdbb9967686883329ca /polly/lib/CodeGeneration.cpp | |
| parent | 15f5efff8f44ccbb3c1f184bbd858c2b7ff5be4f (diff) | |
| download | bcm5719-llvm-b76f385334405e6517ee60b5dfdf569ff4e94f1f.tar.gz bcm5719-llvm-b76f385334405e6517ee60b5dfdf569ff4e94f1f.zip | |
Free isl_ctx and fix several memory leaks
Because of me not understanding the LLVM pass structure well, I did not find a
good way to allocate isl_ctx and to free it later without getting issues with
reference counting. I now found this place, such that we can free isl_ctx. This
patch also fixes the memory leaks that were ignored beforehand.
llvm-svn: 138204
Diffstat (limited to 'polly/lib/CodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGeneration.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/CodeGeneration.cpp b/polly/lib/CodeGeneration.cpp index aa2dc11e7e6..cfede95a6af 100644 --- a/polly/lib/CodeGeneration.cpp +++ b/polly/lib/CodeGeneration.cpp @@ -1134,7 +1134,7 @@ public: map = isl_map_intersect(map, identity); isl_map *lexmax = isl_map_lexmax(isl_map_copy(map)); - isl_map *lexmin = isl_map_lexmin(isl_map_copy(map)); + isl_map *lexmin = isl_map_lexmin(map); isl_map *sub = isl_map_sum(lexmax, isl_map_neg(lexmin)); isl_set *elements = isl_map_range(sub); @@ -1149,6 +1149,7 @@ public: isl_point_get_coordinate(p, isl_dim_set, isl_set_n_dim(loopDomain) - 1, &v); int numberIterations = isl_int_get_si(v); isl_int_clear(v); + isl_point_free(p); return (numberIterations) / isl_int_get_si(f->stride) + 1; } |

