<div dir="ltr">Hi Serge,<div class="gmail_extra"><br><div class="gmail_quote">2017-10-23 11:38 GMT+02:00 serge guelton via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chandler,<br>
<br>
Here at QuarksLab we're also doing an update after each release so I<br>
cannot test without significant effort, still I'm interested in the<br>
answer to the following question:<br>
<br>
In our compiler, we're sometime spawning a (legacy) passmanager in a pass (so<br>
within an exisiting passmanager) when we want some dynamic pass<br>
scheduling based on some analysis or user input.<br></blockquote><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Legacy passmanager forces the order between function pass and module<br>
pass, they can't be interleaved properly, so we actually had to spawn<br>
several PM instances one after the other to get a fine grain control over<br>
the pass ordering.<br></blockquote><div>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. </div><div><br></div><div>Cheers,</div><div>Philip</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
How does the new pass manager interacts with these two use cases?<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div>