<div dir="ltr">A small nit, please use `opt -passes=foo` rather than `opt -foo -enable-new-pm` to run tests against the new PM. `-enable-new-pm` basically attempts to rewrite `opt -foo` into `opt -passes=foo`, and the new PM custom pass pipeline creation is designed around parsing the `-passes=`. At some point `-enable-new-pm` should go away and all tests should use `-passes=`.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 22, 2021 at 10:22 AM Philip Reames 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>I ran across a case like this recently. In that particular case,
it was an IPO related test and the root issue was a difference in
how the pass managers handled declarations in CGSCC passes.
(There was a discussion on llvm-dev on the topic if you're
interested.)</p>
<p>The practical takeaway is that certain tests needed
-enable-new-pm explicitly set or disabled. With the options
parsing for (e.g. -function-attrs) implicitly selecting the
currently enabled (in build config) pass manager, some tests need
to be explicitly pinned to one. <br>
</p>
<p>I would advocate for allowing -enable-new-pm=1 to be added to
tests where relevant, and making no systematic attempt to keep all
tests running on the old pm. As mentioned already downthread,
there will be an increasing class of behavior not supported on the
new pm.</p>
<p>I also think we should explicitly set of deprecation timeline for
the old pm in the main pipeline, but that's a separate
discussion. I can't wait until the day we rename LegacyPM to
CodeGenPM. :)</p>
<p>Philip<br>
</p>
<div>On 4/22/21 8:33 AM, Snider, Todd via
llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal">Hello All,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">My development group has been maintaining a
downstream version of the monorepo that stays in sync with the
upstream “main” branch, but we are still using the legacy pass
manager in our local copy of the monorepo.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We’ve recently encountered a few instances
of lit tests that are failing when run with the legacy pass
manager version of opt, but pass when run with the new pass
manager version of opt.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The situation raises a couple of questions:<u></u><u></u></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoNormal">Is the
legacy pass manager behavior being adequately tested by the
buildbots?<u></u><u></u></li>
<li class="MsoNormal">What
expectation should there be that legacy pass manager
behavior will be maintained in light of changes made to code
that affects both the new pass manager version and the
legacy pass manager version of opt?<u></u><u></u></li>
</ul>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I suspect that my group is not the only
ones trying to stay in sync with the upstream LLVM main branch
and keep using the legacy pass manager, and I anticipate the
only long-term remedy for our situation is to move to using
the new pass manager as soon as we can.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thoughts?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Todd Snider<u></u><u></u></p>
<p class="MsoNormal">Texas Instruments Incorporated<u></u><u></u></p>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>