From a6c764d02ec7716720ceac34b667cda3741c5c42 Mon Sep 17 00:00:00 2001 From: Mikhail Maltsev Date: Wed, 4 Nov 2015 15:01:46 +0000 Subject: [PATCH] ENABLE_CHECKING refactoring: remove remaining occurrences libcpp/ * config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove ENABLE_CHECKING. gcc/ * 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. From-SVN: r229758 --- gcc/ChangeLog | 12 ++++++++++++ gcc/cfganal.c | 5 ++--- gcc/config.in | 7 ------- gcc/configure | 7 ++----- gcc/configure.ac | 3 --- gcc/genconditions.c | 1 - gcc/sese.h | 22 ++++++++++++---------- gcc/tree-ssa-loop-manip.c | 10 +++------- libcpp/ChangeLog | 6 ++++++ libcpp/config.in | 3 --- libcpp/configure | 4 +--- libcpp/configure.ac | 2 -- 12 files changed, 38 insertions(+), 44 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9304d780e297..b41693d306bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2015-11-04 Mikhail Maltsev + + * 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. + 2015-11-04 Tom de Vries PR tree-optimization/67742 diff --git a/gcc/cfganal.c b/gcc/cfganal.c index 6f3e3488877d..0f26038b22b2 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 48d7e6441e6b..6f46f7039bd2 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 92bda6c759e4..1d2e8f2644da 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 7e22267e3bb9..d03a0bd1c17c 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 7481ab41d5e5..dd5bc9292210 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 d2ad9bde04b8..98ab4911e206 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 db797cc0b67e..b614412e3f12 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/ChangeLog b/libcpp/ChangeLog index 61b0177dd510..f2ce57abebd8 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2015-11-04 Mikhail Maltsev + + * config.in: Regenerate. + * configure: Regenerate. + * configure.ac: Remove ENABLE_CHECKING. + 2015-11-03 Uros Bizjak * lex.c (search_line_sse42): Correctly advance the pointer to an diff --git a/libcpp/config.in b/libcpp/config.in index 5865eb363fc8..e02ac5efbadb 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 1c70c75eb445..0342f163c9cb 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 3fcbe84f33e9..0005c589fcda 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 -- 2.39.2