diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2014-10-02 16:22:19 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2014-10-02 16:22:19 +0000 |
| commit | 87901453d95dfe345821cb7e8efb9cb6fefa9205 (patch) | |
| tree | dfee83515c0006e5b0ef8b4e402d6094c6e8c3c1 /polly/lib/Exchange/JSONExporter.cpp | |
| parent | 1c4fb4600da6e64234c6933dcc9c9cf5de5b14ad (diff) | |
| download | bcm5719-llvm-87901453d95dfe345821cb7e8efb9cb6fefa9205.tar.gz bcm5719-llvm-87901453d95dfe345821cb7e8efb9cb6fefa9205.zip | |
Align copied load/store instructions as the original.
This also forbids the json importer to access other memory locations
than the original instruction as we to reuse the alignment of the
original load/store.
Differential Revision: http://reviews.llvm.org/D5560
llvm-svn: 218883
Diffstat (limited to 'polly/lib/Exchange/JSONExporter.cpp')
| -rw-r--r-- | polly/lib/Exchange/JSONExporter.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index d3aebfa72c7..36e302b1522 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -277,6 +277,21 @@ bool JSONImporter::runOnScop(Scop &scop) { return false; } + // We keep the old alignment, thus we cannot allow accesses to memory + // locations that were not accessed before. + isl_set *newAccessSet = isl_map_range(isl_map_copy(newAccessMap)); + isl_set *currentAccessSet = isl_map_range(isl_map_copy(currentAccessMap)); + bool isSubset = isl_set_is_subset(newAccessSet, currentAccessSet); + isl_set_free(newAccessSet); + isl_set_free(currentAccessSet); + + if (!isSubset) { + errs() << "JScop file changes the accessed memory\n"; + isl_map_free(currentAccessMap); + isl_map_free(newAccessMap); + return false; + } + // We need to copy the isl_ids for the parameter dimensions to the new // map. Without doing this the current map would have different // ids then the new one, even though both are named identically. |

