This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reorg vs flow, the saga continues
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: reorg vs flow, the saga continues
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 1 Nov 1999 12:59:56 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <4224.941459454@upchuck>
On Mon, Nov 01, 1999 at 05:30:54AM -0700, Jeffrey A Law wrote:
> When we call update_block, which in turn calls incr_tick_for_insn, which
> blows up with an out of range access trying to get BLOCK_NUM for an insn
> created by reorg.
Oops, I fixed the usage of BLOCK_NUM in mark_target_live_regs but
not in incr_tick_for_insn. Try the appended.
Ideally, reorg would call set_block_num for each new insn it creates.
r~
Index: resource.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/resource.c,v
retrieving revision 1.19
diff -c -p -d -r1.19 resource.c
*** resource.c 1999/10/28 19:30:02 1.19
--- resource.c 1999/11/01 20:58:30
*************** void
*** 1187,1196 ****
incr_ticks_for_insn (insn)
rtx insn;
{
! int b = BLOCK_NUM (insn);
!
! if (b != -1)
! bb_ticks[b]++;
}
/* Add TRIAL to the set of resources used at the end of the current
--- 1187,1197 ----
incr_ticks_for_insn (insn)
rtx insn;
{
! if (INSN_UID (target) < (int) VARRAY_SIZE (basic_block_for_insn))
! {
! int b = BLOCK_NUM (target);
! bb_ticks[b]++;
! }
}
/* Add TRIAL to the set of resources used at the end of the current