<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 8, 2014 at 7:12 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank" class="cremed">nlewycky@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On 7 May 2014 09:24, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank" class="cremed">dnovillo@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Mon, May 5, 2014 at 7:59 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank" class="cremed">nicholas@mxc.ca</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
+        if (SafeToTail) {<br>
+          F.getContext().emitOptimizationRemark(<br>
+              "tailcallelim", F, CI->getDebugLoc(),<br>
+              "found readnone tail call candidate");<br></blockquote><div><br></div></div><div>You can use DEBUG_TYPE here, can you not?</div></div></div></div></blockquote><div><br></div></div><div>I could but I'd rather not? It's the pass name and that's spelled out in other places it's used in this file. If emitOptimizationRemark is compiled away when DEBUG is disabled, then it'd be clear that I'm supposed to use it. Otherwise it seems like I'm using what ought to be our interface to the DEBUG mechanism for something else.</div>

</div></div></div></blockquote><div><br></div><div>OK, I don't really mind. I've been using DEBUG_TYPE, but long term we need a better mechanism. Perhaps we ought to use PassInfo::getPassName()?  Most passes seem to fill it with the same string as DEBUG_TYPE, anyway.</div>
<div><br></div><div>Eventually, it may be useful to have a -list-passes which users can query to know what strings to use with -Rpass. Does the pass manager expose this now?</div><div><br></div><div><br></div><div>Diego.</div>

</div></div></div>