diff options
author | Jim Wilson <wilson@cygnus.com> | 1999-03-08 17:50:37 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1999-03-08 09:50:37 -0800 |
commit | 49071ddced0d0e0e3425fa7dc054744ca1f3e491 (patch) | |
tree | 1a1b10b8f474423521688b3622cb9fc89a44b410 /gcc | |
parent | 66830675f2c2820222585b4a84b3f2ab7912dfbb (diff) | |
download | gcc-49071ddced0d0e0e3425fa7dc054744ca1f3e491.zip gcc-49071ddced0d0e0e3425fa7dc054744ca1f3e491.tar.gz gcc-49071ddced0d0e0e3425fa7dc054744ca1f3e491.tar.bz2 |
Fix performance problem on SH with unnecessary move instructions.
* local-alloc.c (combine_regs): Don't combine if we have a hard reg
for which CLASS_LIKELY_SPILLED_P is true.
From-SVN: r25644
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/local-alloc.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc6d1ef..4f83b46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Mon Mar 8 16:04:44 1999 Jim Wilson <wilson@cygnus.com> + * local-alloc.c (combine_regs): Don't combine if we have a hard reg + for which CLASS_LIKELY_SPILLED_P is true. + * unroll.c (loop_iterations): Only call loop_find_equiv_value if we have a REG or SUBREG. diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index ea97f33..d3dde6b 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -1648,6 +1648,11 @@ combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead) || ureg == sreg /* Don't try to connect two different hardware registers. */ || (ureg < FIRST_PSEUDO_REGISTER && sreg < FIRST_PSEUDO_REGISTER) + /* Don't use a hard reg that might be spilled. */ + || (ureg < FIRST_PSEUDO_REGISTER + && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (ureg))) + || (sreg < FIRST_PSEUDO_REGISTER + && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (sreg))) /* Don't connect two different machine modes if they have different implications as to which registers may be used. */ || !MODES_TIEABLE_P (GET_MODE (usedreg), GET_MODE (setreg))) |