[LLVMdev] Greedy regalloc

Jonas Paulsson jnspaulsson at hotmail.com
Fri Nov 18 10:03:02 PST 2011


Hi,

I get strange code when using regalloc=greedy. 

A value spill is redundant and cleared, as another spill of same value is inserted. The former spill is however not NOP:ed, but KILL:ed, thus the operands get a kill status. The code becomes:

    %vreg301<def> = mv32Imm 200000000, pred:0, pred:%noreg, %CCReg<imp-def,dead>, %ac0<imp-use>, %ac1<imp-use>; aN32_0_7:%vreg301
    Store32FI %vreg301, <fi#93>, pred:0, pred:%noreg, %CCReg<imp-def>; mem:ST4[FixedStack93] aN32_0_7:%vreg301
    KILL %vreg301, <fi#93>, 0, %noreg, %CCReg<imp-def>; mem:ST4[FixedStack93] aN32_0_7:%vreg301
    %a0_32<def> = COPY %vreg301; aN32_0_7:%vreg301

This results in abort:

 "Assertion `MI->allDefsAreDead() && "Def isn't really dead"' failed."

What is the purpose of having the KILL opcode there, and do you know what might be the cause for this error?

Are all the register allocators currently of high standard, or are one or more less mature, meaning things might break?

/Jonas


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111118/6806e04d/attachment.html>


More information about the llvm-dev mailing list