This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[obvious] fix bb-reorder
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 Jun 2003 14:05:46 +0200
- Subject: [obvious] fix bb-reorder
Hi,
this patch fixes bb-reorder not to send a basic block to next round
when we are in the last round. This fixes an ICE in fixup_reorder_chain
if some previous pass creates negative frequencies of basic blocks.
Bootstrapped/regtested i386 (pentium4).
I'm commiting it to mainline as obvious.
Josef
2003-06-28 Josef Zlomek <zlomekj@suse.cz>
* bb-reorder.c (find_traces_1_round): Do not send basic block
to next round when we are in the last round.
Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.57
diff -c -3 -p -r1.57 bb-reorder.c
*** bb-reorder.c 15 Jun 2003 13:43:30 -0000 1.57
--- bb-reorder.c 27 Jun 2003 09:39:43 -0000
*************** find_traces_1_round (int branch_th, int
*** 374,381 ****
fprintf (rtl_dump_file, "Getting bb %d\n", bb->index);
/* If the BB's frequency is too low send BB to the next round. */
! if (bb->frequency < exec_th || bb->count < count_th
! || ((round < N_ROUNDS - 1) && probably_never_executed_bb_p (bb)))
{
int key = bb_to_key (bb);
bbd[bb->index].heap = new_heap;
--- 374,382 ----
fprintf (rtl_dump_file, "Getting bb %d\n", bb->index);
/* If the BB's frequency is too low send BB to the next round. */
! if (round < N_ROUNDS - 1
! && (bb->frequency < exec_th || bb->count < count_th
! || probably_never_executed_bb_p (bb)))
{
int key = bb_to_key (bb);
bbd[bb->index].heap = new_heap;