<div dir="ltr">+ Vedant: what do you think about the last point, since Debugify is also related?<br><div><div class="gmail_extra"><br clear="all"><div><div class="m_-4988062535238603916gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div>
<br><div class="gmail_quote">On Thu, Apr 19, 2018 at 6:14 PM, Philip Pfaffe <span dir="ltr"><<a href="mailto:philip.pfaffe@gmail.com" target="_blank">philip.pfaffe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Son,<div><br></div><div>PassManagerBuilder is used to populate legacy PassManagers.  That role is taken over by PassBuilder for new-PM passes.</div><div><br></div><div>Cheers,</div><div>Philip</div></div><div class="m_-4988062535238603916HOEnZb"><div class="m_-4988062535238603916h5"><div class="gmail_extra"><br><div class="gmail_quote">2018-04-18 13:40 GMT+02:00 Son Tuan VU <span dir="ltr"><<a href="mailto:sontuan.vu119@gmail.com" target="_blank">sontuan.vu119@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Philip,<div><br></div><div>Thank you for your reply. So what would be the right way/API to write out-of-tree pass? I've been using <b>PassManagerBuilder</b>, which requires a callback refering to <b>legacy::PassManagerBase</b>, so I guess this will be no longer the good way to go?</div></div><div class="gmail_extra"><span class="m_-4988062535238603916m_2100459851225606617HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_-4988062535238603916m_2100459851225606617m_-4342999132220212639gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Son Tuan Vu</div></div></div></font></span><div><div class="m_-4988062535238603916m_2100459851225606617h5">
<br><div class="gmail_quote">On Tue, Apr 17, 2018 at 6:06 PM, Philip Pfaffe <span dir="ltr"><<a href="mailto:philip.pfaffe@gmail.com" target="_blank">philip.pfaffe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Son,<div><br></div><div>I have an answer to your first question:<br><div><br><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>1, What are the differences between <b>LegacyPassManager</b> and <b>PassManager</b>?  I see that <b>opt</b> uses the former most of the times while the latter is used via <b>PassBuilder</b> API when an user wants to build her own pipeline, but I have no idea why so. What to use and when to use it is not clear to me.</div></div></blockquote></span><div>PassManager is the result of a long going effort to replace the default pass manager of opt and clang. Here's the original RFC containing the motivation: <a href="http://lists.llvm.org/pipermail/llvm-dev/2012-July/051643.html" target="_blank">http://lists.llvm.org/pipermai<wbr>l/llvm-dev/2012-July/051643.ht<wbr>ml</a></div><div><br></div><div>LegacyPassManager is currently still the default, but we are really close to switching over the the new one. Both opt and clang have switches to enable the new one, by calling `opt -passes="...."` or `clang -fexperimental-new-pass-manage<wbr>r`. PassBuilder is essentially a big factory to produce PassManager and AnalysisManager objects for the passes and analyses included in core LLVM. If you develop analyses and passes, I'd suggest doing so against the new PM, especially if you plan on upstreaming your work.</div><div><br></div><div>Cheers,</div><div>Philip</div></div></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>