[PATCH] D32249: [PartialInl] Enhance partial inliner to handle more complex conditions

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 13:50:04 PDT 2017


On Thu, Apr 20, 2017 at 1:48 PM, Easwaran Raman via Phabricator <
reviews at reviews.llvm.org> wrote:

> eraman added a comment.
>
>
>
> > Yes, i was thinking adding a limit on the chain length as an option.
> Probably do this a a follow up -- which also needs to look at profile
> data.  (Note that Partialinlininer is currently not enabled in any
> optimization pipeline yet).
>
> I think instruction count will be better limit than chain length.
>

yep.


>
>
>
> ================
> Comment at: lib/Transforms/IPO/PartialInlining.cpp:193
> +    }
> +  } while (true);
> +
> ----------------
> This will look cleaner if this is made to while (CommonSucc) and peel the
> else part outside of the while loop (since you always break from there).
> Perhaps you can even peel the first iteration out of the loop: first find
> the candidate non-return block, then walk the chain in a loop as long as
> one successor equals non-return block and the other succesor has a single
> predecessor. Some more comments will also increase readability.
>
>
This part will be rewritten to handle more general cases.

David



>
> https://reviews.llvm.org/D32249
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/1d42a444/attachment.html>


More information about the llvm-commits mailing list