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

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 22:25:35 PST 2020


Whitney added a comment.

In D72230#1808620 <https://reviews.llvm.org/D72230#1808620>, @dmgreen wrote:

> 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.


In https://groups.google.com/forum/m/?fbclid=IwAR3jQc7xQaWv2ovAvFTNuZXFKvCBo5lRx-vt_kyomdmcBgYpcRy5YcaDa0s#!topic/llvm-dev/0K8gEZ22VOE,
`You cannot reliably use the addRequired() method to force a transform pass to run before another pass`
`The addRequired method is designed to tell the PassManager which *analysis* passes to run before your pass.`

The discussion in the link above sounds like using `addRequiredID` on a transformation pass is not a good idea. Beside that, I don't know a way to require transformations to run before a pass in the new pass manager.
I suggested to give up on loops that are not simplified or loop nests that are not in LCSSA.  And change the LITs to be all in simplified and LCSSA form. In additional, add the two transformation passes before LoopUnrollAndJamPass in the pipeline. What do you think?


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