<div dir="ltr">Ah you're right. And now I remember that it was intentionally submitted after the branch.<div>So s/12/13/</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 22, 2021 at 3:22 PM Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="gmail-m_-6625330523912003664WordSection1">
<p class="MsoNormal">I don’t think the new PM switch is part of LLVM 12. The change to make it the default landed on February 3rd, which was after the branch cut. If you examine llvm/CMakeLists.txt on the release/12.x branch, you’ll also see that ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER
 still defaults to FALSE.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-left:0.5in"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> on behalf of Arthur Eubanks via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Reply-To: </b>Arthur Eubanks <<a href="mailto:aeubanks@google.com" target="_blank">aeubanks@google.com</a>><br>
<b>Date: </b>Thursday, April 22, 2021 at 2:18 PM<br>
<b>To: </b>llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject: </b>[llvm-dev] Legacy PM deprecation for optimization pipeline timeline<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">Splitting this off from the other thread.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:0.5in">We should have a deprecation timeline that revolves around the major releases. I'd say we announce the legacy PM for the optimization pipeline to be deprecated the major release after the new PM has been the default.
 Looks like the new PM switch made it into LLVM 12.<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:0.5in"><br>
The major blocker right now is that the C API doesn't have hooks into the new PM infrastructure. llvm/include/llvm-c/Transforms/PassManagerBuilder.h should be fairly straightforward to port to the new PM, but the API to add individual passes (e.g. llvm/include/llvm-c/Transforms/Scalar.h)
 needs to distinguish between the different types of passes, e.g. module vs function pass. The new PM has explicit pass nesting, so we'll need to make sure that we add a function pass to a function pass manager. Or we could simplify things and force each pass
 added via the C API to run in isolation (e.g. two adjacent function passes would run completely separately rather than being interleaved function-by-function), which doesn't match how pipelines are constructed everywhere else, but it's already an adhoc API.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.5in">At some point after the deprecation announcement we should start cleaning up tests for passes in the optimization pipeline to use `opt -passes=foo` rather than `opt -foo`.<u></u><u></u></p>
</div>
</div>
</div>
</div>

</blockquote></div>