[PATCH] D24564: [LoopInterchange] Track all dependencies, not just anti dependencies.

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 11:35:45 PDT 2016


mssimpso added inline comments.

================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:120
@@ +119,3 @@
+        // Track Output, Flow, and Anti dependencies.
+        if (D->isOrdered()) {
+          DEBUG(StringRef DepType =
----------------
mcrosier wrote:
> mssimpso wrote:
> > I'm not sure this check is needed. The unordered dependences are input dependences (RAR). It looks like the RAR case is explicitly checked a few lines up.
> You are correct; I don't think we need the check.  I was thinking it would make the code a bit more readable.  However, I'm fine with changing it to an assert and reducing the indent..  I think that would accomplish the same thing.
An assert sounds good to me!

================
Comment at: test/Transforms/LoopInterchange/interchange.ll:592
@@ +591,3 @@
+for.cond.cleanup4:                                ; preds = %for.cond.cleanup8
+  %0 = load double, double* %arrayidx, align 8
+  call void @fn2(double %0)
----------------
It's probably not a bad idea to go ahead name the unnamed values here (like "%tmp0"), even though the rest of the tests here don't do this, to help prevent future breakage when making interleave more sophisticated.


https://reviews.llvm.org/D24564





More information about the llvm-commits mailing list