From: Mikhail Maltsev <maltsevm@gmail.com>
To: gcc-patches mailing list <gcc-patches@gcc.gnu.org>,
Jeff Law <law@redhat.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: [PATCH 10/9] ENABLE_CHECKING refactoring: remove remaining occurrences
Date: Sun, 01 Nov 2015 20:19:00 -0000 [thread overview]
Message-ID: <563673C7.2030607@gmail.com> (raw)
In-Reply-To: <56130763.4070206@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]
This patch cleans up remaining bits related to ENABLE_CHECKING. After applying
this patch (on top of part 9) we will no longer have any references to
ENABLE_CHECKING in the source code.
Bootstrapped and regtested (on top of part 9) on x86_64-pc-linux-gnu with
--enable-checking=yes and --enable-checking=release.
libcpp/ChangeLog:
2015-11-01 Mikhail Maltsev <maltsevm@gmail.com>
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Remove ENABLE_CHECKING.
gcc/ChangeLog:
2015-11-01 Mikhail Maltsev <maltsevm@gmail.com>
* cfganal.c (inverted_post_order_compute): Remove conditional
compilation, use flag_checking.
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Remove ENABLE_CHECKING.
* genconditions.c: Do not #undef ENABLE_CHECKING.
* sese.h (bb_in_region): Comment out broken check.
* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa_1): Remove
conditional compilation, use flag_checking.
--
Regards,
Mikhail Maltsev
[-- Attachment #2: enable_checking_rest.patch --]
[-- Type: text/x-patch, Size: 5507 bytes --]
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 6f3e348..0f26038 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -784,9 +784,8 @@ inverted_post_order_compute (int *post_order)
int post_order_num = 0;
sbitmap visited;
-#if ENABLE_CHECKING
- verify_no_unreachable_blocks ();
-#endif
+ if (flag_checking)
+ verify_no_unreachable_blocks ();
/* Allocate stack for back-tracking up CFG. */
stack = XNEWVEC (edge_iterator, n_basic_blocks_for_fn (cfun) + 1);
diff --git a/gcc/config.in b/gcc/config.in
index 48d7e64..6f46f70 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -76,13 +76,6 @@
#endif
-/* Define if you want more run-time sanity checks. This one gets a grab bag of
- miscellaneous but relatively cheap checks. */
-#ifndef USED_FOR_TARGET
-#undef ENABLE_CHECKING
-#endif
-
-
/* Define to 1 to specify that we are using the BID decimal floating point
format instead of DPD */
#ifndef USED_FOR_TARGET
diff --git a/gcc/configure b/gcc/configure
index 92bda6c..1d2e8f2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -7098,9 +7098,6 @@ IFS="$ac_save_IFS"
nocommon_flag=""
if test x$ac_checking != x ; then
-$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
-
-
$as_echo "#define CHECKING_P 1" >>confdefs.h
nocommon_flag=-fno-common
@@ -18405,7 +18402,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18408 "configure"
+#line 18405 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18511,7 +18508,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18514 "configure"
+#line 18511 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7e22267..d03a0bd 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -566,9 +566,6 @@ IFS="$ac_save_IFS"
nocommon_flag=""
if test x$ac_checking != x ; then
- AC_DEFINE(ENABLE_CHECKING, 1,
-[Define if you want more run-time sanity checks. This one gets a grab
- bag of miscellaneous but relatively cheap checks.])
AC_DEFINE(CHECKING_P, 1,
[Define to 1 if you want more run-time sanity checks. This one gets a grab
bag of miscellaneous but relatively cheap checks.])
diff --git a/gcc/genconditions.c b/gcc/genconditions.c
index 7481ab4..dd5bc92 100644
--- a/gcc/genconditions.c
+++ b/gcc/genconditions.c
@@ -59,7 +59,6 @@ write_header (void)
#if GCC_VERSION >= 3001\n\
\n\
/* Do not allow checking to confuse the issue. */\n\
-#undef ENABLE_CHECKING\n\
#undef CHECKING_P\n\
#define CHECKING_P 0\n\
#undef ENABLE_TREE_CHECKING\n\
diff --git a/gcc/sese.h b/gcc/sese.h
index d2ad9bd..98ab491 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -108,16 +108,18 @@ sese_nb_params (sese_info_p region)
static inline bool
bb_in_region (basic_block bb, basic_block entry, basic_block exit)
{
-#ifdef ENABLE_CHECKING
- {
- edge e;
- edge_iterator ei;
-
- /* Check that there are no edges coming in the region: all the
- predecessors of EXIT are dominated by ENTRY. */
- FOR_EACH_EDGE (e, ei, exit->preds)
- dominated_by_p (CDI_DOMINATORS, e->src, entry);
- }
+ /* FIXME: PR67842. */
+#if 0
+ if (flag_checking)
+ {
+ edge e;
+ edge_iterator ei;
+
+ /* Check that there are no edges coming in the region: all the
+ predecessors of EXIT are dominated by ENTRY. */
+ FOR_EACH_EDGE (e, ei, exit->preds)
+ gcc_assert (dominated_by_p (CDI_DOMINATORS, e->src, entry));
+ }
#endif
return dominated_by_p (CDI_DOMINATORS, bb, entry)
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index db797cc..b614412 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -616,14 +616,10 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag,
/* If the pass has caused the SSA form to be out-of-date, update it
now. */
- if (update_flag == 0)
- {
-#ifdef ENABLE_CHECKING
- verify_ssa (true, true);
-#endif
- }
- else
+ if (update_flag != 0)
update_ssa (update_flag);
+ else if (flag_checking)
+ verify_ssa (true, true);
bitmap_obstack_initialize (&loop_renamer_obstack);
diff --git a/libcpp/config.in b/libcpp/config.in
index 5865eb3..e02ac5e 100644
--- a/libcpp/config.in
+++ b/libcpp/config.in
@@ -17,9 +17,6 @@
/* Define to enable system headers canonicalization. */
#undef ENABLE_CANONICAL_SYSTEM_HEADERS
-/* Define if you want more run-time sanity checks. */
-#undef ENABLE_CHECKING
-
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
diff --git a/libcpp/configure b/libcpp/configure
index 1c70c75..0342f16 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -7298,9 +7298,7 @@ IFS="$ac_save_IFS"
if test x$ac_checking != x ; then
-$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
-
- $as_echo "#define CHECKING_P 1" >>confdefs.h
+$as_echo "#define CHECKING_P 1" >>confdefs.h
else
$as_echo "#define CHECKING_P 0" >>confdefs.h
diff --git a/libcpp/configure.ac b/libcpp/configure.ac
index 3fcbe84..0005c58 100644
--- a/libcpp/configure.ac
+++ b/libcpp/configure.ac
@@ -164,8 +164,6 @@ done
IFS="$ac_save_IFS"
if test x$ac_checking != x ; then
- AC_DEFINE(ENABLE_CHECKING, 1,
-[Define if you want more run-time sanity checks.])
AC_DEFINE(CHECKING_P, 1,
[Define to 1 if you want more run-time sanity checks.])
else
next prev parent reply other threads:[~2015-11-01 20:19 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 23:27 [PATCH 1/9] ENABLE_CHECKING refactoring Mikhail Maltsev
2015-10-05 23:29 ` [PATCH 2/9] ENABLE_CHECKING refactoring: libcpp Mikhail Maltsev
2015-10-06 12:40 ` Bernd Schmidt
2015-10-12 20:57 ` Jeff Law
2015-10-19 1:18 ` Mikhail Maltsev
2015-10-21 22:29 ` Jeff Law
2015-10-21 21:19 ` Jeff Law
2015-10-05 23:30 ` [PATCH 3/9] ENABLE_CHECKING refactoring: Java and Ada Mikhail Maltsev
2015-10-22 19:25 ` Jeff Law
2015-10-05 23:31 ` [PATCH 4/9] ENABLE_CHECKING refactoring: Fortran Mikhail Maltsev
2015-10-23 22:38 ` Jeff Law
2015-10-05 23:32 ` [PATCH 5/9] ENABLE_CHECKING refactoring: pool allocators Mikhail Maltsev
2015-10-06 12:41 ` Bernd Schmidt
2015-10-06 12:45 ` Richard Biener
2015-10-19 0:47 ` Mikhail Maltsev
2015-10-21 11:02 ` Richard Biener
2015-10-26 2:07 ` Mikhail Maltsev
2015-10-26 9:48 ` Richard Biener
2015-10-26 10:57 ` Mikhail Maltsev
2015-10-05 23:34 ` [PATCH 6/9] ENABLE_CHECKING refactoring: generators Mikhail Maltsev
2015-10-06 12:57 ` Richard Biener
2015-10-19 0:09 ` Mikhail Maltsev
2015-10-21 10:57 ` Richard Biener
2015-10-28 16:32 ` Jeff Law
2015-10-29 16:31 ` Jeff Law
2015-10-05 23:39 ` [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE Mikhail Maltsev
2015-10-06 12:46 ` Bernd Schmidt
2015-10-06 12:59 ` Richard Biener
2015-10-06 12:59 ` Richard Biener
2015-10-19 0:56 ` Mikhail Maltsev
2015-10-19 12:19 ` Bernd Schmidt
2015-10-26 17:04 ` Jeff Law
2015-10-26 17:15 ` Bernd Schmidt
2015-10-26 19:05 ` Jeff Law
2015-10-28 1:17 ` Jeff Law
2015-10-28 2:12 ` Trevor Saunders
2015-10-05 23:40 ` [PATCH 8/9] ENABLE_CHECKING refactoring: target-specific parts Mikhail Maltsev
2015-10-06 12:48 ` Bernd Schmidt
2015-10-29 19:43 ` Jeff Law
2015-10-29 21:23 ` Jeff Law
2015-10-30 4:13 ` Jeff Law
2015-10-30 4:20 ` Jeff Law
2015-10-06 12:53 ` [PATCH 1/9] ENABLE_CHECKING refactoring Richard Biener
2015-10-12 20:48 ` Jeff Law
2015-10-13 21:33 ` Jeff Law
2015-10-18 8:25 ` Mikhail Maltsev
2015-10-19 11:14 ` Bernd Schmidt
2015-10-19 13:54 ` Mikhail Maltsev
2015-10-21 15:59 ` Jeff Law
2015-10-21 16:06 ` Bernd Schmidt
2015-10-21 16:18 ` Richard Biener
2015-10-21 16:28 ` Jeff Law
2015-11-07 22:42 ` Gerald Pfeifer
2015-10-21 16:19 ` Jeff Law
2015-10-21 16:22 ` Bernd Schmidt
2015-10-21 16:44 ` Jakub Jelinek
2015-10-22 7:58 ` Richard Biener
2015-10-21 20:06 ` Jeff Law
2015-10-20 16:14 ` Jeff Law
2015-10-21 21:17 ` Jeff Law
2015-11-01 14:58 ` [PATCH 9/9] ENABLE_CHECKING refactoring: C family front ends Mikhail Maltsev
2015-11-02 23:34 ` Jeff Law
2015-11-04 14:41 ` Mikhail Maltsev
2015-11-01 20:19 ` Mikhail Maltsev [this message]
2015-11-02 23:35 ` [PATCH 10/9] ENABLE_CHECKING refactoring: remove remaining occurrences Jeff Law
2015-11-04 15:03 ` Mikhail Maltsev
2016-02-23 15:21 ` Richard Biener
2016-02-24 14:17 ` Martin Liška
2016-02-24 14:27 ` Michael Matz
2016-02-24 14:53 ` Martin Liška
2016-02-24 15:43 ` Pierre-Marie de Rodat
2016-02-25 9:24 ` Richard Biener
2016-02-25 10:14 ` Pierre-Marie de Rodat
2016-02-25 10:15 ` Martin Liška
2016-02-25 10:16 ` Pierre-Marie de Rodat
2016-02-25 9:24 ` Richard Biener
[not found] ` <C5BB0125-FB5F-46C6-B16D-74C3D0F07C10@gmail.com>
2015-11-08 15:37 ` Mikhail Maltsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563673C7.2030607@gmail.com \
--to=maltsevm@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).