aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@gcc.gnu.org>2001-02-18 12:44:44 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-02-18 12:44:44 -0800
commit71641c15a697e6553cd3f27d104fb8a6aaeeab23 (patch)
tree84431a91af5c4df0946f2157bd5213c6d1c608cc
parent69a59a49f66f5996ff5c89b739399db0fbd66588 (diff)
downloadgcc-71641c15a697e6553cd3f27d104fb8a6aaeeab23.zip
gcc-71641c15a697e6553cd3f27d104fb8a6aaeeab23.tar.gz
gcc-71641c15a697e6553cd3f27d104fb8a6aaeeab23.tar.bz2
* mips.c (mips_expand_prologue) Add REG_MAYBE_DEAD to
structure shift insns. From-SVN: r39848
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/mips/mips.c15
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6dad4f9..b764484 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,9 @@
-2001-02-17 Mark Mitchell <mark@codesourcery.com>
+2001-02-18 Shane Nay <shane@agendacomputing.com>
+
+ * mips.c (mips_expand_prologue) Add REG_MAYBE_DEAD to
+ structure shift insns.
+
+2001-02-18 Mark Mitchell <mark@codesourcery.com>
* invoke.texi (-fsquangle): Remove documentation.
(-fname-mangling-version): Likewise.
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 1f19c98..74c548c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -7115,13 +7115,22 @@ mips_expand_prologue ()
for (i = 0; i < num; i++)
{
- rtx pattern = RTVEC_ELT (adjust, i);
+ rtx insn, pattern;
+
+ pattern = RTVEC_ELT (adjust, i);
if (GET_CODE (pattern) != SET
|| GET_CODE (SET_SRC (pattern)) != ASHIFT)
abort_with_insn (pattern, "Insn is not a shift");
-
PUT_CODE (SET_SRC (pattern), ASHIFTRT);
- emit_insn (pattern);
+
+ insn = emit_insn (pattern);
+
+ /* Global life information isn't valid at this point, so we
+ can't check whether these shifts are actually used. Mark
+ them MAYBE_DEAD so that flow2 will remove them, and not
+ complain about dead code in the prologue. */
+ REG_NOTES(insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, NULL_RTX,
+ REG_NOTES (insn));
}
}