This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cfg-branch] bb-reorder fix


> 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 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]