[llvm] r208017 - Improve 'tail' call marking in TRE. A bootstrap of clang goes from 375k calls marked tail in the IR to 470k, however this improvement does not carry into an improvement of the call/jmp ratio on x86. The most common pattern is a tail call + br to a block with nothing but a 'ret'.

Diego Novillo dnovillo at google.com
Fri May 9 04:14:21 PDT 2014

On Thu, May 8, 2014 at 7:12 PM, Nick Lewycky <nlewycky at google.com> wrote:

> On 7 May 2014 09:24, Diego Novillo <dnovillo at google.com> wrote:
>> On Mon, May 5, 2014 at 7:59 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>>> +        if (SafeToTail) {
>>> +          F.getContext().emitOptimizationRemark(
>>> +              "tailcallelim", F, CI->getDebugLoc(),
>>> +              "found readnone tail call candidate");
>> You can use DEBUG_TYPE here, can you not?
> 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.

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.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140509/d20512aa/attachment.html>

More information about the llvm-commits mailing list