[LLVMdev] PHI Elimination problem

Sachin.Punyani at microchip.com Sachin.Punyani at microchip.com
Tue Sep 16 02:06:54 PDT 2008


Hi,

 

The PHI elimination pass calls the function copyRegToReg for copy
placement and then later tries to setkill to the temporary virtual
register used in copy placement. For this setkill action it looks only
in one instruction (last instruction for copyRegToReg) for virtual
register with no use.

 

My target has only one register and I can't do copyRegToReg in one
instruction only. So I create two instructions (one:SrcReg to Stack ,
two:Stack to DestReg). The SrcReg here is the temporary virtual register
(for PHI elimination) which should be setkill. However, the PHI
Elimination pass looks only in last instruction (here: Stack to DestReg)
for any NoUse register and does not find any. Therefore the intended
setkill does not take place. This causes an assertion failure saying
"PHI elimination vreg should have one kill, the PHI itself".

 

Please provide some input on how this can be solved.

 

Regards

Sachin 

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


More information about the llvm-dev mailing list