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