[llvm-dev] RFC: Switching to the new pass manager by default

Philip Pfaffe via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 23 05:23:00 PDT 2017


Hi Serge,

2017-10-23 11:38 GMT+02:00 serge guelton via llvm-dev <
llvm-dev at lists.llvm.org>:

> Hi Chandler,
>
> Here at QuarksLab we're also doing an update after each release so I
> cannot test without significant effort, still I'm interested in the
> answer to the following question:
>
> In our compiler, we're sometime spawning a (legacy) passmanager in a pass
> (so
> within an exisiting passmanager) when we want some dynamic pass
> scheduling based on some analysis or user input.
>

The PassManager absolutely supports this. In fact, a PassManager is just a
pass, so it's kind of a first class feature. There are some limitations
however. The main one is that you may not invalidate nor run analyses of
"Outer" IRUnits. E.g. a FunctionPass can not invalidate Module analyses or
request the results of module analyses that weren't run before. As a
consequence, running for instance a module pipeline within a function
pipeline is asking for trouble.

Legacy passmanager forces the order between function pass and module
> pass, they can't be interleaved properly, so we actually had to spawn
> several PM instances one after the other to get a fine grain control over
> the pass ordering.
>
Interleaving is possible. While nesting is not fully supported (see above),
you may freely compose pipelines.  E.g. a ModulePassManager is itself a
module pass. I suggest taking a look at PassBuilder and especially its the
documentation, to get a good understanding of how pipeline setup can be
done.

Cheers,
Philip


> How does the new pass manager interacts with these two use cases?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171023/f55a1fce/attachment.html>


More information about the llvm-dev mailing list