static void
value_remove_from_set_bitmap (value_set_t set, tree v)
{
-#ifdef ENABLE_CHECKING
- if (!set->indexed)
- abort ();
-#endif
+ gcc_assert (set->indexed);
if (!set->values)
return;
static inline void
value_insert_into_set_bitmap (value_set_t set, tree v)
{
-#ifdef ENABLE_CHECKING
- if (!set->indexed)
- abort ();
-#endif
+ gcc_assert (set->indexed);
if (set->values == NULL)
{
{
tree val;
/* XXX: For now, we only let SSA_NAMES into the bitmap sets. */
- if (TREE_CODE (expr) != SSA_NAME)
- abort ();
+ gcc_assert (TREE_CODE (expr) == SSA_NAME);
val = get_value_handle (expr);
- if (val == NULL)
- abort ();
+ gcc_assert (val);
if (!is_gimple_min_invariant (val))
bitmap_set_bit (set->values, VALUE_HANDLE_ID (val));
bitmap_set_bit (set->expressions, SSA_NAME_VERSION (expr));
{
value_set_node_t newnode = pool_alloc (value_set_node_pool);
tree val = get_value_handle (expr);
-
- if (val == NULL)
- abort ();
+ gcc_assert (val);
/* For indexed sets, insert the value into the set value bitmap.
For all sets, add it to the linked list and increment the list
}
break;
case 'd':
- abort ();
+ gcc_unreachable ();
case 'x':
{
tree phi = NULL;
int i;
- if (TREE_CODE (expr) != SSA_NAME)
- abort ();
+ gcc_assert (TREE_CODE (expr) == SSA_NAME);
if (TREE_CODE (SSA_NAME_DEF_STMT (expr)) == PHI_NODE)
phi = SSA_NAME_DEF_STMT (expr);
else
}
case 'x':
{
- if (TREE_CODE (expr) == SSA_NAME)
- return true;
- abort ();
+ gcc_assert (TREE_CODE (expr) == SSA_NAME);
+ return true;
}
case 'c':
- abort ();
+ gcc_unreachable ();
}
return false;
}
FOR_ALL_BB (bb)
{
ANTIC_IN (bb) = set_new (true);
- if (bb->flags & BB_VISITED)
- abort ();
+ gcc_assert (!(bb->flags & BB_VISITED));
}
while (changed)
if (genop == NULL)
{
genop = VALUE_HANDLE_EXPR_SET (expr)->head->expr;
- if (TREE_CODE_CLASS (TREE_CODE (genop)) != '1'
- && TREE_CODE_CLASS (TREE_CODE (genop)) != '2'
- && TREE_CODE_CLASS (TREE_CODE (genop)) != 'r')
- abort ();
+ gcc_assert (TREE_CODE_CLASS (TREE_CODE (genop)) == '1'
+ || TREE_CODE_CLASS (TREE_CODE (genop)) == '2'
+ || TREE_CODE_CLASS (TREE_CODE (genop)) == 'r');
genop = create_expression_by_pieces (block, genop, stmts);
}
return genop;
break;
}
default:
- abort ();
+ gcc_unreachable ();
}
v = get_value_handle (expr);
}
vprime = get_value_handle (eprime);
- if (!vprime)
- abort ();
+ gcc_assert (vprime);
edoubleprime = bitmap_find_leader (AVAIL_OUT (bprime),
vprime);
if (edoubleprime == NULL)
first_s = edoubleprime;
else if (first_s != edoubleprime)
all_same = false;
- if (first_s != edoubleprime
- && operand_equal_p (first_s, edoubleprime, 0))
- abort ();
+ gcc_assert (first_s == edoubleprime
+ || !operand_equal_p
+ (first_s, edoubleprime, 0));
}
}
/* If we can insert it, it's not the same value
enum tree_code code = TREE_CODE (expr);
tree vexpr;
-#if defined ENABLE_CHECKING
- if (TREE_CODE_CLASS (code) != '1'
- && TREE_CODE_CLASS (code) != '2'
- && TREE_CODE_CLASS (code) != 'r')
- abort ();
-#endif
+ gcc_assert (TREE_CODE_CLASS (code) == '1'
+ || TREE_CODE_CLASS (code) == '2'
+ || TREE_CODE_CLASS (code) == 'r');
if (TREE_CODE_CLASS (code) == '1')
vexpr = pool_alloc (unary_node_pool);
&& (TREE_CODE (*rhs_p) != SSA_NAME
|| may_propagate_copy (*rhs_p, sprime)))
{
- if (sprime == *rhs_p)
- abort ();
+ gcc_assert (sprime != *rhs_p);
if (dump_file && (dump_flags & TDF_DETAILS))
{
static void
init_pre (void)
{
- size_t tsize;
basic_block bb;
connect_infinite_loops_to_exit ();
sizeof (struct value_set_node), 30);
calculate_dominance_info (CDI_POST_DOMINATORS);
calculate_dominance_info (CDI_DOMINATORS);
- tsize = tree_size (build (PLUS_EXPR, void_type_node, NULL_TREE, NULL_TREE));
- binary_node_pool = create_alloc_pool ("Binary tree nodes", tsize, 30);
- tsize = tree_size (build1 (NEGATE_EXPR, void_type_node, NULL_TREE));
- unary_node_pool = create_alloc_pool ("Unary tree nodes", tsize, 30);
- tsize = tree_size (build (COMPONENT_REF, void_type_node, NULL_TREE,
- NULL_TREE, NULL_TREE));
- reference_node_pool = create_alloc_pool ("Reference tree nodes", tsize, 30);
+ binary_node_pool = create_alloc_pool ("Binary tree nodes",
+ tree_code_size (PLUS_EXPR), 30);
+ unary_node_pool = create_alloc_pool ("Unary tree nodes",
+ tree_code_size (NEGATE_EXPR), 30);
+ reference_node_pool = create_alloc_pool ("Reference tree nodes",
+ tree_code_size (COMPONENT_REF), 30);
FOR_ALL_BB (bb)
{
EXP_GEN (bb) = set_new (true);