diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-10-18 19:50:18 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-10-18 19:50:18 +0000 |
| commit | b864c2c3c9da863236ae7b38d01b0b3a8302bc05 (patch) | |
| tree | a166571c50296bd663a457b1af353b6e186ed656 /polly/lib/Analysis/ScopInfo.cpp | |
| parent | bc7cff4c18a94eadb6e19c3a4a63bae7b96aa571 (diff) | |
| download | bcm5719-llvm-b864c2c3c9da863236ae7b38d01b0b3a8302bc05.tar.gz bcm5719-llvm-b864c2c3c9da863236ae7b38d01b0b3a8302bc05.zip | |
[FIX] Do not try to hoist "empty" accesses
Accesses that have a relative offset (in bytes) that is not divisible
by the type size (in bytes) will be represented as empty in the SCoP
description. This is on its own not good but it also crashed the
invariant load hoisting. This patch will fix the latter problem while
the former should be addressed too.
This fixes bug 25236.
llvm-svn: 250664
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 006ea878888..ab5469634e9 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -2564,6 +2564,15 @@ void Scop::hoistInvariantLoads() { continue; isl_map *AccessRelation = MA->getAccessRelation(); + + // Skip accesses that have an empty access relation. These can be caused + // by multiple offsets with a type cast in-between that cause the overall + // byte offset to be not divisible by the new types sizes. + if (isl_map_is_empty(AccessRelation)) { + isl_map_free(AccessRelation); + continue; + } + if (isl_map_involves_dims(AccessRelation, isl_dim_in, 0, Stmt.getNumIterators())) { isl_map_free(AccessRelation); |

