Hi,
I'm facing a problem in my BE while trying to remove certain copies. Here is a code snippet which I would like to optimize
%vreg1<def> = READF32r; vRRegs:%vreg1
%vreg2<def> = COPY %vreg1:rsub_h; iRSubRegs:%vreg2 vRRegs:%vreg1
%vreg3<def> = COPY %vreg1:rsub_l; iRSubRegs:%vreg3 vRRegs:%vreg1
This code produces subreg-to-subreg copies but I would like to have direct uses of vreg1's subregisters instead.
I tried to add RAhints in order to form identity copies (vreg1 and vreg2/3 should be allocated to the same sub/super register) and let the RA removes them automatically but it didn't work on all the copies. Is there another method to get rid of these copies whenever possible ?
Ivan
I assume you are using svn trunk, otherwise I recommend you upgrade.
The output of -debug-only=regalloc should tell you why the register coalescer isn't eliminating the copies.
/jakob
Hi Jakob,
Hi,
I'm facing a problem in my BE while trying to remove certain copies.
Here is a code snippet which I would like to optimize
%vreg1<def> = READF32r; vRRegs:%vreg1
%vreg2<def> = COPY %vreg1:rsub_h; iRSubRegs:%vreg2 vRRegs:%vreg1
%vreg3<def> = COPY %vreg1:rsub_l; iRSubRegs:%vreg3 vRRegs:%vreg1
This code produces subreg-to-subreg copies but I would like to have
direct uses of vreg1's subregisters instead.
I tried to add RAhints in order to form identity copies (vreg1 and
vreg2/3 should be allocated to the same sub/super register) and let the
RA removes them automatically but it didn't work on all the copies. Is
there another method to get rid of these copies whenever possible ?
I assume you are using svn trunk, otherwise I recommend you upgrade.
The output of -debug-only=regalloc should tell you why the register coalescer isn't eliminating the copies.
Thanks ! Looking into the coalescer, I realized I forgot to implement the hook getMatchingSuperRegClass(). Now, it works smoothly!
Regards,
Ivan