[llvm-dev] Order of LLVM Transform passes?
Hiroshi Yamauchi via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 6 10:03:39 PST 2020
On Fri, Mar 6, 2020 at 8:05 AM Shishir V Jessu via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I am writing an LLVM Transform pass whose behavior may need to change
> depending on whether a different pass is run before or after it. How can I
> find out which Transform passes are run in which order when I run opt?
If you run "opt -print-after-all ...", it will dump the IR after each pass.
If you grep the output by "*** IR Dump", it should show the order (but note
the order may change.)
> Further, I assume that Analysis passes are always run prior to Transform
> passes - is this correct? Thanks!
The analyses that a pass depends on will be run prior to it, right before
the pass if the previous pass invalidates them, or some time earlier if
they are preserved by the preceding passes.
> Shishir Jessu
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev