[polly] r337245 - [ZoneAlgo] Replace isl foreach calls with for loops
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 16 23:33:41 PDT 2018
Author: grosser
Date: Mon Jul 16 23:33:41 2018
New Revision: 337245
URL: http://llvm.org/viewvc/llvm-project?rev=337245&view=rev
Log:
[ZoneAlgo] Replace isl foreach calls with for loops
Modified:
polly/trunk/lib/Transform/ZoneAlgo.cpp
Modified: polly/trunk/lib/Transform/ZoneAlgo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ZoneAlgo.cpp?rev=337245&r1=337244&r2=337245&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ZoneAlgo.cpp (original)
+++ polly/trunk/lib/Transform/ZoneAlgo.cpp Mon Jul 16 23:33:41 2018
@@ -252,13 +252,10 @@ static bool isMapToUnknown(const isl::ma
isl::union_map polly::filterKnownValInst(const isl::union_map &UMap) {
isl::union_map Result = isl::union_map::empty(UMap.get_space());
- isl::stat Success = UMap.foreach_map([=, &Result](isl::map Map) -> isl::stat {
+ for (isl::map Map : UMap.get_map_list()) {
if (!isMapToUnknown(Map))
Result = Result.add_map(Map);
- return isl::stat::ok;
- });
- if (Success != isl::stat::ok)
- return {};
+ }
return Result;
}
@@ -944,12 +941,12 @@ isl::boolean ZoneAlgorithm::isNormalized
isl::boolean ZoneAlgorithm::isNormalized(isl::union_map UMap) {
isl::boolean Result = true;
- UMap.foreach_map([this, &Result](isl::map Map) -> isl::stat {
+ for (isl::map Map : UMap.get_map_list()) {
Result = isNormalized(Map);
if (Result.is_true())
- return isl::stat::ok;
- return isl::stat::error;
- });
+ continue;
+ break;
+ }
return Result;
}
More information about the llvm-commits
mailing list