summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2013-07-29 05:12:01 +0000
committerTobias Grosser <tobias@grosser.es>2013-07-29 05:12:01 +0000
commit85f7421731e059392477a26b1781f51fc392e0f6 (patch)
treee4db0b4540be58564f301eebf7807d6ff5d1cb9b /polly/lib
parent880c52f56a0c461149ac61b5c2e64dcc2b04f4e2 (diff)
downloadbcm5719-llvm-85f7421731e059392477a26b1781f51fc392e0f6.tar.gz
bcm5719-llvm-85f7421731e059392477a26b1781f51fc392e0f6.zip
JSONImporter: Free new schedule if found invalid
In case we detect that the schedule the user wants to import is invalid we refuse it _and_ free the isl_maps containing it. Another bug found thanks to Rafael. llvm-svn: 187339
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Exchange/JSONExporter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp
index f0488a0f218..e3d1c38b366 100644
--- a/polly/lib/Exchange/JSONExporter.cpp
+++ b/polly/lib/Exchange/JSONExporter.cpp
@@ -244,6 +244,10 @@ bool JSONImporter::runOnScop(Scop &scop) {
if (!D->isValidScattering(&NewScattering)) {
errs() << "JScop file contains a scattering that changes the "
<< "dependences. Use -disable-polly-legality to continue anyways\n";
+ for (StatementToIslMapTy::iterator SI = NewScattering.begin(),
+ SE = NewScattering.end();
+ SI != SE; ++SI)
+ isl_map_free(SI->second);
return false;
}
OpenPOWER on IntegriCloud