aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-07-21 21:38:08 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2002-07-21 19:38:08 +0000
commit4669036917f42b1cdbf4ef2e4440648e8891f289 (patch)
treee5d26e074b1d30e38ff9d762813992c901f36622 /gcc/gcse.c
parent60ffc1b8165aa3fbd6d26880a56451970c116bcb (diff)
downloadgcc-4669036917f42b1cdbf4ef2e4440648e8891f289.zip
gcc-4669036917f42b1cdbf4ef2e4440648e8891f289.tar.gz
gcc-4669036917f42b1cdbf4ef2e4440648e8891f289.tar.bz2
gcse.c (do_local_cprop): Do not extend lifetimes of registers set by do_local_cprop.
* gcse.c (do_local_cprop): Do not extend lifetimes of registers set by do_local_cprop. From-SVN: r55626
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index d46f81b..7fdcdea 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4312,9 +4312,18 @@ do_local_cprop (x, insn, alter_jumps)
for (l = val->locs; l; l = l->next)
{
rtx this_rtx = l->loc;
+ rtx note;
+
if (CONSTANT_P (this_rtx))
newcnst = this_rtx;
- if (REG_P (this_rtx) && REGNO (this_rtx) >= FIRST_PSEUDO_REGISTER)
+ if (REG_P (this_rtx) && REGNO (this_rtx) >= FIRST_PSEUDO_REGISTER
+ /* Don't copy propagate if it has attached REG_EQUIV note.
+ At this point this only function parameters should have
+ REG_EQUIV notes and if the argument slot is used somewhere
+ explicitly, it means address of parameter has been taken,
+ so we should not extend the lifetime of the pseudo. */
+ && (!(note = find_reg_note (l->setting_insn, REG_EQUIV, NULL_RTX))
+ || GET_CODE (XEXP (note, 0)) != MEM))
newreg = this_rtx;
}
if (newcnst && constprop_register (insn, x, newcnst, alter_jumps))