[LLVMdev] StrongPHIElimination

Jonas Paulsson jonas.paulsson at ericsson.com
Fri Jun 8 08:56:43 PDT 2012


Hi,

I have a question regarding StrongPHIElimination.

With (weak) PHIElimination, register classes seems to take care of themselves, but with the Strong version, I get illegal virtual register for instruction.

In this testcase, I define the PHI operands into a bigger (super) RC, than what the using MI can handle. Weak PHI elim handled this by copying the PHI
operands into the right RC. The Strong version omitted this, and thus produced illegal code. The PHI def-operand has the right (sub) RC at entrance of PHIElim.

%vreg1:SuperRC<def>
%vreg3<RC> = PHI  %vreg1, %vreg2
Mul  %vreg3, ...
%vreg2:SuperRC<def>

This type of code will let the mul instruction use a virtreg with the SuperRC, with the StrongPHIElimination.

I wonder what are the purposes of the weak respective strong phi-eliminations? Do you think I might end up with fewer COPY's in the end if I manually inserted
the needed COPY's to the narrow RC's in preRA and then run the StrongPHIElimination?

Thanks,

Jonas

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


More information about the llvm-dev mailing list