[polly] r187339 - JSONImporter: Free new schedule if found invalid
Tobias Grosser
tobias at grosser.es
Sun Jul 28 22:12:01 PDT 2013
Author: grosser
Date: Mon Jul 29 00:12:01 2013
New Revision: 187339
URL: http://llvm.org/viewvc/llvm-project?rev=187339&view=rev
Log:
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.
Modified:
polly/trunk/lib/Exchange/JSONExporter.cpp
polly/trunk/test/Cloog/CodeGen/do_pluto_matmult.ll
Modified: polly/trunk/lib/Exchange/JSONExporter.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Exchange/JSONExporter.cpp?rev=187339&r1=187338&r2=187339&view=diff
==============================================================================
--- polly/trunk/lib/Exchange/JSONExporter.cpp (original)
+++ polly/trunk/lib/Exchange/JSONExporter.cpp Mon Jul 29 00:12:01 2013
@@ -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;
}
Modified: polly/trunk/test/Cloog/CodeGen/do_pluto_matmult.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Cloog/CodeGen/do_pluto_matmult.ll?rev=187339&r1=187338&r2=187339&view=diff
==============================================================================
--- polly/trunk/test/Cloog/CodeGen/do_pluto_matmult.ll (original)
+++ polly/trunk/test/Cloog/CodeGen/do_pluto_matmult.ll Mon Jul 29 00:12:01 2013
@@ -78,7 +78,7 @@
; RUN: opt %loadPolly %defaultOpts -polly-codegen -disable-output %s
; RUN: opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-cloog -analyze < %s | FileCheck -check-prefix=IMPORT %s
; RUN: opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=valid_reverse -polly-cloog -analyze < %s | FileCheck -check-prefix=REVERSE %s > /dev/null
-; RUN: not --crash opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=invalid_reverse -polly-cloog -analyze < %s 2>&1 | FileCheck -check-prefix=INVALID %s > /dev/null
+; RUN: opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=invalid_reverse -polly-cloog -analyze < %s 2>&1 | FileCheck -check-prefix=INVALID %s > /dev/null
; RUN: opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-cloog -analyze < %s | FileCheck -check-prefix=IMPORT %s
; RUN: opt %loadPolly %defaultOpts -polly-import-jscop -polly-import-jscop-dir=%S -polly-codegen -S < %s | FileCheck -check-prefix=CODEGEN %s
More information about the llvm-commits
mailing list