<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 24, 2020 at 4:48 PM Matt Arsenault <<a href="mailto:arsenm2@gmail.com">arsenm2@gmail.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 style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Jun 24, 2020, at 19:17, Arthur Eubanks <<a href="mailto:aeubanks@google.com" target="_blank">aeubanks@google.com</a>> wrote:</div><br><div><br><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr" class="gmail_attr">On Wed, Jun 24, 2020 at 12:23 PM Philip Reames <<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.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><p><br></p><div>On 6/24/20 11:21 AM, Matt Arsenault via llvm-dev wrote:<br></div><blockquote type="cite"><br><div><br><blockquote type="cite"><div>On Jun 24, 2020, at 14:13, Arthur Eubanks via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr">Hi,<div><br></div><div>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><br></div><div>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><br></div><div>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><font face="monospace">INITIALIZE_PASS_BEGIN(BasicAAWrapperPass, "basicaa",<br>                     <span> </span>"Basic Alias Analysis (stateless AA impl)", true, true)</font><br></div><div>but named "basic-aa" under the NPM</div><div><font face="monospace">FUNCTION_ALIAS_ANALYSIS("basic-aa", BasicAA())<br></font></div><div>. Almost all the other AA passes have a dash in them so I think it makes sense to rename "basicaa" -> "basic-aa".</div><div><br></div><div>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><br></div><div>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. <span> </span><br></div></blockquote><div>An alias sounds good. </div></div></div></blockquote><br></div><div>In what contexts? I think aliases for the handful of potentially end user facing cases may be acceptable, but would worry about adding aliases everywhere. I think renaming things directly referring to a pass can be done pretty easily with a simple script?</div></div></blockquote><div>My plan was to add an alias in PassNameParser, switch over all references to use the new one, then remove the alias. In order to avoid one change that touches 800 files. Also any rollbacks are easier.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><br></div><div>-Matt</div><br></div></blockquote></div></div>