Commit 925fa227 by Richard Henderson Committed by Richard Henderson

resource.c: Revert Oct 26 20:42 and Oct 27 00:56 changes.

        * resource.c: Revert Oct 26 20:42 and Oct 27 00:56 changes.
        * toplev.c: Revert Nov 1 13:22 change.

From-SVN: r30357
parent da018257
Tue Nov 2 15:38:17 1999 Richard Henderson <rth@cygnus.com>
* resource.c: Revert Oct 26 20:42 and Oct 27 00:56 changes.
* toplev.c: Revert Nov 1 13:22 change.
Tue Nov 2 14:21:37 1999 Jason Eckhardt <jle@cygnus.com> Tue Nov 2 14:21:37 1999 Jason Eckhardt <jle@cygnus.com>
* config/pa/pa.md (height reduction patterns): Add checks for * config/pa/pa.md (height reduction patterns): Add checks for
...@@ -91,7 +96,6 @@ Mon Nov 1 15:41:01 1999 Mark P. Mitchell <mark@codesourcery.com> ...@@ -91,7 +96,6 @@ Mon Nov 1 15:41:01 1999 Mark P. Mitchell <mark@codesourcery.com>
* combine.c (combine_instructions): Use xmalloc instead of alloca. * combine.c (combine_instructions): Use xmalloc instead of alloca.
>>>>>>> 1.4890
Mon Nov 1 13:22:30 1999 Richard Henderson <rth@cygnus.com> Mon Nov 1 13:22:30 1999 Richard Henderson <rth@cygnus.com>
* toplev.c (rest_of_compilation): Don't optimize the CFG * toplev.c (rest_of_compilation): Don't optimize the CFG
...@@ -841,7 +845,6 @@ Wed Oct 27 12:33:40 1999 Mark Mitchell <mark@codesourcery.com> ...@@ -841,7 +845,6 @@ Wed Oct 27 12:33:40 1999 Mark Mitchell <mark@codesourcery.com>
* stupid.c (find_clobbered_regs): Take additional parameter. * stupid.c (find_clobbered_regs): Take additional parameter.
(stupid_life_analysis): Adjust calls to note_stores. (stupid_life_analysis): Adjust calls to note_stores.
>>>>>>> 1.4876
Wed Oct 27 19:26:12 1999 Nick Clifton <nickc@cygnus.com> Wed Oct 27 19:26:12 1999 Nick Clifton <nickc@cygnus.com>
* config/arm/coff.h (STRUCTURE_SIZE_BOUNDARY): Delete * config/arm/coff.h (STRUCTURE_SIZE_BOUNDARY): Delete
......
...@@ -74,6 +74,7 @@ static HARD_REG_SET current_live_regs; ...@@ -74,6 +74,7 @@ static HARD_REG_SET current_live_regs;
static HARD_REG_SET pending_dead_regs; static HARD_REG_SET pending_dead_regs;
static void update_live_status PROTO ((rtx, rtx, void *)); static void update_live_status PROTO ((rtx, rtx, void *));
static int find_basic_block PROTO ((rtx));
static rtx next_insn_no_annul PROTO ((rtx)); static rtx next_insn_no_annul PROTO ((rtx));
static rtx find_dead_or_set_registers PROTO ((rtx, struct resources*, static rtx find_dead_or_set_registers PROTO ((rtx, struct resources*,
rtx*, int, struct resources, rtx*, int, struct resources,
...@@ -112,6 +113,40 @@ update_live_status (dest, x, data) ...@@ -112,6 +113,40 @@ update_live_status (dest, x, data)
CLEAR_HARD_REG_BIT (pending_dead_regs, i); CLEAR_HARD_REG_BIT (pending_dead_regs, i);
} }
} }
/* Find the number of the basic block that starts closest to INSN. Return -1
if we couldn't find such a basic block. */
static int
find_basic_block (insn)
rtx insn;
{
int i;
/* Scan backwards to the previous BARRIER. Then see if we can find a
label that starts a basic block. Return the basic block number. */
for (insn = prev_nonnote_insn (insn);
insn && GET_CODE (insn) != BARRIER;
insn = prev_nonnote_insn (insn))
;
/* The start of the function is basic block zero. */
if (insn == 0)
return 0;
/* See if any of the upcoming CODE_LABELs start a basic block. If we reach
anything other than a CODE_LABEL or note, we can't find this code. */
for (insn = next_nonnote_insn (insn);
insn && GET_CODE (insn) == CODE_LABEL;
insn = next_nonnote_insn (insn))
{
for (i = 0; i < n_basic_blocks; i++)
if (insn == BLOCK_HEAD (i))
return i;
}
return -1;
}
/* Similar to next_insn, but ignores insns in the delay slots of /* Similar to next_insn, but ignores insns in the delay slots of
an annulled branch. */ an annulled branch. */
...@@ -832,9 +867,8 @@ mark_target_live_regs (insns, target, res) ...@@ -832,9 +867,8 @@ mark_target_live_regs (insns, target, res)
b = tinfo->block; b = tinfo->block;
} }
if (b == -1 if (b == -1)
&& INSN_UID (target) < (int) VARRAY_SIZE (basic_block_for_insn)) b = find_basic_block (target);
b = BLOCK_NUM (target);
if (target_hash_table != NULL) if (target_hash_table != NULL)
{ {
...@@ -1138,8 +1172,6 @@ init_resource_info (epilogue_insn) ...@@ -1138,8 +1172,6 @@ init_resource_info (epilogue_insn)
target_hash_table = (struct target_info **) target_hash_table = (struct target_info **)
xcalloc (TARGET_HASH_PRIME, sizeof (struct target_info *)); xcalloc (TARGET_HASH_PRIME, sizeof (struct target_info *));
bb_ticks = (int *) xcalloc (n_basic_blocks, sizeof (int)); bb_ticks = (int *) xcalloc (n_basic_blocks, sizeof (int));
compute_bb_for_insn (get_max_uid ());
} }
/* Free up the resources allcated to mark_target_live_regs (). This /* Free up the resources allcated to mark_target_live_regs (). This
...@@ -1187,7 +1219,7 @@ void ...@@ -1187,7 +1219,7 @@ void
incr_ticks_for_insn (insn) incr_ticks_for_insn (insn)
rtx insn; rtx insn;
{ {
int b = BLOCK_NUM (insn); int b = find_basic_block (insn);
if (b != -1) if (b != -1)
bb_ticks[b]++; bb_ticks[b]++;
...@@ -1264,7 +1296,7 @@ find_free_register (current_insn, last_insn, class_str, mode, reg_set) ...@@ -1264,7 +1296,7 @@ find_free_register (current_insn, last_insn, class_str, mode, reg_set)
/* And we don't clobber traceback for noreturn functions. */ /* And we don't clobber traceback for noreturn functions. */
if ((regno == FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM) if ((regno == FRAME_POINTER_REGNUM || regno == HARD_FRAME_POINTER_REGNUM)
&& (! reload_completed || frame_pointer_needed)) && (! reload_completed || frame_pointer_needed))
continue; continue;
success = 1; success = 1;
for (j = HARD_REGNO_NREGS (regno, mode) - 1; j >= 0; j--) for (j = HARD_REGNO_NREGS (regno, mode) - 1; j >= 0; j--)
......
...@@ -4343,11 +4343,6 @@ rest_of_compilation (decl) ...@@ -4343,11 +4343,6 @@ rest_of_compilation (decl)
TIMEVAR TIMEVAR
(dbr_sched_time, (dbr_sched_time,
{ {
/* ??? Keep the CFG up to date after cross-jumping. */
find_basic_blocks (insns, max_reg_num (), rtl_dump_file, 0);
count_or_remove_death_notes (NULL, 1);
life_analysis (insns, max_reg_num (), rtl_dump_file, 0);
dbr_schedule (insns, rtl_dump_file); dbr_schedule (insns, rtl_dump_file);
}); });
......
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