[llvm-commits] [polly] r138325 - /polly/trunk/lib/ScheduleOptimizer.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Tue Aug 23 05:31:14 PDT 2011
Author: grosser
Date: Tue Aug 23 07:31:14 2011
New Revision: 138325
URL: http://llvm.org/viewvc/llvm-project?rev=138325&view=rev
Log:
ScheduleOptimizer: Fix some memory errors.
This fixes reference counting if the schedule optimizer is used.
Modified:
polly/trunk/lib/ScheduleOptimizer.cpp
Modified: polly/trunk/lib/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/ScheduleOptimizer.cpp?rev=138325&r1=138324&r2=138325&view=diff
==============================================================================
--- polly/trunk/lib/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/ScheduleOptimizer.cpp Tue Aug 23 07:31:14 2011
@@ -97,6 +97,7 @@
isl_map *changeScatteringMap = isl_map_from_basic_map(changeScattering);
stmt->setScattering(isl_map_apply_range(scattering, changeScatteringMap));
+ isl_dim_free(dim);
}
}
@@ -386,7 +387,8 @@
isl_union_set_from_set(domain));
isl_map *stmtSchedule;
isl_union_map_foreach_map(stmtBand, getSingleMap, &stmtSchedule);
- stmt->setScattering(stmtSchedule);
+ stmt->setScattering(isl_map_copy(stmtSchedule));
+ isl_union_map_free(stmtBand);
}
isl_union_map_free(tiledSchedule);
More information about the llvm-commits
mailing list