diff options
| author | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-11-15 11:38:44 +0000 |
|---|---|---|
| committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-11-15 11:38:44 +0000 |
| commit | ff9b54d5a9f311e30e076ec9ba05f3068b96f16a (patch) | |
| tree | e7863c7c3f3219a6845cdc3163d6377790f8111f /polly/lib/Exchange/JSONExporter.cpp | |
| parent | ecf6cd06f0d56d3d410d9fff50a58da154e2f212 (diff) | |
| download | bcm5719-llvm-ff9b54d5a9f311e30e076ec9ba05f3068b96f16a.tar.gz bcm5719-llvm-ff9b54d5a9f311e30e076ec9ba05f3068b96f16a.zip | |
JScop: Allow to update the context
llvm-svn: 144639
Diffstat (limited to 'polly/lib/Exchange/JSONExporter.cpp')
| -rwxr-xr-x | polly/lib/Exchange/JSONExporter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 00c9f88e2e5..b1488c63b0a 100755 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -228,6 +228,19 @@ bool JSONImporter::runOnScop(Scop &scop) { return false; } + isl_set *OldContext = S->getContext(); + isl_set *NewContext = isl_set_read_from_str(S->getIslCtx(), + jscop["context"].asCString()); + + for (unsigned i = 0; i < isl_set_dim(OldContext, isl_dim_param); i++) { + isl_id *id = isl_set_get_dim_id(OldContext, isl_dim_param, i); + NewContext = isl_set_set_dim_id(NewContext, isl_dim_param, i, id); + + } + + isl_set_free(OldContext); + S->setContext(NewContext); + StatementToIslMapTy &NewScattering = *(new StatementToIslMapTy()); int index = 0; |

