]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
basic-block.h (single_succ_edge): Use gcc_checking_assert.
authorNathan Froyd <froydnj@codesourcery.com>
Thu, 21 Oct 2010 13:08:28 +0000 (13:08 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Thu, 21 Oct 2010 13:08:28 +0000 (13:08 +0000)
* basic-block.h (single_succ_edge): Use gcc_checking_assert.
(single_pred_edge, ei_container, ei_next, ei_prev): Likewise.
* cfghooks.c (fixup_reorder_chain): Likewise.
* cfgrtl.c (cfg_layout_merge_blocks): Likewise.
* cgraph.c (cgraph_add_thunk): Likewise.
(cgraph_create_edge_1): Likewise.
(cgraph_create_virtual_clone): Likewise.
* ddg.c (add_cross_iteration_register_deps): Likewise.
* dwarf2out.c (modified_type_die): Likewise.
* emit-rtl.c (set_mem_alias_set): Likewise.
* ggc-zone.c (zone_allocate_marks): Likewise.
* gimple-iterator.c (gsi_move_to_bb_end): Likewise.
* gimple.c (iterative_hash_gimple_type): Likewise.
* graphite-scop-detection.c (create_single_entry_edge): Likewise.
(create_single_exit_edge): Likewise.
* haifa-sched.c (choose_ready): Likewise.
* lto-streamer-in.c (input_gimple_stmt): Likewise.
* passes.c (execute_todo): Likewise.
* sched-ebb.c (begin_schedule_ready): Likewise.
* sel-sched.c (code_motion_process_successors): Likewise.
* tree-call-cdce.c (gen_conditions_for_pow): Likewise.
* tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise.
* tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise.
(phi_arg_index_from_use, phi_ssa_name_p): Likewise.
* tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise.
* tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise.
(ssa_conflicts_add): Likewise.
* tree-ssa-copy.c (replace_exp): Likewise.
* tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
* tree-ssa-forwprop.c (simple_gimple_switch): Likewise.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
* tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise.
(compute_antic): Likewise.
* tree-ssa-ter.c (add_to_partition_kill_list): Likewise.
(add_dependence): Likewise.
(process_replaceable, kill_expr, find_replaceable_exprs): Likewise.
* tree-vrp.c (supports_overflow_infinity): Likewise.
(make_overflow_infinity, negative_overflow_infinity): Likewise.
(avoid_overflow_infinity, register_new_assert_for): Likewise.
(process_assert_insertions_for): Likewise.
* var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise.
(dv_from_value, variable_union, find_loc_in_1pdv): Likewise.
(intersect_loc_chains, variable_merge_over_cur): Likewise.

From-SVN: r165774

30 files changed:
gcc/ChangeLog
gcc/basic-block.h
gcc/cfghooks.c
gcc/cfglayout.c
gcc/cfgrtl.c
gcc/cgraph.c
gcc/ddg.c
gcc/dwarf2out.c
gcc/emit-rtl.c
gcc/ggc-zone.c
gcc/gimple-iterator.c
gcc/gimple.c
gcc/graphite-scop-detection.c
gcc/haifa-sched.c
gcc/lto-streamer-in.c
gcc/passes.c
gcc/sched-ebb.c
gcc/sel-sched.c
gcc/tree-call-cdce.c
gcc/tree-cfgcleanup.c
gcc/tree-flow-inline.h
gcc/tree-into-ssa.c
gcc/tree-ssa-coalesce.c
gcc/tree-ssa-copy.c
gcc/tree-ssa-dom.c
gcc/tree-ssa-forwprop.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-ter.c
gcc/tree-vrp.c
gcc/var-tracking.c

index 10649f9d47dbe5a27aa1f1126614b918aa0d0922..d9316e0e9f1dd0b08ae235442befa6b8613f1ba6 100644 (file)
@@ -1,3 +1,49 @@
+2010-10-21  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * basic-block.h (single_succ_edge): Use gcc_checking_assert.
+       (single_pred_edge, ei_container, ei_next, ei_prev): Likewise.
+       * cfghooks.c (fixup_reorder_chain): Likewise.
+       * cfgrtl.c (cfg_layout_merge_blocks): Likewise.
+       * cgraph.c (cgraph_add_thunk): Likewise.
+       (cgraph_create_edge_1): Likewise.
+       (cgraph_create_virtual_clone): Likewise.
+       * ddg.c (add_cross_iteration_register_deps): Likewise.
+       * dwarf2out.c (modified_type_die): Likewise.
+       * emit-rtl.c (set_mem_alias_set): Likewise.
+       * ggc-zone.c (zone_allocate_marks): Likewise.
+       * gimple-iterator.c (gsi_move_to_bb_end): Likewise.
+       * gimple.c (iterative_hash_gimple_type): Likewise.
+       * graphite-scop-detection.c (create_single_entry_edge): Likewise.
+       (create_single_exit_edge): Likewise.
+       * haifa-sched.c (choose_ready): Likewise.
+       * lto-streamer-in.c (input_gimple_stmt): Likewise.
+       * passes.c (execute_todo): Likewise.
+       * sched-ebb.c (begin_schedule_ready): Likewise.
+       * sel-sched.c (code_motion_process_successors): Likewise.
+       * tree-call-cdce.c (gen_conditions_for_pow): Likewise.
+       * tree-cfg-cleanup.c (tree_forwarder_block_p): Likewise.
+       * tree-flow-inline.h (link_imm_use, move_use_after_head): Likewise.
+       (phi_arg_index_from_use, phi_ssa_name_p): Likewise.
+       * tree-into-ssa.c (insert_updated_phi_nodes_for): Likewise.
+       * tree-ssa-coalesce.c (ssa_conflicts_test_p): Likewise.
+       (ssa_conflicts_add): Likewise.
+       * tree-ssa-copy.c (replace_exp): Likewise.
+       * tree-ssa-dom.c (eliminate_redundant_computations): Likewise.
+       * tree-ssa-forwprop.c (simple_gimple_switch): Likewise.
+       * tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
+       * tree-ssa-pre.c (bitmap_value_insert_into_set): Likewise.
+       (compute_antic): Likewise.
+       * tree-ssa-ter.c (add_to_partition_kill_list): Likewise.
+       (add_dependence): Likewise.
+       (process_replaceable, kill_expr, find_replaceable_exprs): Likewise.
+       * tree-vrp.c (supports_overflow_infinity): Likewise.
+       (make_overflow_infinity, negative_overflow_infinity): Likewise.
+       (avoid_overflow_infinity, register_new_assert_for): Likewise.
+       (process_assert_insertions_for): Likewise.
+       * var-tracking.c (dv_is_value_p, dv_as_decl, dv_from_decl): Likewise.
+       (dv_from_value, variable_union, find_loc_in_1pdv): Likewise.
+       (intersect_loc_chains, variable_merge_over_cur): Likewise.
+
 2010-10-21  Nathan Froyd  <froydnj@codesourcery.com>
 
        * cfgloop.c (flow_loops_find): Call bb_has_abnormal_pred.
index e3b6e2007e367faa6ceb60f458a35fc98458ce97..f175208cfd3a71632aa31283f5d47e3a257106ef 100644 (file)
@@ -560,9 +560,7 @@ single_pred_p (const_basic_block bb)
 static inline edge
 single_succ_edge (const_basic_block bb)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (single_succ_p (bb));
-#endif
+  gcc_checking_assert (single_succ_p (bb));
   return EDGE_SUCC (bb, 0);
 }
 
@@ -572,9 +570,7 @@ single_succ_edge (const_basic_block bb)
 static inline edge
 single_pred_edge (const_basic_block bb)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (single_pred_p (bb));
-#endif
+  gcc_checking_assert (single_pred_p (bb));
   return EDGE_PRED (bb, 0);
 }
 
@@ -606,9 +602,7 @@ typedef struct {
 static inline VEC(edge,gc) *
 ei_container (edge_iterator i)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (i.container);
-#endif
+  gcc_checking_assert (i.container);
   return *i.container;
 }
 
@@ -659,9 +653,7 @@ ei_one_before_end_p (edge_iterator i)
 static inline void
 ei_next (edge_iterator *i)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (i->index < EDGE_COUNT (ei_container (*i)));
-#endif
+  gcc_checking_assert (i->index < EDGE_COUNT (ei_container (*i)));
   i->index++;
 }
 
@@ -669,9 +661,7 @@ ei_next (edge_iterator *i)
 static inline void
 ei_prev (edge_iterator *i)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (i->index > 0);
-#endif
+  gcc_checking_assert (i->index > 0);
   i->index--;
 }
 
index 3532b460851ebc5a0bbdb642d457e3acaa03e7cf..c6e4bc0331338d7fb2224184d8a7865b88076548 100644 (file)
@@ -906,9 +906,7 @@ duplicate_block (basic_block bb, edge e, basic_block after)
   if (bb->count < new_count)
     new_count = bb->count;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (can_duplicate_block_p (bb));
-#endif
+  gcc_checking_assert (can_duplicate_block_p (bb));
 
   new_bb = cfg_hooks->duplicate_block (bb);
   if (after)
index 9fc05fea854a7d5affddad4dbc8a0208a8e99d9f..8a0d35cb6198d5ea0baf93b10d625483a90ef87b 100644 (file)
@@ -828,10 +828,8 @@ fixup_reorder_chain (void)
                                       : label_for_bb (e_fall->dest)), 0))
                    {
                      e_fall->flags &= ~EDGE_FALLTHRU;
-#ifdef ENABLE_CHECKING
-                     gcc_assert (could_fall_through
-                                 (e_taken->src, e_taken->dest));
-#endif
+                     gcc_checking_assert (could_fall_through
+                                          (e_taken->src, e_taken->dest));
                      e_taken->flags |= EDGE_FALLTHRU;
                      update_br_prob_note (bb);
                      e = e_fall, e_fall = e_taken, e_taken = e;
@@ -852,10 +850,8 @@ fixup_reorder_chain (void)
                                     : label_for_bb (e_fall->dest)), 0))
                {
                  e_fall->flags &= ~EDGE_FALLTHRU;
-#ifdef ENABLE_CHECKING
-                 gcc_assert (could_fall_through
-                             (e_taken->src, e_taken->dest));
-#endif
+                 gcc_checking_assert (could_fall_through
+                                      (e_taken->src, e_taken->dest));
                  e_taken->flags |= EDGE_FALLTHRU;
                  update_br_prob_note (bb);
                  continue;
index e46050d02b1e33b1b0beadbd9c29ec7e3bd57502..a158112ee055a17b4bbe5fdff3ff80ae03751d8c 100644 (file)
@@ -2692,9 +2692,7 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b)
 static void
 cfg_layout_merge_blocks (basic_block a, basic_block b)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (cfg_layout_can_merge_blocks_p (a, b));
-#endif
+  gcc_checking_assert (cfg_layout_can_merge_blocks_p (a, b));
 
   if (dump_file)
     fprintf (dump_file, "merging block %d into block %d\n", b->index, a->index);
index 342ad63562f90c03e7b6f60408aa8da0f5ce80c1..e1f47c29dad6a29d51a053f2291dc23ef2f83eb9 100644 (file)
@@ -594,10 +594,9 @@ cgraph_add_thunk (tree alias, tree decl, bool this_adjusting,
   
   node = cgraph_same_body_alias_1 (alias, decl);
   gcc_assert (node);
-#ifdef ENABLE_CHECKING
-  gcc_assert (!virtual_offset
-             || tree_int_cst_equal (virtual_offset, size_int (virtual_value)));
-#endif
+  gcc_checking_assert (!virtual_offset
+                      || tree_int_cst_equal (virtual_offset,
+                                             size_int (virtual_value)));
   node->thunk.fixed_offset = fixed_offset;
   node->thunk.this_adjusting = this_adjusting;
   node->thunk.virtual_value = virtual_value;
@@ -984,11 +983,9 @@ cgraph_create_edge_1 (struct cgraph_node *caller, struct cgraph_node *callee,
      have not been loaded yet.  */
   if (call_stmt)
     {
-#ifdef ENABLE_CHECKING
-      /* This is rather pricely check possibly trigerring construction of
-        call stmt hashtable.  */
-      gcc_assert (!cgraph_edge (caller, call_stmt));
-#endif
+      /* This is a rather expensive check possibly trigerring
+        construction of call stmt hashtable.  */
+      gcc_checking_assert (!cgraph_edge (caller, call_stmt));
 
       gcc_assert (is_gimple_call (call_stmt));
     }
@@ -2258,10 +2255,8 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
   size_t i;
   struct ipa_replace_map *map;
 
-#ifdef ENABLE_CHECKING
   if (!flag_wpa)
-    gcc_assert  (tree_versionable_function_p (old_decl));
-#endif
+    gcc_checking_assert  (tree_versionable_function_p (old_decl));
 
   /* Make a new FUNCTION_DECL tree node */
   if (!args_to_skip)
index 88aaf9bb2e4e92c9f456831bfda68f7a21e9e46b..d7b093b94142d621d03a4d911a9431ea5a46d458 100644 (file)
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -262,10 +262,9 @@ add_cross_iteration_register_deps (ddg_ptr g, df_ref last_def)
   gcc_assert (last_def_node);
   gcc_assert (first_def);
 
-#ifdef ENABLE_CHECKING
   if (DF_REF_ID (last_def) != DF_REF_ID (first_def))
-    gcc_assert (!bitmap_bit_p (&bb_info->gen, DF_REF_ID (first_def)));
-#endif
+    gcc_checking_assert (!bitmap_bit_p (&bb_info->gen,
+                                       DF_REF_ID (first_def)));
 
   /* Create inter-loop true dependences and anti dependences.  */
   for (r_use = DF_REF_CHAIN (last_def); r_use != NULL; r_use = r_use->next)
index d19a5cde95ce3b27ac8455263238ca8cf1c486b8..33a7b561c4de57bacb056242185f72731663fafb 100644 (file)
@@ -12715,15 +12715,14 @@ modified_type_die (tree type, int is_const_type, int is_volatile_type,
       && TYPE_NAME (qualified_type)
       && TREE_CODE (TYPE_NAME (qualified_type)) == TYPE_DECL)
     {
-#ifdef ENABLE_CHECKING
-      gcc_assert (TREE_CODE (TREE_TYPE (TYPE_NAME (qualified_type)))
-                 == INTEGER_TYPE
-                 && TYPE_PRECISION (TREE_TYPE (TYPE_NAME (qualified_type)))
-                    == TYPE_PRECISION (qualified_type)
-                 && TYPE_UNSIGNED (TREE_TYPE (TYPE_NAME (qualified_type)))
-                    == TYPE_UNSIGNED (qualified_type));
-#endif
-      qualified_type = TREE_TYPE (TYPE_NAME (qualified_type));
+      tree t = TREE_TYPE (TYPE_NAME (qualified_type));
+
+      gcc_checking_assert (TREE_CODE (t) == INTEGER_TYPE
+                          && TYPE_PRECISION (t)
+                          == TYPE_PRECISION (qualified_type)
+                          && TYPE_UNSIGNED (t)
+                          == TYPE_UNSIGNED (qualified_type));
+      qualified_type = t;
     }
 
   /* If we do, then we can just use its DIE, if it exists.  */
index 01dd70ab567a73e3347bff6cf593d001ca4a3252..19d290c4b2c3b7b4b4951b3041a7bbd5de8bbd5f 100644 (file)
@@ -1839,10 +1839,8 @@ set_mem_attributes (rtx ref, tree t, int objectp)
 void
 set_mem_alias_set (rtx mem, alias_set_type set)
 {
-#ifdef ENABLE_CHECKING
   /* If the new and old alias sets don't conflict, something is wrong.  */
-  gcc_assert (alias_sets_conflict_p (set, MEM_ALIAS_SET (mem)));
-#endif
+  gcc_checking_assert (alias_sets_conflict_p (set, MEM_ALIAS_SET (mem)));
 
   MEM_ATTRS (mem) = get_mem_attrs (set, MEM_EXPR (mem), MEM_OFFSET (mem),
                                   MEM_SIZE (mem), MEM_ALIGN (mem),
index 4338bb630d0aa0e606f12dadef0c4a4cec57af43..7d8420a11b7f331fa789261b7004b41db89052cc 100644 (file)
@@ -802,9 +802,7 @@ zone_allocate_marks (void)
          n++;
 #endif
        }
-#ifdef ENABLE_CHECKING
-      gcc_assert (n == zone->n_small_pages);
-#endif
+      gcc_checking_assert (n == zone->n_small_pages);
     }
 
   /* We don't collect the PCH zone, but we do have to mark it
index 064b7feef4962d829090889bf615d36ec555e673..d654f2fa28de2dffc5743e5445ebafe23ac53d9b 100644 (file)
@@ -597,9 +597,7 @@ void
 gsi_move_to_bb_end (gimple_stmt_iterator *from, basic_block bb)
 {
   gimple_stmt_iterator last = gsi_last_bb (bb);
-#ifdef ENABLE_CHECKING
-  gcc_assert (gsi_bb (last) == bb);
-#endif
+  gcc_checking_assert (gsi_bb (last) == bb);
 
   /* Have to check gsi_end_p because it could be an empty block.  */
   if (!gsi_end_p (last) && is_ctrl_stmt (gsi_stmt (last)))
index fca78037a0a8044d079562e62e6b6f2aafe35030..6547567bdd4e5e9d79fde0ec3142368380b2d9b5 100644 (file)
@@ -3999,10 +3999,8 @@ iterative_hash_gimple_type (tree type, hashval_t val,
   void **slot;
   struct sccs *state;
 
-#ifdef ENABLE_CHECKING
   /* Not visited during this DFS walk.  */
-  gcc_assert (!pointer_map_contains (sccstate, type));
-#endif
+  gcc_checking_assert (!pointer_map_contains (sccstate, type));
   state = XOBNEW (sccstate_obstack, struct sccs);
   *pointer_map_insert (sccstate, type) = state;
 
index 5fae5aae2b1bb69d4f606d4fab751bfb08a12c05..7110efe0a08367648bcfccb97b06310d42c4693d 100644 (file)
@@ -899,9 +899,7 @@ create_single_entry_edge (sd_region *region)
        single edge pointing from outside into the loop.  */
     gcc_unreachable ();
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (find_single_entry_edge (region));
-#endif
+  gcc_checking_assert (find_single_entry_edge (region));
 }
 
 /* Check if the sd_region, mentioned in EDGE, has no exit bb.  */
@@ -967,9 +965,7 @@ create_single_exit_edge (sd_region *region)
     if (e->aux)
       ((sd_region *) e->aux)->exit = forwarder->dest;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (find_single_exit_edge (region));
-#endif
+  gcc_checking_assert (find_single_exit_edge (region));
 }
 
 /* Unmark the exit edges of all REGIONS.
index 015f8b9d5576a87dcfd39f3aef85d200883c7d68..40f125de3c7953baee07a9b9b3ed051949146f09 100644 (file)
@@ -2727,14 +2727,12 @@ choose_ready (struct ready_list *ready, rtx *insn_ptr)
          {
            insn = ready_element (ready, i);
 
-#ifdef ENABLE_CHECKING
            /* If this insn is recognizable we should have already
               recognized it earlier.
               ??? Not very clear where this is supposed to be done.
               See dep_cost_1.  */
-           gcc_assert (INSN_CODE (insn) >= 0
-                       || recog_memoized (insn) < 0);
-#endif
+           gcc_checking_assert (INSN_CODE (insn) >= 0
+                                || recog_memoized (insn) < 0);
 
            ready_try [i]
              = (/* INSN_CODE check can be omitted here as it is also done later
index 72ac6eca2f306d8538db10ec774114b07ac08627..50352e896a2a61e5b97d6a8e4e569a14fb396142 100644 (file)
@@ -973,9 +973,7 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
                     to unify some types and thus not find a proper
                     field-decl here.  So only assert here if checking
                     is enabled.  */
-#ifdef ENABLE_CHECKING
-                 gcc_assert (tem != NULL_TREE);
-#endif
+                 gcc_checking_assert (tem != NULL_TREE);
                  if (tem != NULL_TREE)
                    TREE_OPERAND (op, 1) = tem;
                }
index 1308ce954f0084e9460dc68e5dbd7bb05918a001..1ee3400e0cac15bf66dcd31d880cdb3cdbaa03bb 100644 (file)
@@ -1310,9 +1310,7 @@ execute_todo (unsigned int flags)
 static void
 verify_interpass_invariants (void)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (!fold_deferring_overflow_warnings_p ());
-#endif
+  gcc_checking_assert (!fold_deferring_overflow_warnings_p ());
 }
 
 /* Clear the last verified flag.  */
index 8e692158013a8d94483d64c820d239f3df9be28e..8090898f8ed88131e09780c7e9a54c1551b5336f 100644 (file)
@@ -147,24 +147,22 @@ begin_schedule_ready (rtx insn, rtx last)
 
       e = find_fallthru_edge (last_bb->succs);
 
-#ifdef ENABLE_CHECKING
-      gcc_assert (!e || !(e->flags & EDGE_COMPLEX));
+      gcc_checking_assert (!e || !(e->flags & EDGE_COMPLEX));
 
-      gcc_assert (BLOCK_FOR_INSN (insn) == last_bb
-                 && !IS_SPECULATION_CHECK_P (insn)
-                 && BB_HEAD (last_bb) != insn
-                 && BB_END (last_bb) == insn);
+      gcc_checking_assert (BLOCK_FOR_INSN (insn) == last_bb
+                          && !IS_SPECULATION_CHECK_P (insn)
+                          && BB_HEAD (last_bb) != insn
+                          && BB_END (last_bb) == insn);
 
       {
        rtx x;
 
        x = NEXT_INSN (insn);
        if (e)
-         gcc_assert (NOTE_P (x) || LABEL_P (x));
+         gcc_checking_assert (NOTE_P (x) || LABEL_P (x));
        else
-         gcc_assert (BARRIER_P (x));
+         gcc_checking_assert (BARRIER_P (x));
       }
-#endif
 
       if (e)
        {
index d93ebaae5a3527de0ac91974a48f8e0c86cd8b05..378e561bf59a3a93e639e4a3d31fc451bde2e23f 100644 (file)
@@ -6360,7 +6360,6 @@ code_motion_process_successors (insn_t insn, av_set_t orig_ops,
         goto rescan;
     }
 
-#ifdef ENABLE_CHECKING
   /* Here, RES==1 if original expr was found at least for one of the
      successors.  After the loop, RES may happen to have zero value
      only if at some point the expr searched is present in av_set, but is
@@ -6368,12 +6367,11 @@ code_motion_process_successors (insn_t insn, av_set_t orig_ops,
      The exception is when the original operation is blocked by
      bookkeeping generated for another fence or for another path in current
      move_op.  */
-  gcc_assert (res == 1
-              || (res == 0
-                  && av_set_could_be_blocked_by_bookkeeping_p (orig_ops,
-                                                              static_params))
-              || res == -1);
-#endif
+  gcc_checking_assert (res == 1
+                      || (res == 0
+                          && av_set_could_be_blocked_by_bookkeeping_p (orig_ops,
+                                                                       static_params))
+                      || res == -1);
 
   /* Merge data, clean up, etc.  */
   if (res != -1 && code_motion_path_driver_info->after_merge_succs)
index 7f0a3e223e9bff18b677cdd9b05ab5f55f871e82..25476e61a09c9dff2236b5fb03c858a6d5c7fd8f 100644 (file)
@@ -541,9 +541,7 @@ gen_conditions_for_pow (gimple pow_call, VEC (gimple, heap) *conds,
   tree base, expn;
   enum tree_code bc;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (check_pow (pow_call));
-#endif
+  gcc_checking_assert (check_pow (pow_call));
 
   *nconds = 0;
 
index ae23cfc6ab9aa3e3e400101cd9729496730ea10c..403566edd7df31c1dcbb96f00c27f387d216462b 100644 (file)
@@ -279,9 +279,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
       || (single_succ_edge (bb)->flags & EDGE_ABNORMAL))
     return false;
 
-#if ENABLE_CHECKING
-  gcc_assert (bb != ENTRY_BLOCK_PTR);
-#endif
+  gcc_checking_assert (bb != ENTRY_BLOCK_PTR);
 
   locus = single_succ_edge (bb)->goto_locus;
 
index 7103d238b095fe86becfa36ba54fa22e64a01cc2..1a62cdd1f44f99455c3b0b52d9584434e657f4f9 100644 (file)
@@ -230,10 +230,8 @@ link_imm_use (ssa_use_operand_t *linknode, tree def)
   else
     {
       root = &(SSA_NAME_IMM_USE_NODE (def));
-#ifdef ENABLE_CHECKING
       if (linknode->use)
         gcc_checking_assert (*(linknode->use) == def);
-#endif
       link_imm_use_to_list (linknode, root);
     }
 }
@@ -556,13 +554,11 @@ phi_arg_index_from_use (use_operand_p use)
   root = gimple_phi_arg (phi, 0);
   index = element - root;
 
-#ifdef ENABLE_CHECKING
   /* Make sure the calculation doesn't have any leftover bytes.  If it does,
      then imm_use is likely not the first element in phi_arg_d.  */
-  gcc_assert ((((char *)element - (char *)root)
-              % sizeof (struct phi_arg_d)) == 0
-             && index < gimple_phi_capacity (phi));
-#endif
+  gcc_checking_assert ((((char *)element - (char *)root)
+                       % sizeof (struct phi_arg_d)) == 0
+                      && index < gimple_phi_capacity (phi));
 
  return index;
 }
@@ -613,9 +609,7 @@ phi_ssa_name_p (const_tree t)
 {
   if (TREE_CODE (t) == SSA_NAME)
     return true;
-#ifdef ENABLE_CHECKING
-  gcc_assert (is_gimple_min_invariant (t));
-#endif
+  gcc_checking_assert (is_gimple_min_invariant (t));
   return false;
 }
 
@@ -975,9 +969,7 @@ static inline use_operand_p
 move_use_after_head (use_operand_p use_p, use_operand_p head,
                      use_operand_p last_p)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (USE_FROM_PTR (use_p) == USE_FROM_PTR (head));
-#endif
+  gcc_checking_assert (USE_FROM_PTR (use_p) == USE_FROM_PTR (head));
   /* Skip head when we find it.  */
   if (use_p != head)
     {
index 8c2b159399da4e5897ad8131420c471f9e49dd57..91b5fc83667a146edd1801f79b246274df453980 100644 (file)
@@ -2998,12 +2998,10 @@ insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks,
   bitmap_iterator bi;
   unsigned i;
 
-#if defined ENABLE_CHECKING
   if (TREE_CODE (var) == SSA_NAME)
-    gcc_assert (is_old_name (var));
+    gcc_checking_assert (is_old_name (var));
   else
-    gcc_assert (symbol_marked_for_renaming (var));
-#endif
+    gcc_checking_assert (symbol_marked_for_renaming (var));
 
   /* Get all the definition sites for VAR.  */
   db = find_def_blocks_for (var);
index be44d5681084e37eb8ae51b3262e15b82a02be72..7615612e67bfbe0d52a8d8f2a5e2a036fe33d094 100644 (file)
@@ -547,11 +547,9 @@ ssa_conflicts_test_p (ssa_conflicts_p ptr, unsigned x, unsigned y)
 {
   bitmap b;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (x < ptr->size);
-  gcc_assert (y < ptr->size);
-  gcc_assert (x != y);
-#endif
+  gcc_checking_assert (x < ptr->size);
+  gcc_checking_assert (y < ptr->size);
+  gcc_checking_assert (x != y);
 
   b = ptr->conflicts[x];
   if (b)
@@ -579,11 +577,9 @@ ssa_conflicts_add_one (ssa_conflicts_p ptr, unsigned x, unsigned y)
 static inline void
 ssa_conflicts_add (ssa_conflicts_p ptr, unsigned x, unsigned y)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (x < ptr->size);
-  gcc_assert (y < ptr->size);
-  gcc_assert (x != y);
-#endif
+  gcc_checking_assert (x < ptr->size);
+  gcc_checking_assert (y < ptr->size);
+  gcc_checking_assert (x != y);
   ssa_conflicts_add_one (ptr, x, y);
   ssa_conflicts_add_one (ptr, y, x);
 }
index c82943c47aa1404f05e4fb96e1c0bec1fd8bef53..a92b63be5f95b65ec94a1398026c5f3bd0964744 100644 (file)
@@ -211,12 +211,10 @@ replace_exp (use_operand_p op_p, tree val)
 void
 propagate_tree_value (tree *op_p, tree val)
 {
-#if defined ENABLE_CHECKING
-  gcc_assert (!(TREE_CODE (val) == SSA_NAME
-                && *op_p
-               && TREE_CODE (*op_p) == SSA_NAME
-               && !may_propagate_copy (*op_p, val)));
-#endif
+  gcc_checking_assert (!(TREE_CODE (val) == SSA_NAME
+                        && *op_p
+                        && TREE_CODE (*op_p) == SSA_NAME
+                        && !may_propagate_copy (*op_p, val)));
 
   if (TREE_CODE (val) == SSA_NAME)
     *op_p = val;
index 54a35af4a855362586b7883d310bd512ea415e42..bab6ced1c601bbd84d7c7aff8edc426b9c3c1ae2 100644 (file)
@@ -1852,10 +1852,8 @@ eliminate_redundant_computations (gimple_stmt_iterator* gsi)
            || useless_type_conversion_p (expr_type, TREE_TYPE (cached_lhs))))
       || may_propagate_copy_into_stmt (stmt, cached_lhs))
   {
-#if defined ENABLE_CHECKING
-      gcc_assert (TREE_CODE (cached_lhs) == SSA_NAME
-                 || is_gimple_min_invariant (cached_lhs));
-#endif
+      gcc_checking_assert (TREE_CODE (cached_lhs) == SSA_NAME
+                          || is_gimple_min_invariant (cached_lhs));
 
       if (dump_file && (dump_flags & TDF_DETAILS))
        {
index a68755e8b4032a059aebce5bb98986a2d115c51d..f4808e78fffbb9786ed6f8d763b8a428aa17b6cd 100644 (file)
@@ -1286,10 +1286,8 @@ simplify_gimple_switch (gimple stmt)
 
              def = gimple_assign_rhs1 (def_stmt);
 
-#ifdef ENABLE_CHECKING
              /* ??? Why was Jeff testing this?  We are gimple...  */
-             gcc_assert (is_gimple_val (def));
-#endif
+             gcc_checking_assert (is_gimple_val (def));
 
              to = TREE_TYPE (cond);
              ti = TREE_TYPE (def);
index d4d108d95eff1840664f9d020b56da2198bd8526..8f91bd699b8645f1462274b36f236bc00f482eb6 100644 (file)
@@ -895,9 +895,7 @@ bitmap_value_insert_into_set (bitmap_set_t set, pre_expr expr)
 {
   unsigned int val = get_expr_value_id (expr);
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (expr->id == get_or_alloc_expression_id (expr));
-#endif
+  gcc_checking_assert (expr->id == get_or_alloc_expression_id (expr));
 
   /* Constant values are always considered to be part of the set.  */
   if (value_id_constant_p (val))
@@ -2608,10 +2606,8 @@ compute_antic (void)
                                                      block->index));
            }
        }
-#ifdef ENABLE_CHECKING
       /* Theoretically possible, but *highly* unlikely.  */
-      gcc_assert (num_iterations < 500);
-#endif
+      gcc_checking_assert (num_iterations < 500);
     }
 
   statistics_histogram_event (cfun, "compute_antic iterations",
@@ -2640,10 +2636,8 @@ compute_antic (void)
                                                            block->index));
                }
            }
-#ifdef ENABLE_CHECKING
          /* Theoretically possible, but *highly* unlikely.  */
-         gcc_assert (num_iterations < 500);
-#endif
+         gcc_checking_assert (num_iterations < 500);
        }
       statistics_histogram_event (cfun, "compute_partial_antic iterations",
                                  num_iterations);
index 0fb8028543e15a76005846ed3fa9390b6753563b..7bd766954fa2c8ffa32f3b4b1cb80eabe8f10013 100644 (file)
@@ -296,9 +296,7 @@ add_to_partition_kill_list (temp_expr_table_p tab, int p, int ver)
 static inline void
 remove_from_partition_kill_list (temp_expr_table_p tab, int p, int version)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (tab->kill_list[p]);
