This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
cant_combine_insn_p hard_reg->reg moves
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Bernd Schmidt <bernds at redhat dot co dot uk>, Jan Hubicka <jh at suse dot cz>, Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, degger at fhm dot edu
- Date: Tue, 25 Dec 2001 21:02:42 -0500
- Subject: cant_combine_insn_p hard_reg->reg moves
At Daniel's prompting, I finally tracked down the cause of the
code pessimization with respect to function arguments and return values.
Daniel tracked it down to somewhere in combine.
The problem is cant_combine_insn_p disallowing hard registers.
Arguments and return values are specified as hard regs. So this change
from December 2000 now often inserts a move between the hard reg allocated
to the pseudo of a computation and the hard regs of arguments and return
values. This is rather pessimistic for some architecture, especially for
ABIs with register-based calling conventions.
How can this improved? Could cant_combine_insn_p test for hard
regs with either REG_EQUIV involving computations of ARG_POINTER_REGNUM or
FUNCTION_VALUE_REGNO_P?
Thanks, David