<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 30, 2014 at 3:05 PM, Gerolf Hoflehner <span dir="ltr"><<a href="mailto:ghoflehner@apple.com" target="_blank">ghoflehner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":aqz" class="a3s" style="overflow:hidden">Patch for function cloning to inline all blocks whose address is taken<br>

<br>
Not all address taken blocks get inlined. The reason is<br>
that a blocks new address is known only when it is cloned. But e.g.<br>
a branch instruction in a different block could need that address earlier<br>
while it gets cloned. The solution is to collect the set of all<br>
blocks that can potentially get inlined and compute a new block address<br>
up front. Then clone and cleanup.</div></blockquote></div><br>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.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">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?</div>
</div>