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]

Re: [patch] Prevent ICE in flow_loop_dump


Diego Novillo <dnovillo@redhat.com> writes:

> flow_loop_dump assumes that loop->first->head and loop->last->end
> are set.  This is not true in the case of tree flowgraphs.
>

I could have sworn I had submitted a patch for the exact same
problem.
Oh wait, no, that was only in the patch I had sent to you a while
ago. 

> OK to commit to trunk?

Err, isn't this considered an obvious fix?

No offense, and this isn't directed at you specifically, but given the
number of people who review patches on a daily basis, IMHO, it would
cut down on their workload if small, simple, obvious patches, that were
regression tested, and non-controversial, were just posted and
committed under the obvious fix rule, rather than having the person
ask for review of them.  Isn't this what's supposed to happen anyway?
It seems as if they are reviewed at the expense of some other patch
being reviewed that day. 
Or at least, this is the feeling I get.  I haven't actually done the
counting to see if it's correct.
Maybe i'm just wrong?
>
> Diego.
>
>
> 	* flow.c (flow_loop_dump): Do not display insn UIDs if
> 	the basic blocks in the loop contain no RTL instructions.
>
> Index: flow.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/flow.c,v
> retrieving revision 1.471
> diff -d -p -d -u -p -r1.471 flow.c
> --- flow.c	2001/08/23 15:33:12	1.471
> +++ flow.c	2001/08/27 03:42:23
> @@ -9176,11 +9176,17 @@ flow_loop_dump (loop, file, loop_dump_au
>    if (! loop || ! loop->header)
>      return;
>  
> -  fprintf (file, ";;\n;; Loop %d (%d to %d):%s%s\n",
> -	   loop->num, INSN_UID (loop->first->head),
> -	   INSN_UID (loop->last->end),
> -	   loop->shared ? " shared" : "",
> -	   loop->invalid ? " invalid" : "");
> +  if (loop->first->head && loop->last->end)
> +    fprintf (file, ";;\n;; Loop %d (%d to %d):%s%s\n",
> +	    loop->num, INSN_UID (loop->first->head),
> +	    INSN_UID (loop->last->end),
> +	    loop->shared ? " shared" : "",
> +	    loop->invalid ? " invalid" : "");
> +  else
> +    fprintf (file, ";;\n;; Loop %d:%s%s\n", loop->num,
> +	     loop->shared ? " shared" : "",
> +	     loop->invalid ? " invalid" : "");
> +
>    fprintf (file, ";;  header %d, latch %d, pre-header %d, first %d, last %d\n",
>  	   loop->header->index, loop->latch->index,
>  	   loop->pre_header ? loop->pre_header->index : -1,

-- 
"I washed mud, off of mud.
"-Steven Wright


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