[PATCH] D136463: [SWP] Recognize mem carried dep with different base

Brendon Cahoon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 07:59:25 PDT 2022


bcahoon added inline comments.


================
Comment at: llvm/lib/CodeGen/MachinePipeliner.cpp:2301
   int D = 0;
-  if (!LoopDef || !TII->getIncrementValue(*LoopDef, D))
+  if (!LoopDefS || !TII->getIncrementValue(*LoopDefS, D))
     return true;
----------------
thopre wrote:
> bcahoon wrote:
> > I don't think this is needed because computeDelta performs this check. However, this isn't really related to your change...
> Do you want me to remove that then?
I don't think that needs to be done with this patch. Maybe a separate NFC patch.


================
Comment at: llvm/test/CodeGen/Hexagon/swp-carried-dep3.mir:14
+# CHECK-NEXT: SU(5)
+# CHECK-NEXT: SU(7)
+
----------------
thopre wrote:
> bcahoon wrote:
> > It looks like this is the same output without your patch. Can you add a test, or change this one, that shows the effect of the patch?
> I had checked that the code was being hit with the earlier version of the testcase but hadn't really understood the CHECK lines. I've verify that the updated test does indeed show a difference with and without the patch.
I don't think the nodeset that includes SU(4) and SU(6) is affected by by this patch?

I believe the patch eliminates Nodeset that includes SU(5) and SU(7) because the patch eliminates the need for a loop carried dependence. If so, then I think the test should check that the Nodeset with SU(5) and SU(7) is no longer created.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136463/new/

https://reviews.llvm.org/D136463



More information about the llvm-commits mailing list