summaryrefslogtreecommitdiff
path: root/polly/lib/CodeGen/PPCGCodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-08-17 22:04:53 +0000
committerTobias Grosser <tobias@grosser.es>2017-08-17 22:04:53 +0000
commitfa03cb768773e5c22449cab38f71d2f009cab381 (patch)
tree1ac8ddd43f80f1d621cd1aefb76ab209d9272fe9 /polly/lib/CodeGen/PPCGCodeGeneration.cpp
parentb46847c035703f1f3c6a6f8c6833daf7c381b8a1 (diff)
[GPGPU] Only collect the access that belong to an array [NFC]
This avoid the construction of very large sets and in many cases also keeps the number of parameters low. As a result, we see a compile time reduction from 5 minutes to only slightly above 1 minute for one of our larger test cases. llvm-svn: 311127
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index e44e8f716e94..a3388bd3fd2f 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -2762,9 +2762,11 @@ public:
/// @returns An isl_set describing the extent of the array.
isl::set getExtent(ScopArrayInfo *Array) {
unsigned NumDims = Array->getNumberOfDimensions();
- isl::union_map Accesses = S->getAccesses();
- Accesses = Accesses.intersect_domain(S->getDomains());
- Accesses = Accesses.detect_equalities();
+
+ if (Array->getNumberOfDimensions() == 0)
+ return isl::set::universe(Array->getSpace());
+
+ isl::union_map Accesses = S->getAccesses(Array);
isl::union_set AccessUSet = Accesses.range();
AccessUSet = AccessUSet.coalesce();
AccessUSet = AccessUSet.detect_equalities();
@@ -2773,9 +2775,6 @@ public:
if (AccessUSet.is_empty())
return isl::set::empty(Array->getSpace());
- if (Array->getNumberOfDimensions() == 0)
- return isl::set::universe(Array->getSpace());
-
isl::set AccessSet = AccessUSet.extract_set(Array->getSpace());
isl::local_space LS = isl::local_space(Array->getSpace());