[LLVMdev] Remove subreg copies
Ivan Llopard
ivanllopard at gmail.com
Wed Mar 28 07:41:30 PDT 2012
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
More information about the llvm-dev
mailing list