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: [PATCH] Check headers in verify_loop_structure


On Thu, 7 Feb 2013, Marek Polacek wrote:

> On Thu, Feb 07, 2013 at 02:56:48PM +0100, Richard Biener wrote:
> > > +  /* Check the headers.  */
> > > +  FOR_EACH_BB (bb)
> > > +    {
> > > +      /* Skip BBs in the root tree.  */
> > > +      if (bb->loop_father == current_loops->tree_root)
> > > +	continue;
> > 
> > You shouldn't need this ... it will miss missing toplevel loops
> 
> Done.
> 
> > > +      if (bb_loop_header_p (bb))
> > > +	if (bb->loop_father->header != bb)
> > 
> >   && bb->loop_father->header != bb)
> 
> Fixed.  Regtested/bootstrapped on x86_64 again (with tailc fix:
> http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00310.html), ok now?

Ok.  Let's watch for fallout...

Thanks,
Richard.

> 2013-02-07  Marek Polacek  <polacek@redhat.com>
> 
> 	* cfgloop.c (verify_loop_structure): Add more checking
> 	of headers.
> 
> --- gcc/cfgloop.c.mp	2013-02-07 14:07:24.580864372 +0100
> +++ gcc/cfgloop.c	2013-02-07 15:06:19.278571095 +0100
> @@ -1353,6 +1353,15 @@ verify_loop_structure (void)
>  	}
>      }
>  
> +  /* Check the headers.  */
> +  FOR_EACH_BB (bb)
> +    if (bb_loop_header_p (bb)
> +	&& bb->loop_father->header != bb)
> +      {
> +	error ("loop with header %d not in loop tree", bb->index);
> +	err = 1;
> +      }
> +
>    /* Check get_loop_body.  */
>    visited = sbitmap_alloc (last_basic_block);
>    bitmap_clear (visited);
> 
> 	Marek
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746
GF: Jeff Hawn, Jennifer Guild, Felix Imend


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