-#endif
+  gcc_checking_assert (tab->kill_list[p]);
   bitmap_clear_bit (tab->kill_list[p], version);
   if (bitmap_empty_p (tab->kill_list[p]))
     {
@@ -345,10 +343,8 @@ add_dependence (temp_expr_table_p tab, int version, tree var)
   else
     {
       i = var_to_partition (tab->map, var);
-#ifdef ENABLE_CHECKING
-      gcc_assert (i != NO_PARTITION);
-      gcc_assert (tab->num_in_part[i] != 0);
-#endif
+      gcc_checking_assert (i != NO_PARTITION);
+      gcc_checking_assert (tab->num_in_part[i] != 0);
       /* Only dependencies on ssa_names which are coalesced with something need
          to be tracked.  Partitions with containing only a single SSA_NAME
         *cannot* have their value changed.  */
@@ -479,9 +475,7 @@ process_replaceable (temp_expr_table_p tab, gimple stmt, int call_cnt)
   ssa_op_iter iter;
   bitmap def_vars, use_vars;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (is_replaceable_p (stmt));
-#endif
+  gcc_checking_assert (is_replaceable_p (stmt));
 
   def = SINGLE_SSA_TREE_OPERAND (stmt, SSA_OP_DEF);
   version = SSA_NAME_VERSION (def);
@@ -534,9 +528,7 @@ kill_expr (temp_expr_table_p tab, int partition)
       finished_with_expr (tab, version, true);
     }
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (!tab->kill_list[partition]);
-#endif
+  gcc_checking_assert (!tab->kill_list[partition]);
 }
 
 
@@ -704,9 +696,7 @@ find_replaceable_exprs (var_map map)
   FOR_EACH_BB (bb)
     {
       find_replaceable_in_bb (table, bb);
-#ifdef ENABLE_CHECKING
-      gcc_assert (bitmap_empty_p (table->partition_in_use));
-#endif
+      gcc_checking_assert (bitmap_empty_p (table->partition_in_use));
     }
 
   ret = free_temp_expr_table (table);
index c005c53c9023b5efa79e2cdf640d5f37bfc953c5..8ab986ef1bd107db2efd0049566c50039a912fa3 100644 (file)
@@ -243,9 +243,7 @@ supports_overflow_infinity (const_tree type)
 static inline tree
 make_overflow_infinity (tree val)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (val != NULL_TREE && CONSTANT_CLASS_P (val));
-#endif
+  gcc_checking_assert (val != NULL_TREE && CONSTANT_CLASS_P (val));
   val = copy_node (val);
   TREE_OVERFLOW (val) = 1;
   return val;
@@ -256,9 +254,7 @@ make_overflow_infinity (tree val)
 static inline tree
 negative_overflow_infinity (tree type)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (supports_overflow_infinity (type));
-#endif
+  gcc_checking_assert (supports_overflow_infinity (type));
   return make_overflow_infinity (vrp_val_min (type));
 }
 
@@ -267,9 +263,7 @@ negative_overflow_infinity (tree type)
 static inline tree
 positive_overflow_infinity (tree type)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (supports_overflow_infinity (type));
-#endif
+  gcc_checking_assert (supports_overflow_infinity (type));
   return make_overflow_infinity (vrp_val_max (type));
 }
 
@@ -332,9 +326,7 @@ avoid_overflow_infinity (tree val)
     return vrp_val_max (TREE_TYPE (val));
   else
     {
-#ifdef ENABLE_CHECKING
-      gcc_assert (vrp_val_is_min (val));
-#endif
+      gcc_checking_assert (vrp_val_is_min (val));
       return vrp_val_min (TREE_TYPE (val));
     }
 }
@@ -4131,13 +4123,11 @@ register_new_assert_for (tree name, tree expr,
   assert_locus_t n, loc, last_loc;
   basic_block dest_bb;
 
-#if defined ENABLE_CHECKING
-  gcc_assert (bb == NULL || e == NULL);
+  gcc_checking_assert (bb == NULL || e == NULL);
 
   if (e == NULL)
-    gcc_assert (gimple_code (gsi_stmt (si)) != GIMPLE_COND
-               && gimple_code (gsi_stmt (si)) != GIMPLE_SWITCH);
-#endif
+    gcc_checking_assert (gimple_code (gsi_stmt (si)) != GIMPLE_COND
+                        && gimple_code (gsi_stmt (si)) != GIMPLE_SWITCH);
 
   /* Never build an assert comparing against an integer constant with
      TREE_OVERFLOW set.  This confuses our undefined overflow warning
@@ -5059,10 +5049,9 @@ process_assert_insertions_for (tree name, assert_locus_t loc)
     {
       /* We have been asked to insert the assertion on an edge.  This
         is used only by COND_EXPR and SWITCH_EXPR assertions.  */
-#if defined ENABLE_CHECKING
-      gcc_assert (gimple_code (gsi_stmt (loc->si)) == GIMPLE_COND
-         || gimple_code (gsi_stmt (loc->si)) == GIMPLE_SWITCH);
-#endif
+      gcc_checking_assert (gimple_code (gsi_stmt (loc->si)) == GIMPLE_COND
+                          || (gimple_code (gsi_stmt (loc->si))
+                              == GIMPLE_SWITCH));
 
       gsi_insert_on_edge (loc->e, assert_stmt);
       return true;
index c74ef7cd649e5a470f555054bc4850c01d55fd89..c3d5077dbaf6566efc1ebe6e23702229482a0d60 100644 (file)
@@ -1075,9 +1075,7 @@ dv_is_value_p (decl_or_value dv)
 static inline tree
 dv_as_decl (decl_or_value dv)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (dv_is_decl_p (dv));
-#endif
+  gcc_checking_assert (dv_is_decl_p (dv));
   return (tree) dv;
 }
 
