aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gcc.gnu.org>2007-11-15 14:45:55 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2007-11-15 14:45:55 +0000
commitea6684648c9c2bf8d3e2e656a3dd1726768a87e8 (patch)
treedd3b93cb01cbb99a18927f2b06dd0dab5af48171 /gcc
parent3f61b42f2b8727a4fd00d6956c91fb2bbe77dd88 (diff)
downloadgcc-ea6684648c9c2bf8d3e2e656a3dd1726768a87e8.zip
gcc-ea6684648c9c2bf8d3e2e656a3dd1726768a87e8.tar.gz
gcc-ea6684648c9c2bf8d3e2e656a3dd1726768a87e8.tar.bz2
fwprop.c (try_fwprop_subst): Skip profitability check for forward propagation into an address...
2007-11-15 Paolo Bonzini <bonzini@gnu.org> * fwprop.c (try_fwprop_subst): Skip profitability check for forward propagation into an address; that's done in should_replace_address. From-SVN: r130201
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/fwprop.c3
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d5683b9..95efbfad 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,9 +1,14 @@
+2007-11-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * fwprop.c (try_fwprop_subst): Skip profitability check for forward
+ propagation into an address; that's done in should_replace_address.
+
2007-11-15 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* config/spu/spu-protos.h (legitimate_const): Remove prototype.
* config/spu/spu.c (legitimate_const): Remove.
(classify_immediate): Inline call to legitimate_const.
- (spu_legitimate_address): Likewise. Allow SMBOL_REF + CONST_INT
+ (spu_legitimate_address): Likewise. Allow SYMBOL_REF + CONST_INT
for any constant, not just -512 .. 511.
2007-11-15 Sa Liu <saliu@de.ibm.com>
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index eecd0a0..6bc9c67 100644
--- a/gcc/fwprop.c
+++ b/gcc/fwprop.c
@@ -697,7 +697,8 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_
ok = false;
}
- else if (rtx_cost (SET_SRC (set), SET) > old_cost)
+ else if (DF_REF_TYPE (use) == DF_REF_REG_USE
+ && rtx_cost (SET_SRC (set), SET) > old_cost)
{
if (dump_file)
fprintf (dump_file, "Changes to insn %d not profitable\n",