[llvm] r207713 - Patch for function cloning to inline all blocks whose address is taken

Chandler Carruth chandlerc at google.com
Wed Apr 30 19:38:27 PDT 2014


On Wed, Apr 30, 2014 at 3:05 PM, Gerolf Hoflehner <ghoflehner at apple.com>wrote:

> Patch for function cloning to inline all blocks whose address is taken
>
> Not all address taken blocks get inlined. The reason is
> that a blocks new address is known only when it is cloned. But e.g.
> a branch instruction in a different block could need that address earlier
> while it gets cloned. The solution is to collect the set of all
> blocks that can potentially get inlined and compute a new block address
> up front. Then clone and cleanup.
>

This could introduce a lot of compile time overhead. Did you measure
anything to check for that? The problem is that basic blocks are a
reasonably sparse linked list, so walking them twice is a lot of cache
churning.

As an alternative (that also shouldn't have the problem with pruning), did
you consider storing the set of block addresses which need to be updated,
and fix those operands after you finish cloning?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/3ffc9aaf/attachment.html>


More information about the llvm-commits mailing list