Make gimple.h checks conditional with ENABLE_GIMPLE_CHECKING

Richard Guenther rguenther@suse.de
Wed Jun 9 09:31:00 GMT 2010


On Wed, 9 Jun 2010, Manuel López-Ibáñez wrote:

> On 9 June 2010 00:57, Jan Hubicka <hubicka@ucw.cz> wrote:
> >  {
> > +#ifdef ENABLE_CHECKING
> >   gcc_assert (!(bb->flags & BB_RTL));
> > +#endif
> >   bb->il.gimple->seq = seq;
> >  }
> 
> Can't we simply have enable_checking_assert or similar?
> 
> >
> > @@ -1326,7 +1328,9 @@ gimple_def_ops (const_gimple g)
> >  static inline void
> >  gimple_set_def_ops (gimple g, struct def_optype_d *def)
> >  {
> > +#ifdef ENABLE_GIMPLE_CHECKING
> >   gcc_assert (gimple_has_ops (g));
> > +#endif
> >   g->gsops.opbase.def_ops = def;
> >  }
> 
> And here  gcc_gimple_assert or gimple_checking_assert or something
> like that, to not sprinkle the code with a lot of extra ifdef-endif.
> 
> Just a suggestion for future maintenance and easy readability.

Good suggestion.  Though maybe the extra noise is even useful ...

Richard.


More information about the Gcc-patches mailing list