[polly] r337242 - [ForwardOpTree] Replace isl foreach calls with for loops
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 16 23:33:31 PDT 2018
Author: grosser
Date: Mon Jul 16 23:33:31 2018
New Revision: 337242
URL: http://llvm.org/viewvc/llvm-project?rev=337242&view=rev
Log:
[ForwardOpTree] Replace isl foreach calls with for loops
Modified:
polly/trunk/lib/Transform/ForwardOpTree.cpp
Modified: polly/trunk/lib/Transform/ForwardOpTree.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ForwardOpTree.cpp?rev=337242&r1=337241&r2=337242&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ForwardOpTree.cpp (original)
+++ polly/trunk/lib/Transform/ForwardOpTree.cpp Mon Jul 16 23:33:31 2018
@@ -243,27 +243,27 @@ private:
// (i.e. not: { Dom[0] -> A[0]; Dom[1] -> B[1] }).
// Look through all spaces until we find one that contains at least the
// wanted statement instance.s
- MustKnown.foreach_map([&](isl::map Map) -> isl::stat {
+ for (isl::map Map : MustKnown.get_map_list()) {
// Get the array this is accessing.
isl::id ArrayId = Map.get_tuple_id(isl::dim::out);
ScopArrayInfo *SAI = static_cast<ScopArrayInfo *>(ArrayId.get_user());
// No support for generation of indirect array accesses.
if (SAI->getBasePtrOriginSAI())
- return isl::stat::ok; // continue
+ continue;
// Determine whether this map contains all wanted values.
isl::set MapDom = Map.domain();
if (!Domain.is_subset(MapDom).is_true())
- return isl::stat::ok; // continue
+ continue;
// There might be multiple array elements that contain the same value, but
// choose only one of them. lexmin is used because it returns a one-value
// mapping, we do not care about which one.
// TODO: Get the simplest access function.
Result = Map.lexmin();
- return isl::stat::error; // break
- });
+ break;
+ }
return Result;
}
More information about the llvm-commits
mailing list