From: Richard Biener Date: Wed, 28 Oct 2015 10:07:03 +0000 (+0000) Subject: common.opt (fchecking): New flag controlling flag_checking. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d27d749d70f21c40b58918b9aca2cfbb2f8d5e4;p=gcc.git common.opt (fchecking): New flag controlling flag_checking. 2015-10-28 Richard Biener * common.opt (fchecking): New flag controlling flag_checking. * passes.c (verify_curr_properties): Drop DEBUG_FUNCTION. * timevar.c (timer::print): Adjust output. * doc/invoke.texi (fchecking): Document. From-SVN: r229480 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af9963f9688..416bc155c11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-10-28 Richard Biener + + * common.opt (fchecking): New flag controlling flag_checking. + * passes.c (verify_curr_properties): Drop DEBUG_FUNCTION. + * timevar.c (timer::print): Adjust output. + * doc/invoke.texi (fchecking): Document. + 2015-10-28 Richard Biener PR middle-end/68067 diff --git a/gcc/common.opt b/gcc/common.opt index 12ca0d66b7f..961a1b63c47 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -46,11 +46,6 @@ int optimize_fast Variable bool in_lto_p = false -; Enable additional checks of internal state consistency, which may slow -; the compiler down. -Variable -bool flag_checking = CHECKING_P - ; 0 means straightforward implementation of complex divide acceptable. ; 1 means wide ranges of inputs must work for complex divide. ; 2 means C99-like requirements for complex multiply and divide. @@ -1002,6 +997,10 @@ fcheck-new Common Var(flag_check_new) Check the return value of new in C++. +fchecking +Common Var(flag_checking) Init(CHECKING_P) +Perform internal consistency checkings. + fcombine-stack-adjustments Common Report Var(flag_combine_stack_adjustments) Optimization Looks for opportunities to reduce stack adjustments and stack references. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 462eef0bedf..76fdc31769d 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -310,7 +310,7 @@ Objective-C and Objective-C++ Dialects}. -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol -fsanitize-undefined-trap-on-error @gol --fcheck-pointer-bounds -fchkp-check-incomplete-type @gol +-fcheck-pointer-bounds -fchecking -fchkp-check-incomplete-type @gol -fchkp-first-field-has-own-bounds -fchkp-narrow-bounds @gol -fchkp-narrow-to-innermost-array -fchkp-optimize @gol -fchkp-use-fast-string-functions -fchkp-use-nochk-string-functions @gol @@ -6145,6 +6145,12 @@ structure field attribute (@pxref{Type Attributes}) and functions for controlling the Pointer Bounds Checker. @xref{Pointer Bounds Checker builtins}, for more information. +@item -fchecking +@opindex fchecking +@opindex fno-checking +Enable internal consistency checking. The default depends on +the compiler configuration. + @item -fchkp-check-incomplete-type @opindex fchkp-check-incomplete-type @opindex fno-chkp-check-incomplete-type diff --git a/gcc/passes.c b/gcc/passes.c index 43dd4e08407..82834ca1f5c 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -2073,7 +2073,7 @@ clear_last_verified (function *fn, void *data ATTRIBUTE_UNUSED) /* Helper function. Verify that the properties has been turn into the properties expected by the pass. */ -static void DEBUG_FUNCTION +static void verify_curr_properties (function *fn, void *data) { unsigned int props = (size_t)data; diff --git a/gcc/timevar.c b/gcc/timevar.c index 35438506d9a..a0e1a0a3f1f 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -728,13 +728,10 @@ timer::print (FILE *fp) #endif fprintf (fp, "%8u kB\n", (unsigned) (total->ggc_mem >> 10)); - if (flag_checking) - { - fprintf (fp, "Extra diagnostic checks enabled; " - "compiler may run slowly.\n"); - fprintf (fp, "Configure with --enable-checking=release " - "to disable checks.\n"); - } + if (CHECKING_P || flag_checking) + fprintf (fp, "Extra diagnostic checks enabled; compiler may run slowly.\n"); + if (CHECKING_P) + fprintf (fp, "Configure with --enable-checking=release to disable checks.\n"); #ifndef ENABLE_ASSERT_CHECKING fprintf (fp, "Internal checks disabled; compiler is not suited for release.\n"); fprintf (fp, "Configure with --enable-checking=release to enable checks.\n");