[PATCH] D12499: Replace ScalarEvolution based domain generation

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 08:59:07 PDT 2015


Meinersbur added inline comments.

================
Comment at: lib/Support/SCEVValidator.cpp:356
@@ +355,3 @@
+    //              fixed we need to enable this handling again.
+    return ValidatorResult(SCEVType::INVALID);
+    /*
----------------
Meinersbur wrote:
> Adding a boolean parameter to SCEVValidator's constructor to discriminate the two cases?
> 
> I don't get why it's not compatible for domains.
We could generate a condition inside the body

    for (int i = 0; i < n; i+=1) {
       if (i % 3 <= 1)
         continue;
      // stmt(i)
    }

for a domain s.a. { [i] : 0 <= i < n, i - floord(i,3) * 3 <= 1 } 

Alternatively, map from sequential loop counter to domain index:

    for (int i_seq = 0; i_seq < (n*2/3); i_seq+=1) {
       int i = i_seq / 2 * 3 + i_seq % 2;
      // stmt(i)
    }

(probably some edge-case errors in this example)


http://reviews.llvm.org/D12499





More information about the llvm-commits mailing list