This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[dataflow]: PATCH COMMITED to fix dce one last time.
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, Steven Bosscher <stevenb dot gcc at gmail dot com>, Richard Sandiford <richard at codesourcery dot com>, "Park, Seongbae" <seongbae dot park at gmail dot com>, "Zadeck, Kenneth" <zadeck at naturalbridge dot com>
- Date: Wed, 23 May 2007 08:56:54 -0400
- Subject: [dataflow]: PATCH COMMITED to fix dce one last time.
I believe that this time, I have gotten it correct.
Before reload, both the HARD_FRAME_POINTER and the FRAME_POINTER are
artificial uses and after reload, the HARD_FRAME_POINTER is an
artificial use iff frame_pointer_needed.
There is no longer a test in dce for RTX_FRAME_RELATED_P.
Furthermore, there are now no uses for REG_MAYBE_DEAD notes, so the
zillion places that create them have been changed.
There was also one stupid frag of code left over in dse.c that has been
removed.
This has been bootstrapped and regression tested on x86-64, x86-32, ppc
and ia-64.
kenny
2007-05-23 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_get_regular_block_artificial_uses): Set the
HARD_FRAME_POINTER not the FRAME_POINTER after reload. Set both
the HARD_FRAME_POINTER and the FRAME_POINTER before reload.
* dse.c (const_or_frame_p): Removed unnecessary test.
* config/s390/s390.c (s390_emit_prologue): Removed REG_MAYBE_DEAD
notes.
* config/spu/spu.c (frame_emit_add_imm, spu_expand_prologue): Ditto.
* config/i386/i386.c (ix86_expand_prologue): Ditto.
* config/sh/sh.c (sh_expand_prologue): Ditto.
* config/sh/sh.md (define_expand): Ditto.
* config/iq2000/iq2000.c (iq2000_expand_prologue): Ditto.
* config/mn10300/mn10300.c (expand_prologue): Ditto.
* config/ia64/ia64.c (spill_restore_mem, ia64_expand_prologue): Ditto.
* config/m68k/m68k.c (m68k_expand_prologue): Ditto.
* config/rs6000/rs6000.c (rs6000_maybe_dead): Removed.
(rs6000_emit_load_toc_table, rs6000_emit_prologue): Removed calls
to rs6000_maybe_dead.
* config/bfin/bfin.c (expand_interrupt_handler_prologue,
bfin_load_pic_reg): Removed REG_MAYBE_DEAD notes.
* reg-notes.def (MAYBE_DEAD): Removed.
* dce.c (deletable_insn_p): Removed test of RTX_FRAME_RELATED_P.
Index: df-scan.c
===================================================================
--- df-scan.c (revision 124902)
+++ df-scan.c (working copy)
@@ -3395,7 +3395,7 @@ df_get_regular_block_artificial_uses (bi
if (reload_completed)
{
if (frame_pointer_needed)
- bitmap_set_bit (regular_block_artificial_uses, FRAME_POINTER_REGNUM);
+ bitmap_set_bit (regular_block_artificial_uses, HARD_FRAME_POINTER_REGNUM);
}
else
/* Before reload, there are a few registers that must be forced
@@ -3406,6 +3406,10 @@ df_get_regular_block_artificial_uses (bi
reference of the frame pointer. */
bitmap_set_bit (regular_block_artificial_uses, FRAME_POINTER_REGNUM);
+#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
+ bitmap_set_bit (regular_block_artificial_uses, HARD_FRAME_POINTER_REGNUM);
+#endif
+
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* Pseudos with argument area equivalences may require
reloading via the argument pointer. */
Index: dse.c
===================================================================
--- dse.c (revision 124893)
+++ dse.c (working copy)
@@ -949,9 +949,6 @@ add_wild_read (bb_info_t bb_info)
static bool
const_or_frame_p (rtx x)
{
- if (!x)
- return true;
-
switch (GET_CODE (x))
{
case MEM:
Index: config/s390/s390.c
===================================================================
--- config/s390/s390.c (revision 124893)
+++ config/s390/s390.c (working copy)
@@ -7419,12 +7419,7 @@ s390_emit_prologue (void)
rtx insns = s390_load_got ();
for (insn = insns; insn; insn = NEXT_INSN (insn))
- {
- annotate_constant_pool_refs (&PATTERN (insn));
-
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, NULL_RTX,
- REG_NOTES (insn));
- }
+ annotate_constant_pool_refs (&PATTERN (insn));
emit_insn (insns);
}
Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c (revision 124893)
+++ config/spu/spu.c (working copy)
@@ -1570,16 +1570,11 @@ frame_emit_add_imm (rtx dst, rtx src, HO
}
else
{
- insn = emit_insn (gen_movsi (scratch, gen_int_mode (imm, SImode)));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (insn));
+ emit_insn (gen_movsi (scratch, gen_int_mode (imm, SImode)));
insn = emit_insn (gen_addsi3 (dst, src, scratch));
if (REGNO (src) == REGNO (scratch))
abort ();
}
- if (REGNO (dst) == REGNO (scratch))
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (insn));
return insn;
}
@@ -1687,11 +1682,7 @@ spu_expand_prologue (void)
{
rtx pic_reg = get_pic_reg ();
insn = emit_insn (gen_load_pic_offset (pic_reg, scratch_reg_0));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (insn));
insn = emit_insn (gen_subsi3 (pic_reg, pic_reg, scratch_reg_0));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (insn));
}
if (total_size > 0)
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 124893)
+++ config/i386/i386.c (working copy)
@@ -6010,9 +6010,7 @@ ix86_expand_prologue (void)
LABEL_PRESERVE_P (label) = 1;
gcc_assert (REGNO (pic_offset_table_rtx) != REGNO (tmp_reg));
insn = emit_insn (gen_set_rip_rex64 (pic_offset_table_rtx, label));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL);
insn = emit_insn (gen_set_got_offset_rex64 (tmp_reg, label));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL);
insn = emit_insn (gen_adddi3 (pic_offset_table_rtx,
pic_offset_table_rtx, tmp_reg));
}
@@ -6021,14 +6019,6 @@ ix86_expand_prologue (void)
}
else
insn = emit_insn (gen_set_got (pic_offset_table_rtx));
-
- /* Even with accurate pre-reload life analysis, we can wind up
- deleting all references to the pic register after reload.
- Consider if cross-jumping unifies two sides of a branch
- controlled by a comparison vs the only read from a global.
- In which case, allow the set_got to be deleted, though we're
- too late to do anything about the ebx save in the prologue. */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL);
}
/* Prevent function calls from be scheduled before the call to mcount.
Index: config/sh/sh.c
===================================================================
--- config/sh/sh.c (revision 124893)
+++ config/sh/sh.c (working copy)
@@ -6211,19 +6211,8 @@ sh_expand_prologue (void)
int tr = sh_media_register_for_return ();
if (tr >= 0)
- {
- rtx insn = emit_move_insn (gen_rtx_REG (DImode, tr),
- gen_rtx_REG (DImode, PR_MEDIA_REG));
-
- /* ??? We should suppress saving pr when we don't need it, but this
- is tricky because of builtin_return_address. */
-
- /* If this function only exits with sibcalls, this copy
- will be flagged as dead. */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
- }
+ rtx insn = emit_move_insn (gen_rtx_REG (DImode, tr),
+ gen_rtx_REG (DImode, PR_MEDIA_REG));
}
/* Emit the code for SETUP_VARARGS. */
@@ -6472,23 +6461,7 @@ sh_expand_prologue (void)
push_regs (&live_regs_mask, current_function_interrupt);
if (flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
- {
- rtx insn = get_last_insn ();
- rtx last = emit_insn (gen_GOTaddr2picreg ());
-
- /* Mark these insns as possibly dead. Sometimes, flow2 may
- delete all uses of the PIC register. In this case, let it
- delete the initialization too. */
- do
- {
- insn = NEXT_INSN (insn);
-
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
- }
- while (insn != last);
- }
+ emit_insn (gen_GOTaddr2picreg ());
if (SHMEDIA_REGS_STACK_ADJUST ())
{
@@ -6503,16 +6476,7 @@ sh_expand_prologue (void)
}
if (target_flags != save_flags && ! current_function_interrupt)
- {
- rtx insn = emit_insn (gen_toggle_sz ());
-
- /* If we're lucky, a mode switch in the function body will
- overwrite fpscr, turning this insn dead. Tell flow this
- insn is ok to delete. */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
- }
+ emit_insn (gen_toggle_sz ());
target_flags = save_flags;
@@ -6733,11 +6697,6 @@ sh_expand_epilogue (bool sibcall_p)
}
insn = emit_move_insn (reg_rtx, mem_rtx);
- if (reg == PR_MEDIA_REG && sh_media_register_for_return () >= 0)
- /* This is dead, unless we return with a sibcall. */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
}
gcc_assert (entry->offset + offset_base == d + d_rounding);
Index: config/sh/sh.md
===================================================================
--- config/sh/sh.md (revision 124893)
+++ config/sh/sh.md (working copy)
@@ -8377,19 +8377,14 @@ (define_expand "sibcall_epilogue"
{
rtx r0 = gen_rtx_REG (SImode, R0_REG);
rtx tmp = gen_rtx_REG (SImode, MACL_REG);
- rtx i;
/* We can't tell at this point whether the sibcall is a
sibcall_compact and, if it is, whether it uses r0 or
mach as operand 2, so let the instructions that
preserve r0 be optimized away if r0 turns out to be
dead. */
- i = emit_insn_before (gen_rtx_SET (SImode, tmp, r0), insn);
- REG_NOTES (i) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (i));
- i = emit_move_insn (r0, tmp);
- REG_NOTES (i) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (i));
+ emit_insn_before (gen_rtx_SET (SImode, tmp, r0), insn);
+ emit_move_insn (r0, tmp);
break;
}
}
Index: config/iq2000/iq2000.c
===================================================================
--- config/iq2000/iq2000.c (revision 124893)
+++ config/iq2000/iq2000.c (working copy)
@@ -1964,13 +1964,6 @@ iq2000_expand_prologue (void)
PUT_CODE (SET_SRC (pattern), ASHIFTRT);
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));
}
}
Index: config/mn10300/mn10300.c
===================================================================
--- config/mn10300/mn10300.c (revision 124893)
+++ config/mn10300/mn10300.c (working copy)
@@ -945,23 +945,7 @@ expand_prologue (void)
stack_pointer_rtx,
GEN_INT (-size)));
if (flag_pic && df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM))
- {
- rtx insn = get_last_insn ();
- rtx last = emit_insn (gen_GOTaddr2picreg ());
-
- /* Mark these insns as possibly dead. Sometimes, flow2 may
- delete all uses of the PIC register. In this case, let it
- delete the initialization too. */
- do
- {
- insn = NEXT_INSN (insn);
-
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
- }
- while (insn != last);
- }
+ emit_insn (gen_GOTaddr2picreg ());
}
void
Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c (revision 124893)
+++ config/ia64/ia64.c (working copy)
@@ -2790,16 +2790,6 @@ spill_restore_mem (rtx reg, HOST_WIDE_IN
insn = emit_insn (seq);
}
spill_fill_data.init_after = insn;
-
- /* If DISP is 0, we may or may not have a further adjustment
- afterward. If we do, then the load/store insn may be modified
- to be a post-modify. If we don't, then this copy may be
- eliminated by copyprop_hardreg_forward, which makes this
- insn garbage, which runs afoul of the sanity check in
- propagate_one_insn. So mark this insn as legal to delete. */
- if (disp == 0)
- REG_NOTES(insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- REG_NOTES (insn));
}
mem = gen_rtx_MEM (GET_MODE (reg), spill_fill_data.iter_reg[iter]);
@@ -3228,12 +3218,6 @@ ia64_expand_prologue (void)
insn = emit_move_insn (gen_rtx_REG (DImode,
current_frame_info.r[reg_save_gp]),
pic_offset_table_rtx);
- /* We don't know for sure yet if this is actually needed, since
- we've not split the PIC call patterns. If all of the calls
- are indirect, and not followed by any uses of the gp, then
- this save is dead. Allow it to go away. */
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, REG_NOTES (insn));
}
/* We should now be at the base of the gr/br/fr spill area. */
Index: config/m68k/m68k.c
===================================================================
--- config/m68k/m68k.c (revision 124893)
+++ config/m68k/m68k.c (working copy)
@@ -1038,12 +1038,7 @@ m68k_expand_prologue (void)
if (flag_pic
&& !TARGET_SEP_DATA
&& current_function_uses_pic_offset_table)
- {
- insn = emit_insn (gen_load_got (pic_offset_table_rtx));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
- }
+ insn = emit_insn (gen_load_got (pic_offset_table_rtx));
}
/* Return true if a simple (return) instruction is sufficient for this
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c (revision 124893)
+++ config/rs6000/rs6000.c (working copy)
@@ -616,7 +616,6 @@ struct processor_costs power6_cost = {
static bool rs6000_function_ok_for_sibcall (tree, tree);
static const char *rs6000_invalid_within_doloop (rtx);
static rtx rs6000_generate_compare (enum rtx_code);
-static void rs6000_maybe_dead (rtx);
static void rs6000_emit_stack_tie (void);
static void rs6000_frame_related (rtx, rtx, HOST_WIDE_INT, rtx, rtx);
static rtx spe_synthesize_frame_save (rtx);
@@ -14010,15 +14009,6 @@ rs6000_ra_ever_killed (void)
return 0;
}
-/* Add a REG_MAYBE_DEAD note to the insn. */
-static void
-rs6000_maybe_dead (rtx insn)
-{
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD,
- const0_rtx,
- REG_NOTES (insn));
-}
-
/* Emit instructions needed to load the TOC register.
This is only needed when TARGET_TOC, TARGET_MINIMAL_TOC, and there is
a constant pool; or for SVR4 -fpic. */
@@ -14026,7 +14016,7 @@ rs6000_maybe_dead (rtx insn)
void
rs6000_emit_load_toc_table (int fromprolog)
{
- rtx dest, insn;
+ rtx dest;
dest = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
if (TARGET_ELF && TARGET_SECURE_PLT && DEFAULT_ABI != ABI_AIX && flag_pic)
@@ -14046,29 +14036,16 @@ rs6000_emit_load_toc_table (int fromprol
tmp1 = gen_reg_rtx (Pmode);
tmp2 = gen_reg_rtx (Pmode);
}
- insn = emit_insn (gen_load_toc_v4_PIC_1 (lab));
- if (fromprolog)
- rs6000_maybe_dead (insn);
- insn = emit_move_insn (tmp1,
+ emit_insn (gen_load_toc_v4_PIC_1 (lab));
+ emit_move_insn (tmp1,
gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
- if (fromprolog)
- rs6000_maybe_dead (insn);
- insn = emit_insn (gen_load_toc_v4_PIC_3b (tmp2, tmp1, got, lab));
- if (fromprolog)
- rs6000_maybe_dead (insn);
- insn = emit_insn (gen_load_toc_v4_PIC_3c (dest, tmp2, got, lab));
- if (fromprolog)
- rs6000_maybe_dead (insn);
+ emit_insn (gen_load_toc_v4_PIC_3b (tmp2, tmp1, got, lab));
+ emit_insn (gen_load_toc_v4_PIC_3c (dest, tmp2, got, lab));
}
else if (TARGET_ELF && DEFAULT_ABI == ABI_V4 && flag_pic == 1)
{
- insn = emit_insn (gen_load_toc_v4_pic_si ());
- if (fromprolog)
- rs6000_maybe_dead (insn);
- insn = emit_move_insn (dest,
- gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
- if (fromprolog)
- rs6000_maybe_dead (insn);
+ emit_insn (gen_load_toc_v4_pic_si ());
+ emit_move_insn (dest, gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
}
else if (TARGET_ELF && DEFAULT_ABI != ABI_AIX && flag_pic == 2)
{
@@ -14087,13 +14064,10 @@ rs6000_emit_load_toc_table (int fromprol
ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_labelno);
symL = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
- rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1 (symF)));
- rs6000_maybe_dead (emit_move_insn (dest,
- gen_rtx_REG (Pmode,
- LINK_REGISTER_REGNUM)));
- rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_2 (temp0, dest,
- symL,
- symF)));
+ emit_insn (gen_load_toc_v4_PIC_1 (symF));
+ emit_move_insn (dest,
+ gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
+ emit_insn (gen_load_toc_v4_PIC_2 (temp0, dest, symL, symF));
}
else
{
@@ -14105,9 +14079,7 @@ rs6000_emit_load_toc_table (int fromprol
gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM));
emit_move_insn (temp0, gen_rtx_MEM (Pmode, dest));
}
- insn = emit_insn (gen_addsi3 (dest, temp0, dest));
- if (fromprolog)
- rs6000_maybe_dead (insn);
+ emit_insn (gen_addsi3 (dest, temp0, dest));
}
else if (TARGET_ELF && !TARGET_AIX && flag_pic == 0 && TARGET_MINIMAL_TOC)
{
@@ -14117,23 +14089,17 @@ rs6000_emit_load_toc_table (int fromprol
ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);
realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
- insn = emit_insn (gen_elf_high (dest, realsym));
- if (fromprolog)
- rs6000_maybe_dead (insn);
- insn = emit_insn (gen_elf_low (dest, dest, realsym));
- if (fromprolog)
- rs6000_maybe_dead (insn);
+ emit_insn (gen_elf_high (dest, realsym));
+ emit_insn (gen_elf_low (dest, dest, realsym));
}
else
{
gcc_assert (DEFAULT_ABI == ABI_AIX);
if (TARGET_32BIT)
- insn = emit_insn (gen_load_toc_aix_si (dest));
+ emit_insn (gen_load_toc_aix_si (dest));
else
- insn = emit_insn (gen_load_toc_aix_di (dest));
- if (fromprolog)
- rs6000_maybe_dead (insn);
+ emit_insn (gen_load_toc_aix_di (dest));
}
}
@@ -15183,13 +15149,11 @@ rs6000_emit_prologue (void)
rtx lr = gen_rtx_REG (Pmode, LINK_REGISTER_REGNUM);
insn = emit_move_insn (frame_ptr_rtx, lr);
- rs6000_maybe_dead (insn);
RTX_FRAME_RELATED_P (insn) = 1;
rs6000_emit_load_toc_table (TRUE);
insn = emit_move_insn (lr, frame_ptr_rtx);
- rs6000_maybe_dead (insn);
RTX_FRAME_RELATED_P (insn) = 1;
}
else
@@ -15205,17 +15169,16 @@ rs6000_emit_prologue (void)
/* Save and restore LR locally around this call (in R0). */
if (!info->lr_save_p)
- rs6000_maybe_dead (emit_move_insn (gen_rtx_REG (Pmode, 0), lr));
+ emit_move_insn (gen_rtx_REG (Pmode, 0), lr);
- rs6000_maybe_dead (emit_insn (gen_load_macho_picbase (src)));
+ emit_insn (gen_load_macho_picbase (src));
- insn = emit_move_insn (gen_rtx_REG (Pmode,
- RS6000_PIC_OFFSET_TABLE_REGNUM),
- lr);
- rs6000_maybe_dead (insn);
+ emit_move_insn (gen_rtx_REG (Pmode,
+ RS6000_PIC_OFFSET_TABLE_REGNUM),
+ lr);
if (!info->lr_save_p)
- rs6000_maybe_dead (emit_move_insn (lr, gen_rtx_REG (Pmode, 0)));
+ emit_move_insn (lr, gen_rtx_REG (Pmode, 0));
}
#endif
}
Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c (revision 124893)
+++ config/bfin/bfin.c (working copy)
@@ -845,23 +845,11 @@ expand_interrupt_handler_prologue (rtx s
rtx insn;
insn = emit_move_insn (r0reg, gen_rtx_REG (SImode, REG_SEQSTAT));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
insn = emit_insn (gen_ashrsi3 (r0reg, r0reg, GEN_INT (26)));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
insn = emit_insn (gen_ashlsi3 (r0reg, r0reg, GEN_INT (26)));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
insn = emit_move_insn (r1reg, spreg);
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
insn = emit_move_insn (r2reg, gen_rtx_REG (Pmode, REG_FP));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
insn = emit_insn (gen_addsi3 (r2reg, r2reg, GEN_INT (8)));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx,
- NULL_RTX);
}
}
@@ -948,7 +936,6 @@ bfin_load_pic_reg (rtx dest)
gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
UNSPEC_LIBRARY_OFFSET));
insn = emit_insn (gen_movsi (dest, gen_rtx_MEM (Pmode, addr)));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_MAYBE_DEAD, const0_rtx, NULL);
return dest;
}
Index: reg-notes.def
===================================================================
--- reg-notes.def (revision 124893)
+++ reg-notes.def (working copy)
@@ -143,12 +143,6 @@ REG_NOTE (EH_REGION)
/* Used by haifa-sched to save NOTE_INSN notes across scheduling. */
REG_NOTE (SAVE_NOTE)
-/* Indicates that this insn (which is part of the prologue) computes a
- value which might not be used later, and if so it's OK to delete
- the insn. Normally, deleting any insn in the prologue is an error.
- At present the parameter is unused and set to (const_int 0). */
-REG_NOTE (MAYBE_DEAD)
-
/* Indicates that a call does not return. */
REG_NOTE (NORETURN)
Index: dce.c
===================================================================
--- dce.c (revision 124902)
+++ dce.c (working copy)
@@ -66,12 +66,6 @@ deletable_insn_p (rtx insn, bool fast)
{
rtx x;
- /* These insns may not have real uses but are there because the
- dwarf unwinder may need to see the values they compute. */
- if (RTX_FRAME_RELATED_P (insn)
- && find_reg_note (insn, REG_MAYBE_DEAD, NULL_RTX) == 0)
- return false;
-
switch (GET_CODE (PATTERN (insn)))
{
case USE: