<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>O3 flto compile time I measured for the llvm test suite (and other benchmarks) looked fine. The biggest jump I had seen was a > 6% increase for a SPEC’95 benchmark (perl), which went away in a rerun. Also the perl benchmark in CINT2000 and CINT2006 did not show any compile-time regression. </div><div><br></div><div>I can’t say for sure that there is no compile-time impact. My measurement setup is not perfect even though I run single thread, set the proper states etc,</div><div>but there is still a lot of compile-time variability from run to run especially on the fast compiles. More importantly my setup has no track record of finding a regression</div><div>yet and I won’t attribute this to my high quality coding :-). But I”m positive there can’t be a big impact from this patch.</div><div>If you notice any issues due to unduly increased clone time please let me know.</div><div><br></div><div>Cheers</div><div>Gerolf</div><div><br></div><br><div><div>On Apr 30, 2014, at 7:38 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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>
</blockquote></div><br></body></html>