aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-08-29 01:42:28 +0000
committerJeff Law <law@gcc.gnu.org>1999-08-28 19:42:28 -0600
commitaf37f0dda914774e24ff384719f136795f76f2f4 (patch)
tree730b2ae81ede9937fb2ae1cc954b91b39fe04a0a
parent27778b739c3893b3aa6295e21c698aad2f7b5934 (diff)
downloadgcc-af37f0dda914774e24ff384719f136795f76f2f4.zip
gcc-af37f0dda914774e24ff384719f136795f76f2f4.tar.gz
gcc-af37f0dda914774e24ff384719f136795f76f2f4.tar.bz2
jump.c (jump_optimize_1): Do not delete assignments to internal_arg_pointer.
* jump.c (jump_optimize_1): Do not delete assignments to internal_arg_pointer. * cse.c (delete_trivially_dead_insns): Always consider a set of the internal_arg_pointer live. From-SVN: r28957
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cse.c8
-rw-r--r--gcc/jump.c7
3 files changed, 20 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 47c76ad..07176b6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Aug 28 19:36:05 1999 Jeffrey A Law (law@cygnus.com)
+
+ * jump.c (jump_optimize_1): Do not delete assignments to
+ internal_arg_pointer.
+ * cse.c (delete_trivially_dead_insns): Always consider a set of
+ the internal_arg_pointer live.
+
Sat Aug 28 16:24:31 1999 Richard Henderson <rth@cygnus.com>
* flow.c (flow_delete_insn_chain): Rename from delete_insn_chain.
diff --git a/gcc/cse.c b/gcc/cse.c
index 7a13a7b..8197e42 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -9215,7 +9215,13 @@ delete_trivially_dead_insns (insns, nreg)
else if (GET_CODE (SET_DEST (elt)) != REG
|| REGNO (SET_DEST (elt)) < FIRST_PSEUDO_REGISTER
|| counts[REGNO (SET_DEST (elt))] != 0
- || side_effects_p (SET_SRC (elt)))
+ || side_effects_p (SET_SRC (elt))
+ /* An ADDRESSOF expression can turn into a use of the
+ internal arg pointer, so always consider the
+ internal arg pointer live. If it is truly dead,
+ flow will delete the initializing insn. */
+ || (SET_DEST (elt)
+ == current_function_internal_arg_pointer))
live_insn = 1;
}
else if (GET_CODE (elt) != CLOBBER && GET_CODE (elt) != USE)
diff --git a/gcc/jump.c b/gcc/jump.c
index 7a4caaa..c5e2780 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -290,7 +290,12 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
might arrange to use that reg for real. */
&& REGNO_LAST_NOTE_UID (REGNO (SET_DEST (set))) == INSN_UID (insn)
&& ! side_effects_p (SET_SRC (set))
- && ! find_reg_note (insn, REG_RETVAL, 0))
+ && ! find_reg_note (insn, REG_RETVAL, 0)
+ /* An ADDRESSOF expression can turn into a use of the internal arg
+ pointer, so do not delete the initialization of the internal
+ arg pointer yet. If it is truly dead, flow will delete the
+ initializing insn. */
+ && SET_DEST (set) != current_function_internal_arg_pointer)
delete_insn (insn);
}