summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2018-07-17 06:33:34 +0000
committerTobias Grosser <tobias@grosser.es>2018-07-17 06:33:34 +0000
commit3867bae74beddfe9b3ebaca16fcff0cbb952b4b7 (patch)
treeb81657e91b2bebdf3656a891d9e463cb892ff871 /polly/lib/Transform
parent91f851b11a9a638659177929cd3291e0d13488e1 (diff)
downloadbcm5719-llvm-3867bae74beddfe9b3ebaca16fcff0cbb952b4b7.tar.gz
bcm5719-llvm-3867bae74beddfe9b3ebaca16fcff0cbb952b4b7.zip
[MaximalStaticExpansion] Replace isl foreach calls with for loops
llvm-svn: 337243
Diffstat (limited to 'polly/lib/Transform')
-rw-r--r--polly/lib/Transform/MaximalStaticExpansion.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/polly/lib/Transform/MaximalStaticExpansion.cpp b/polly/lib/Transform/MaximalStaticExpansion.cpp
index 6408abe89ac..2157db29549 100644
--- a/polly/lib/Transform/MaximalStaticExpansion.cpp
+++ b/polly/lib/Transform/MaximalStaticExpansion.cpp
@@ -140,11 +140,10 @@ isl::union_map MaximalStaticExpander::filterDependences(
isl::union_map MapDependences = isl::union_map::empty(S.getParamSpace());
- Dependences.foreach_map([&MapDependences, &AccessDomainId,
- &SAI](isl::map Map) -> isl::stat {
+ for (isl::map Map : Dependences.get_map_list()) {
// Filter out Statement to Statement dependences.
if (!Map.can_curry())
- return isl::stat::ok;
+ continue;
// Intersect with the relevant SAI.
auto TmpMapDomainId =
@@ -154,20 +153,18 @@ isl::union_map MaximalStaticExpander::filterDependences(
static_cast<ScopArrayInfo *>(TmpMapDomainId.get_user());
if (SAI != UserSAI)
- return isl::stat::ok;
+ continue;
// Get the correct S1[] -> S2[] dependence.
auto NewMap = Map.factor_domain();
auto NewMapDomainId = NewMap.domain().get_tuple_id();
if (AccessDomainId.get() != NewMapDomainId.get())
- return isl::stat::ok;
+ continue;
// Add the corresponding map to MapDependences.
MapDependences = MapDependences.add_map(NewMap);
-
- return isl::stat::ok;
- });
+ }
return MapDependences;
}
@@ -193,10 +190,8 @@ bool MaximalStaticExpander::isExpandable(
for (auto Write : Writes) {
auto MapDeps = filterDependences(S, Dependences, Write);
- MapDeps.foreach_map([&WriteDomain](isl::map Map) -> isl::stat {
+ for (isl::map Map : MapDeps.get_map_list())
WriteDomain = WriteDomain.add_set(Map.range());
- return isl::stat::ok;
- });
}
// For now, read from original scalar is not possible.
OpenPOWER on IntegriCloud