This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add -fchecking
- From: Richard Biener <rguenther at suse dot de>
- To: Jeff Law <law at redhat dot com>
- Cc: Mikhail Maltsev <maltsevm at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Oct 2015 11:08:11 +0100 (CET)
- Subject: Re: [PATCH] Add -fchecking
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1510271415490 dot 28064 at zhemvz dot fhfr dot qr> <562F98F9 dot 20206 at gmail dot com> <562FBA24 dot 2080407 at redhat dot com>
On Tue, 27 Oct 2015, Jeff Law wrote:
> On 10/27/2015 09:32 AM, Mikhail Maltsev wrote:
> > On 10/27/2015 04:17 PM, Richard Biener wrote:
> > >
> > > This adds -fchecking as a way to enable internal consistency checks
> > > even in release builds (or disable checking with -fno-checking - up to
> > > a certain extent - with checking enabled).
> >
> > I remember that Jakub proposed to use __builtin_expect with
> > flag_checking. I wonder, if it is possible to implement without hacking
> > AWK scripts just for this particular case? For example, to define
> > flag_checking to something like
> >
> > #define flag_checking __builtin_expect (flag_checking_val, CHECKING_P)
> >
> > (provided that flag_checking_val is the actual value got from
> > command-line options).
> I think this ought to be a follow-up item. And yes, we're going to need some
> level of indirection so that we're not writing __builtin_expect all over the
> place.
Yeah, we should do that as followup. We should also make sure to
only make the branch unlikely and not end up with optimizing
all checking code for size (making it even slower than it is now).
Richard.
> Jeff
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)