[PATCH] D72230: [NFCI][LoopUnrollAndJam] Changing LoopUnrollAndJamPass to a function pass.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 12:49:05 PST 2020


dmgreen added a comment.

If UnJ needs loops in LoopSimplify form then it should request (or enforce) that loops are in that form. I think it can be done with `AU.addRequiredID(LoopSimplifyID);` (and maybe a DEPENDENCY on LoopSimplify?) That should hopefully mean that the tests don't need these adjustments.

Do we have any tests for the new pass manager? I feel we would have added some, but I don't see any here.



================
Comment at: llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp:441
+    Loop *L = Worklist.pop_back_val();
+    formLCSSA(*L, DT, &LI, &SE);
+    LoopUnrollResult Result =
----------------
I feel like we may need LCSSA on the outermost loops before calling UnJ on the inner one, from the loop of the check on line 576 of LoopUnrollAndJam.cpp. I'm not sure though, I didn't see it crash anywhere, but we likely don't have a good testcase for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72230





More information about the llvm-commits mailing list