[PATCH] D87045: [LoopNest] Handle loop-nest passes in LoopPassManager
Yuanfang Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 12:07:48 PDT 2020
ychen added a comment.
>From http://llvm.org/OpenProjects.html#llvm_loopnest, it was mentioned that
"If you decide to write it as a loop pass, then you are wasting compile time to traverse to your pass and return right away when the given loop is not the outermost loop."
Taking another look at the overall approach of this patch: currently for all loops (top-level or nested) in a function, when encountering a loop nest pass in LPM, a LoopNest is calculated and the loop nest pass is called with the computed LoopNest. Does this help compile-time in practice? It feels like it is essentially a loop pass that got passed a LoopNest as an incoming parameter that could be equally implemented (without this patch) with a normal loop pass that computes LoopNest by itself? This seems does not solve the problem quoted above.
To achieve that, I think we need to change FunctionToLoopPassAdaptor to dispatch top-level loops (aside from to regular loops and LPMs) to a LoopNestPassManager managing only loop nest passes or a loop nest pass directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87045/new/
https://reviews.llvm.org/D87045
More information about the llvm-commits
mailing list