summaryrefslogtreecommitdiffstats
path: root/polly/lib
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-05-21 19:18:26 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-05-21 19:18:26 +0000
commit467069688d0a0a7c007994a81f4cee7521a413d5 (patch)
treea25816f2f15a1bd31265380351791eeac5d9ab7a /polly/lib
parent0bada7ce6c12d904495bf504c9f56aa6583186e6 (diff)
downloadbcm5719-llvm-467069688d0a0a7c007994a81f4cee7521a413d5.tar.gz
bcm5719-llvm-467069688d0a0a7c007994a81f4cee7521a413d5.zip
[DeLICM] Use polly::singleton to allow empty result.
isl_map_from_union_map cannot determine the map's space if the union_map is empty. polly::singleton was designed for this case. We pass the expected map space to avoid crashing in isl_map_from_union_map. This fixes an issue found by the aosp buildbot. Thanks to Eli Friedman for the reproducer. llvm-svn: 361290
Diffstat (limited to 'polly/lib')
-rw-r--r--polly/lib/Transform/DeLICM.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Transform/DeLICM.cpp b/polly/lib/Transform/DeLICM.cpp
index b229d6008e2..7191993e845 100644
--- a/polly/lib/Transform/DeLICM.cpp
+++ b/polly/lib/Transform/DeLICM.cpp
@@ -900,8 +900,9 @@ private:
}
// { DomainRead[] -> Scatter[] }
- auto PerPHIWriteScatter =
- isl::map::from_union_map(PerPHIWrites.apply_range(Schedule));
+ isl::union_map PerPHIWriteScatterUmap = PerPHIWrites.apply_range(Schedule);
+ isl::map PerPHIWriteScatter =
+ singleton(PerPHIWriteScatterUmap, PHISched.get_space());
// { DomainRead[] -> Zone[] }
auto Lifetime = betweenScatter(PerPHIWriteScatter, PHISched, false, true);
OpenPOWER on IntegriCloud