<div dir="ltr">You can also look at how opt sets up the pipeline: <a href="https://github.com/llvm-mirror/llvm/blob/master/tools/opt/NewPMDriver.cpp#L257">https://github.com/llvm-mirror/llvm/blob/master/tools/opt/NewPMDriver.cpp#L257</a><div><br></div><div>Cheers,</div><div>Philip</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 24, 2018 at 9:02 AM Matthieu Brucher <<a href="mailto:matthieu.brucher@gmail.com">matthieu.brucher@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks a lot!<div>It seems that there is only one piece of code describing this online, and it's part of clang!</div><div><br></div><div>Cheers,</div><div><br></div><div>Matthieu</div></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 23 juil. 2018 à 09:34, Philip Pfaffe <<a href="mailto:philip.pfaffe@gmail.com" target="_blank">philip.pfaffe@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Matthieu,</div><div><br></div>You need to set up the different types of AnalysisManagers as well, just as you did with ModuleAM. Then, you need to cross register them with each other by calling `passBuilder.crossRegisterProxies`.<div><br></div><div><div>Cheers,<br></div><div>Philip</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 21, 2018 at 9:13 PM Matthieu Brucher via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm trying to build passes with the PassBuilder to optimize the result of MCJIT (I assume, this is a requirement for performance).</div><div><br></div><div>So I do this:</div><div>    llvm::PassBuilder passBuilder;<br>    llvm::ModulePassManager modulePassManager = passBuilder.buildPerModuleDefaultPipeline(llvm::PassBuilder::OptimizationLevel::O3);<br>    llvm::ModuleAnalysisManager moduleAnalysisManager;<br>    passBuilder.registerModuleAnalyses(moduleAnalysisManager);<br>    modulePassManager.run(*module, moduleAnalysisManager);</div><div><br></div><div>with module being a pointer to an LLVM module.</div><div>Unfortunately, the moduleAnalysisManager has only the module passes, but not the function ones that are wrapped with the proxy class. Is there anything I missed or a up-to-date tutorial on this?</div><div>I couldn't find an answer on Stackoverflow (where a similar question was asked).<br></div><div><br></div><div>Cheers,<br></div><div><br></div><div>Matthieu<br></div><div>-- <br><div dir="ltr" class="m_-8455803563568151603m_-2216174437146751517m_1541128080929498670m_-915895688008368313gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Quantitative analyst, Ph.D.<br>Blog: <a href="http://blog.audio-tk.com/" target="_blank">http://blog.audio-tk.com/</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a></div></div></div></div></div></div></div>
</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-8455803563568151603gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Quantitative analyst, Ph.D.<br>Blog: <a href="http://blog.audio-tk.com/" target="_blank">http://blog.audio-tk.com/</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a></div></div></div></div></div>
</blockquote></div>