This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cfg-branch] bb-reorder fix
- From: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, gcc-pdo at atrey dot karlin dot mff dot cuni dot cz
- Date: Wed, 27 Feb 2002 19:14:51 +0100
- Subject: Re: [cfg-branch] bb-reorder fix
- References: <20020227170813.GD22021@atrey.karlin.mff.cuni.cz>
> Hi,
> the cfg branch build dies at stage1 cp/class.o due to crash in bb-reorder.
> It is in the loop rotating code that gets confused about duplicated block
> and attempts to find the it in the trace, but it is not present there,
> while it's duplicate is.
>
> I guess we really wanted to set visited only to blocks present in trace.
> Josef, can you check?
I'll look at it. I think this patch could cause some problems, eg. infinite loop when duplicating some BB of a loop.
Josef
> Index: bb-reorder.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/bb-reorder.c,v
> retrieving revision 1.41.2.10
> diff -c -3 -p -r1.41.2.10 bb-reorder.c
> *** bb-reorder.c 2002/02/19 10:35:22 1.41.2.10
> --- bb-reorder.c 2002/02/27 17:05:06
> *************** find_traces_1_round (branch_th, exec_th,
> *** 381,387 ****
> if (rtl_dump_file)
> fprintf (rtl_dump_file, "Duplicated bb %d (created bb %d)\n",
> old_bb->index, new_bb->index);
> - RBI (old_bb)->visited = *n_traces;
> RBI (old_bb)->duplicated = *n_traces;
> RBI (bb)->next = new_bb;
> RBI (bb)->visited = *n_traces;
> --- 381,386 ----