[llvm-commits] Enable early dup for small bb, take2

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 15 09:09:41 PDT 2011


On Jun 15, 2011, at 8:39 AM, Bob Wilson wrote:

>> Ideally, the blocks the early pass is duplicating are the same ones the late one would. So this is really just cleaning it up.
> 
> Well, ideally, if the early and late passes are duplicating the same code, then we should get the same results.  Now we know that isn't true for register allocation, at least with linear scan, but it is a nice goal.  I wonder if there are other things besides that going on.

A priori, the register allocator should be able to do a better job with early tail dup. A variable that is live-in to a tail must be in the same register out of the predecessors, but that constraint disappears with tail-dup.

I don't know if it matters in practice.

But otherwise, both register allocators make many arbitrary decisions based on virtual register numbers and block layout, so you will never get identical results with early and late tail-dup.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110615/0b3df1e7/attachment.html>


More information about the llvm-commits mailing list