[llvm-dev] How to solve circular dependency between passes
Michael Kruse via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 8 09:21:44 PST 2020
This sounds like a typical 'phase ordering' problem and unfortunately
there is no solution to it without improving the passes themselves.
For your case IndVarSimplify and LICM are considered canonicalization
passes. Any pass should be designed to work best on canonicalized IR.
In practice, however, this is not true . In particular,
LoopInterchange is sensitive to dependencies created by LICM hoisting
code out of the inner loop. I don't think it is solvable in a
satisfying with the current pass infrastructure.
Am Di., 7. Jan. 2020 um 16:34 Uhr schrieb Jimmy Zhongduo Lin via
llvm-dev <llvm-dev at lists.llvm.org>:
> I am working on a case for loop interchange, and discovered that to enable loop interchange in my case, I have to run it before LICM and after Induction Variable Simplify. So the good order for me is: Induction Variable Simplify -> Loop Interchange -> LICM. However, I also found cases where Induction Variable Simplify works better after LICM, and running Induction Variable Simplify after LICM again still results in suboptimal result.
> Has anyone encountered similar dependency problem when reordering passes? If so, can you kindly share your solution or suggestion?
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev