[LLVMdev] Heads up: Local register allocator going away
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Jun 8 07:08:20 PDT 2010
On Jun 8, 2010, at 1:24 AM, <Kalle.Raiskila at nokia.com> <Kalle.Raiskila at nokia.com> wrote:
> On Fri, 2010-06-04 at 20:05 +0200, Jakob Stoklund Olesen wrote:
>> You should fix SPUTargetLowering::LowerCall to make sure there is an unbroken chain of flag ties between CopyFromReg and BRASL. At least ARM, MBlaze, and Blackfin are doing this, if you need example code.
> Thanks for the tip. This got fixed in 105601.
> And with that, half of the problematic tests appearing with
> --regalloc=fast flag started working. Unfortunately the second half
> started to miscompile :(
Do you know how they are being miscompiled? Is the return value from a call being clobbered? Did they crash the compiler before your fix?
> Also, I now see some rather unoptimal code, e.g:
> brasl $lr, extFunc
> lr $3, $3
> lr $3, $3
That's odd, identity copies should get coalesced by RegAllocFast. Is isMoveInstr working correctly for these instructions? Is it setting DstReg and SrcReg correctly?
> ('lr rt, ra' moves ra->rt). I guess the miscompilations are due to the
> same problem as this sort of stuff gets generated. I'm looking into it,
> but do you have any more of those useful tips? ;) The code I used is the
> same test case as earlier in this chain. Compiled with:
> llc --march=cellspu --regalloc=fast test.ll -o -
Look into the identity copy issue first. It could be related.
Does it make a difference if you run llc with -O0?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1929 bytes
Desc: not available
More information about the llvm-dev