aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 0d147fd..43dd4e0 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1952,9 +1952,8 @@ execute_function_todo (function *fn, void *data)
gcc_assert (dom_info_state (fn, CDI_POST_DOMINATORS) == DOM_NONE);
/* If we've seen errors do not bother running any verifiers. */
- if (!seen_error ())
+ if (flag_checking && !seen_error ())
{
-#if defined ENABLE_CHECKING
dom_state pre_verify_state = dom_info_state (fn, CDI_DOMINATORS);
dom_state pre_verify_pstate = dom_info_state (fn, CDI_POST_DOMINATORS);
@@ -1988,7 +1987,6 @@ execute_function_todo (function *fn, void *data)
/* Make sure verifiers don't change dominator state. */
gcc_assert (dom_info_state (fn, CDI_DOMINATORS) == pre_verify_state);
gcc_assert (dom_info_state (fn, CDI_POST_DOMINATORS) == pre_verify_pstate);
-#endif
}
fn->last_verified = flags & TODO_verify_all;
@@ -2008,11 +2006,10 @@ execute_function_todo (function *fn, void *data)
static void
execute_todo (unsigned int flags)
{
-#if defined ENABLE_CHECKING
- if (cfun
+ if (flag_checking
+ && cfun
&& need_ssa_update_p (cfun))
gcc_assert (flags & TODO_update_ssa_any);
-#endif
timevar_push (TV_TODO);
@@ -2076,14 +2073,12 @@ 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. */
-#ifdef ENABLE_CHECKING
-static void
+static void DEBUG_FUNCTION
verify_curr_properties (function *fn, void *data)
{
unsigned int props = (size_t)data;
gcc_assert ((fn->curr_properties & props) == props);
}
-#endif
/* Initialize pass dump file. */
/* This is non-static so that the plugins can use it. */
@@ -2331,10 +2326,9 @@ execute_one_pass (opt_pass *pass)
/* Run pre-pass verification. */
execute_todo (pass->todo_flags_start);
-#ifdef ENABLE_CHECKING
- do_per_function (verify_curr_properties,
- (void *)(size_t)pass->properties_required);
-#endif
+ if (flag_checking)
+ do_per_function (verify_curr_properties,
+ (void *)(size_t)pass->properties_required);
/* If a timevar is present, start it. */
if (pass->tv_id != TV_NONE)