<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 6/24/20 11:21 AM, Matt Arsenault via
llvm-dev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:C20979A8-6B15-44D0-A665-70933E3BA002@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 24, 2020, at 14:13, Arthur Eubanks via
llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org"
class="" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi,
<div class=""><br class="">
</div>
<div class="">As part of new pass manager work, I've been
trying to get something like `opt -foo` working under
the NPM, where `foo` is the name of a pass.</div>
<div class=""><br class="">
</div>
<div class="">In the past there's been no reason to keep
the names of passes consistent between NPM and legacy
PM. But now there is a reason to make them match, so
that we don't have to touch every single test that uses
`opt`.</div>
<div class=""><br class="">
</div>
<div class="">There are a couple of names that don't match
though, for example the "basic alias analysis" pass is
named "basicaa" under the legacy PM<br class="">
<font class="" face="monospace">INITIALIZE_PASS_BEGIN(BasicAAWrapperPass,
"basicaa",<br class="">
"Basic Alias Analysis (stateless
AA impl)", true, true)</font><br class="">
</div>
<div class="">but named "basic-aa" under the NPM</div>
<div class=""><font class="" face="monospace">FUNCTION_ALIAS_ANALYSIS("basic-aa",
BasicAA())<br class="">
</font></div>
<div class="">. Almost all the other AA passes have a dash
in them so I think it makes sense to rename "basicaa"
-> "basic-aa".</div>
<div class=""><br class="">
</div>
<div class="">Is there accepted wisdom on renaming pass
names? Is a pass name a stable interface? When is it ok
to rename a pass? If there are 800 usages of a flag,
should I rename them atomically?</div>
</div>
</div>
</blockquote>
</div>
<div class=""><br class="">
</div>
<div class="">I think the pass naming scheme needs a lot of work.
The naming conventions seem random at times. For instance, I can
never remember how to refer to PrologEpilogInserter. The
DEBUG_TYPE name is “prologepilog”, the pass class name is “PEI”.
I would expect this to be prolog-epilog-inserter to match the
file and formal pass name, and consistently use dashes as word
separators.</div>
</blockquote>
Can I suggest we allow aliases? We can except all of these names,
pick a canonical name, migrate tests, and only remove the aliases
once the new canonical names are widely known. <br>
<blockquote type="cite"
cite="mid:C20979A8-6B15-44D0-A665-70933E3BA002@gmail.com">
<div class=""><br class="">
</div>
<div class="">Unfortunately, I recently discovered some
optimization pass remarks expose pass names to the user (since
you use the name of the pass to filter relevant remarks). I’m
not sure how stable this is supposed to be though.</div>
<div class=""><br class="">
</div>
<div class="">-Matt</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</body>
</html>