diff options
author | Tobias Grosser <tobias@grosser.es> | 2018-07-17 06:33:34 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2018-07-17 06:33:34 +0000 |
commit | 9778ebe29dce7b9f61e951143333b7965b0dd853 (patch) | |
tree | 1c82dd967e2e512206f7dc801e599aa019c348c6 /polly/lib | |
parent | ff5ac081adb5e8791540dc73dd9154dfb0fe061c (diff) |
[MaximalStaticExpansion] Replace isl foreach calls with for loops
Diffstat (limited to 'polly/lib')
-rw-r--r-- | polly/lib/Transform/MaximalStaticExpansion.cpp | 17 |
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. |