[LLVMdev] Greedy register allocation
David A. Greene
greened at obbligato.org
Tue May 3 16:08:56 PDT 2011
Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>> That was my initial reaction. Splitting should have at least
>> rematerialized the value just before header2. That should significantly
>> improve things. This is a classic motivational case for live range
>> splitting.
>
> Well, not really. Note there there are plenty of registers available
> and no spilling is neccessary.
Oh, I misunderstood then. Thanks for clarifying.
> It's just that an REX prefix is required on some instructions when
> %xmm8 is used. Is it worth it to undo LICM just for that? In this
> case, probably. In general, no.
Ah, so you're saying the regression is due to the inner loop icache
footprint increasing. Ok, that makes total sense to me. I agree this
is a difficult thing to get right in a general sort of way. Perhaps the
CostPerUse (or whatwever heuristics use it) can factor in the loop body
size so that tight loops are favored for smaller encodings.
-Dave
More information about the llvm-dev
mailing list