This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about peephole2
>> With all that, is there anything I'm missing which is preventing
>> the add(insn 20) from subsuming the load indirect(insn 106) created
>> from the reload pass?
>
>Hum. I suspect things might work out better if you dropped the
>constant into memory early. You could probably arrange for the
>adddf expander to convert to register indirect mode too. This
>would also require that your insn predicates accurately reflect
>the allowable operands so that CSE doesn't undo your work.
Are there any examples of what I can start with?
I'm assuing this will have to go into the movdf expander instead of
the adddf3 expander since gen_movdf3 is called via the call to force_reg in
expand_binop at optabs.c:665:
(insn 19 17 21 (set (reg:DF 35)
(const_double:DF (const_int 0 [0x0]) 0 [0x0] 0 [0x0] 1075806208 [0x401f8000])) -1 (nil)
(expr_list:REG_EQUAL (const_double:DF (const_int 0 [0x0]) 0 [0x0] 0 [0x0] 1075806208 [0x401f8000])
(nil)))
(insn 21 19 22 (set (reg:DF 34)
(plus:DF (reg:DF 34)
(reg:DF 35))) -1 (nil)
(nil))
(gdb) where 4
#0 gen_movdf (operand0=0x401afa40, operand1=0x400238a0) at insn-emit.c:3761
#1 0x080a7c80 in emit_move_insn_1 (x=0x401afa40, y=0x400238a0)
at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:2769
#2 0x080a7bde in emit_move_insn (x=0x401afa40, y=0x400238a0)
at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/expr.c:2742
#3 0x080c107c in force_reg (mode=DFmode, x=0x400238a0)
at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/explow.c:821
#4 0x080c280f in expand_binop (mode=DFmode, binoptab=0x824f718,
op0=0x401af9c0, op1=0x400238a0, target=0x401af9c0, unsignedp=0,
methods=OPTAB_LIB_WIDEN)
at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/optabs.c:665
#5 0x080c72bb in expand_float (to=0x401af9c0, from=0x401af900, unsignedp=1)
at /home/pbarada/work/cvs-wavemark/cross-linux-tools/gcc-304/gcc/optabs.c:4081
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)