@@ -1085,9 +1083,7 @@ dv_as_decl (decl_or_value dv)
 static inline rtx
 dv_as_value (decl_or_value dv)
 {
-#ifdef ENABLE_CHECKING
-  gcc_assert (dv_is_value_p (dv));
-#endif
+  gcc_checking_assert (dv_is_value_p (dv));
   return (rtx)dv;
 }
 
@@ -1136,9 +1132,7 @@ dv_from_decl (tree decl)
 {
   decl_or_value dv;
   dv = decl;
-#ifdef ENABLE_CHECKING
-  gcc_assert (dv_is_decl_p (dv));
-#endif
+  gcc_checking_assert (dv_is_decl_p (dv));
   return dv;
 }
 
@@ -1148,9 +1142,7 @@ dv_from_value (rtx value)
 {
   decl_or_value dv;
   dv = value;
-#ifdef ENABLE_CHECKING
-  gcc_assert (dv_is_value_p (dv));
-#endif
+  gcc_checking_assert (dv_is_value_p (dv));
   return dv;
 }
 
@@ -2182,10 +2174,8 @@ variable_union (variable src, dataflow_set *set)
              nnode->next = dnode;
              dnode = nnode;
            }
-#ifdef ENABLE_CHECKING
          else if (r == 0)
-           gcc_assert (rtx_equal_p (dnode->loc, snode->loc));
-#endif
+           gcc_checking_assert (rtx_equal_p (dnode->loc, snode->loc));
 
          if (r >= 0)
            snode = snode->next;
@@ -2549,17 +2539,13 @@ find_loc_in_1pdv (rtx loc, variable var, htab_t vars)
   if (!var)
     return NULL;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (dv_onepart_p (var->dv));
-#endif
+  gcc_checking_assert (dv_onepart_p (var->dv));
 
   if (!var->n_var_parts)
     return NULL;
 
-#ifdef ENABLE_CHECKING
-  gcc_assert (var->var_part[0].offset == 0);
-  gcc_assert (loc != dv_as_opaque (var->dv));
-#endif
+  gcc_checking_assert (var->var_part[0].offset == 0);
+  gcc_checking_assert (loc != dv_as_opaque (var->dv));
 
   loc_code = GET_CODE (loc);
   for (node = var->var_part[0].loc_chain; node; node = node->next)
@@ -2591,20 +2577,16 @@ find_loc_in_1pdv (rtx loc, variable var, htab_t vars)
          while (node->next && GET_CODE (node->next->loc) == VALUE)
            {
              node = node->next;
-#ifdef ENABLE_CHECKING
-             gcc_assert (!canon_value_cmp (node->loc,
-                                           dv_as_value (var->dv)));
-#endif
+             gcc_checking_assert (!canon_value_cmp (node->loc,
+                                                    dv_as_value (var->dv)));
              if (loc == node->loc)
                return node;
            }
          continue;
        }
 
-#ifdef ENABLE_CHECKING
-      gcc_assert (node == var->var_part[0].loc_chain);
-      gcc_assert (!node->next);
-#endif
+      gcc_checking_assert (node == var->var_part[0].loc_chain);
+      gcc_checking_assert (!node->next);
 
       dv = dv_from_value (node->loc);
       rvar = (variable) htab_find_with_hash (vars, dv, dv_htab_hash (dv));
@@ -2672,15 +2654,11 @@ intersect_loc_chains (rtx val, location_chain *dest, struct dfset_merge *dsm,
     {
       location_chain s2node;
 
-#ifdef ENABLE_CHECKING
-      gcc_assert (dv_onepart_p (s2var->dv));
-#endif
+      gcc_checking_assert (dv_onepart_p (s2var->dv));
 
       if (s2var->n_var_parts)
        {
-#ifdef ENABLE_CHECKING
-         gcc_assert (s2var->var_part[0].offset == 0);
-#endif
+         gcc_checking_assert (s2var->var_part[0].offset == 0);
          s2node = s2var->var_part[0].loc_chain;
 
          for (; s1node && s2node;
@@ -2829,10 +2807,8 @@ loc_cmp (rtx x, rtx y)
       if (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
          < DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y)))
        return -1;
-#ifdef ENABLE_CHECKING
-      gcc_assert (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
-                 > DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y)));
-#endif
+      gcc_checking_assert (DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x))
+                          > DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (y)));
       return 1;
     }
 
@@ -3592,10 +3568,9 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
       dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash);
       gcc_assert (*dstslot == dvar);
       canonicalize_values_star (dstslot, dst);
-#ifdef ENABLE_CHECKING
-      gcc_assert (dstslot
-                 == shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash));
-#endif
+      gcc_checking_assert (dstslot
+                          == shared_hash_find_slot_noinsert_1 (dst->vars,
+                                                               dv, dvhash));
       dvar = (variable)*dstslot;
     }
   else
@@ -3660,11 +3635,9 @@ variable_merge_over_cur (variable s1var, struct dfset_merge *dsm)
          dstslot = shared_hash_find_slot_noinsert_1 (dst->vars, dv, dvhash);
          gcc_assert (*dstslot == dvar);
          canonicalize_values_star (dstslot, dst);
-#ifdef ENABLE_CHECKING
-         gcc_assert (dstslot
-                     == shared_hash_find_slot_noinsert_1 (dst->vars,
-                                                          dv, dvhash));
-#endif
+         gcc_checking_assert (dstslot
+                              == shared_hash_find_slot_noinsert_1 (dst->vars,
+                                                                   dv, dvhash));
          dvar = (variable)*dstslot;
        }
     }