diff options
author | Tobias Grosser <tobias@grosser.es> | 2018-07-17 06:16:58 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2018-07-17 06:16:58 +0000 |
commit | b50ed31133f79e6d35acbf8ba5e3d7ae092143df (patch) | |
tree | e133aea95d4bbb25e5e970e9b77b56f5c424b788 /polly | |
parent | da4c3b09c2362626be29c5df3a2faeca50a2cd42 (diff) |
[FlattenAlgo] Replace more isl foreach calls with for loops
This time we replace for loops where the return isl::stat::error has
been used to carry status information.
There are still two uses of foreach remaining as we do not have a
corresponding for implementation for pw_aff functions.
Diffstat (limited to 'polly')
-rw-r--r-- | polly/lib/Transform/FlattenAlgo.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/polly/lib/Transform/FlattenAlgo.cpp b/polly/lib/Transform/FlattenAlgo.cpp index 82cce44c7a9..6a22a49d7b7 100644 --- a/polly/lib/Transform/FlattenAlgo.cpp +++ b/polly/lib/Transform/FlattenAlgo.cpp @@ -54,20 +54,19 @@ bool isVariableDim(const isl::basic_map &BMap) { /// Whether Map's first out dimension is no constant nor piecewise constant. bool isVariableDim(const isl::map &Map) { - return Map.foreach_basic_map([](isl::basic_map BMap) -> isl::stat { + for (isl::basic_map BMap : Map.get_basic_map_list()) if (isVariableDim(BMap)) - return isl::stat::error; - return isl::stat::ok; - }) == isl::stat::ok; + return false; + + return true; } /// Whether UMap's first out dimension is no (piecewise) constant. bool isVariableDim(const isl::union_map &UMap) { - return UMap.foreach_map([](isl::map Map) -> isl::stat { + for (isl::map Map : UMap.get_map_list()) if (isVariableDim(Map)) - return isl::stat::error; - return isl::stat::ok; - }) == isl::stat::ok; + return false; + return true; } /// Compute @p UPwAff - @p Val. |