[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
Wed May 7 09:24:25 PDT 2014


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?

This seems to be a transformation remark, but the text implies that it's an
analysis remark. I'm adding support for -Rpass-analysis shortly, so I want
to make sure whether this will fall under the category of 'applied
optimization' or 'analysis result' (which will have a different call,
something like emitOptimizationAnalysisRemark().


> +  for (CallInst *CI : DeferredTails) {
> +    if (Visited[CI->getParent()] != ESCAPED) {
> +      // If the escape point was part way through the block, calls after
> the
> +      // escape point wouldn't have been put into DeferredTails.
> +      F.getContext().emitOptimizationRemark(
> +          "tailcallelim", F, CI->getDebugLoc(), "found tail call
> candidate");
> +      CI->setTailCall();
> +      Modified = true;
>

Same question here.



Thanks. Diego.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140507/f2054f8f/attachment.html>


More information about the llvm-commits mailing list