Commit 9be40833 by Richard Henderson

re PR bootstrap/4191 (GCC does not build for d30v-elf - needs tweaking for crtstuff.c changes)

        PR bootstrap/4191
        * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef.

        * flow.c (mark_used_reg): Manage reg_cond_dead properly for
        modes spanning multiple hard regs.

        * recog.c (peephole2_optimize): Rebuild jump labels as needed.

From-SVN: r52205
parent c58c6b73
2002-04-12 Richard Henderson <rth@redhat.com>
PR bootstrap/4191
* config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef.
* flow.c (mark_used_reg): Manage reg_cond_dead properly for
modes spanning multiple hard regs.
* recog.c (peephole2_optimize): Rebuild jump labels as needed.
2002-04-11 John David Anglin <dave@hiauly1.hia.nrc.ca> 2002-04-11 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (pa_output_function_prologue): Don't accumulate the total * pa.c (pa_output_function_prologue): Don't accumulate the total
...@@ -85,7 +95,7 @@ ...@@ -85,7 +95,7 @@
* config/alpha/openbsd.h: Do not directly include alpha/alpha.h. * config/alpha/openbsd.h: Do not directly include alpha/alpha.h.
* config/alpha/vms.h: Likewise. * config/alpha/vms.h: Likewise.
2002-04-11 Richard Sandiford <rsand 2002-04-11 Richard Sandiford <rsandifo@redhat.com>
* doc/extend.texi: Remove old claim that typedefs cannot have * doc/extend.texi: Remove old claim that typedefs cannot have
an alignment attribute. an alignment attribute.
...@@ -800,7 +810,7 @@ objc: ...@@ -800,7 +810,7 @@ objc:
* protoize.c: Match include directory usage with cppdefault.c. * protoize.c: Match include directory usage with cppdefault.c.
2002-04-03 Jeffrey A Law (law@redhat.com) 2002-04-03 Jeffrey A Law (law@redhat.com)
Hans-Peter Nilsson <hp@bitrange.com> Hans-Peter Nilsson <hp@bitrange.com>
* combine.c (simplify_comparison): Avoid narrowing a comparison * combine.c (simplify_comparison): Avoid narrowing a comparison
with a paradoxical subreg when doing so would drop signficant bits. with a paradoxical subreg when doing so would drop signficant bits.
...@@ -878,7 +888,7 @@ Tue Apr 2 06:47:40 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -878,7 +888,7 @@ Tue Apr 2 06:47:40 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-04-01 Vladimir Makarov <vmakarov@redhat.com> 2002-04-01 Vladimir Makarov <vmakarov@redhat.com>
* config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON, * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Redefine them. ASM_OUTPUT_ALIGNED_LOCAL): Redefine them.
2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk> 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
...@@ -899,8 +909,8 @@ objc: ...@@ -899,8 +909,8 @@ objc:
2002-04-01 Bob Wilson <bob.wilson@acm.org> 2002-04-01 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning
in previous change. in previous change.
2002-04-01 Bob Wilson <bob.wilson@acm.org> 2002-04-01 Bob Wilson <bob.wilson@acm.org>
...@@ -1053,7 +1063,7 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -1053,7 +1063,7 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* libgcc2.c (__bb_exit_func): Make static. * libgcc2.c (__bb_exit_func): Make static.
* config/alpha/alpha.md (trap): New. * config/alpha/alpha.md (trap): New.
2002-03-31 Richard Henderson <rth@redhat.com> 2002-03-31 Richard Henderson <rth@redhat.com>
...@@ -1081,11 +1091,11 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> ...@@ -1081,11 +1091,11 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise. * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise.
2002-03-30 Roger Sayle <roger@eyesopen.com> 2002-03-30 Roger Sayle <roger@eyesopen.com>
Richard Henderson <rth@redhat.com> Richard Henderson <rth@redhat.com>
* regmove.c (combine_stack_adjustments_for_block): Avoid * regmove.c (combine_stack_adjustments_for_block): Avoid
emitting a stack adjustment of zero bytes. Let delete_insn emitting a stack adjustment of zero bytes. Let delete_insn
update bb->head. update bb->head.
2002-03-30 Richard Henderson <rth@redhat.com> 2002-03-30 Richard Henderson <rth@redhat.com>
......
...@@ -3357,7 +3357,6 @@ do { \ ...@@ -3357,7 +3357,6 @@ do { \
Defined in svr4.h. */ Defined in svr4.h. */
/* #define INIT_SECTION_ASM_OP */ /* #define INIT_SECTION_ASM_OP */
#undef INIT_SECTION_ASM_OP
/* If defined, `main' will not call `__main' as described above. This macro /* If defined, `main' will not call `__main' as described above. This macro
should be defined for systems that control the contents of the init section should be defined for systems that control the contents of the init section
......
...@@ -3610,6 +3610,10 @@ mark_used_reg (pbi, reg, cond, insn) ...@@ -3610,6 +3610,10 @@ mark_used_reg (pbi, reg, cond, insn)
/* Mark the register as being live. */ /* Mark the register as being live. */
for (i = regno_first; i <= regno_last; ++i) for (i = regno_first; i <= regno_last; ++i)
{ {
#ifdef HAVE_conditional_execution
int this_was_live = REGNO_REG_SET_P (pbi->reg_live, i);
#endif
SET_REGNO_REG_SET (pbi->reg_live, i); SET_REGNO_REG_SET (pbi->reg_live, i);
#ifdef HAVE_conditional_execution #ifdef HAVE_conditional_execution
...@@ -3621,7 +3625,7 @@ mark_used_reg (pbi, reg, cond, insn) ...@@ -3621,7 +3625,7 @@ mark_used_reg (pbi, reg, cond, insn)
struct reg_cond_life_info *rcli; struct reg_cond_life_info *rcli;
rtx ncond; rtx ncond;
if (some_was_live) if (this_was_live)
{ {
node = splay_tree_lookup (pbi->reg_cond_dead, i); node = splay_tree_lookup (pbi->reg_cond_dead, i);
if (node == NULL) if (node == NULL)
...@@ -3663,7 +3667,7 @@ mark_used_reg (pbi, reg, cond, insn) ...@@ -3663,7 +3667,7 @@ mark_used_reg (pbi, reg, cond, insn)
SET_REGNO_REG_SET (pbi->reg_cond_reg, REGNO (XEXP (cond, 0))); SET_REGNO_REG_SET (pbi->reg_cond_reg, REGNO (XEXP (cond, 0)));
} }
} }
else if (some_was_live) else if (this_was_live)
{ {
/* The register may have been conditionally live previously, but /* The register may have been conditionally live previously, but
is now unconditionally live. Remove it from the conditionally is now unconditionally live. Remove it from the conditionally
......
...@@ -3003,6 +3003,7 @@ peephole2_optimize (dump_file) ...@@ -3003,6 +3003,7 @@ peephole2_optimize (dump_file)
bool changed; bool changed;
#endif #endif
bool do_cleanup_cfg = false; bool do_cleanup_cfg = false;
bool do_rebuild_jump_labels = false;
/* Initialize the regsets we're going to use. */ /* Initialize the regsets we're going to use. */
for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i) for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i)
...@@ -3045,7 +3046,7 @@ peephole2_optimize (dump_file) ...@@ -3045,7 +3046,7 @@ peephole2_optimize (dump_file)
prev = PREV_INSN (insn); prev = PREV_INSN (insn);
if (INSN_P (insn)) if (INSN_P (insn))
{ {
rtx try, before_try; rtx try, before_try, x;
int match_len; int match_len;
rtx note; rtx note;
...@@ -3139,7 +3140,6 @@ peephole2_optimize (dump_file) ...@@ -3139,7 +3140,6 @@ peephole2_optimize (dump_file)
/* Re-insert the EH_REGION notes. */ /* Re-insert the EH_REGION notes. */
if (note) if (note)
{ {
rtx x;
edge eh_edge; edge eh_edge;
for (eh_edge = bb->succ; eh_edge for (eh_edge = bb->succ; eh_edge
...@@ -3209,25 +3209,35 @@ peephole2_optimize (dump_file) ...@@ -3209,25 +3209,35 @@ peephole2_optimize (dump_file)
COPY_REG_SET (live, peep2_insn_data[i].live_before); COPY_REG_SET (live, peep2_insn_data[i].live_before);
/* Update life information for the new sequence. */ /* Update life information for the new sequence. */
x = try;
do do
{ {
if (INSN_P (try)) if (INSN_P (x))
{ {
if (--i < 0) if (--i < 0)
i = MAX_INSNS_PER_PEEP2; i = MAX_INSNS_PER_PEEP2;
peep2_insn_data[i].insn = try; peep2_insn_data[i].insn = x;
propagate_one_insn (pbi, try); propagate_one_insn (pbi, x);
COPY_REG_SET (peep2_insn_data[i].live_before, live); COPY_REG_SET (peep2_insn_data[i].live_before, live);
} }
try = PREV_INSN (try); x = PREV_INSN (x);
} }
while (try != prev); while (x != prev);
/* ??? Should verify that LIVE now matches what we /* ??? Should verify that LIVE now matches what we
had before the new sequence. */ had before the new sequence. */
peep2_current = i; peep2_current = i;
#endif #endif
/* If we generated a jump instruction, it won't have
JUMP_LABEL set. Recompute after we're done. */
for (x = try; x != before_try; x = PREV_INSN (x))
if (GET_CODE (x) == JUMP_INSN)
{
do_rebuild_jump_labels = true;
break;
}
} }
} }
...@@ -3242,6 +3252,9 @@ peephole2_optimize (dump_file) ...@@ -3242,6 +3252,9 @@ peephole2_optimize (dump_file)
FREE_REG_SET (peep2_insn_data[i].live_before); FREE_REG_SET (peep2_insn_data[i].live_before);
FREE_REG_SET (live); FREE_REG_SET (live);
if (do_rebuild_jump_labels)
rebuild_jump_labels (get_insns ());
/* If we eliminated EH edges, we may be able to merge blocks. Further, /* If we eliminated EH edges, we may be able to merge blocks. Further,
we've changed global life since exception handlers are no longer we've changed global life since exception handlers are no longer
reachable. */ reachable. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment