<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">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_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>