Commit 070b797d by Bernhard Fischer Committed by Bernhard Reutner-Fischer

tree-ssa-sccvn.c, [...]: Remove unnecessary trailing whitespace.

2007-08-26  Bernhard Fischer  <aldot@gcc.gnu.org>

	* tree-ssa-sccvn.c, tree-ssa-sccvn.h, tree-vn.c,
	tree-ssa-pre.c: Remove unnecessary trailing whitespace.

From-SVN: r127816
parent 0393c663
2007-08-26 Bernhard Fischer <aldot@gcc.gnu.org>
* tree-ssa-sccvn.c, tree-ssa-sccvn.h, tree-vn.c,
tree-ssa-pre.c: Remove unnecessary trailing whitespace.
2007-08-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/32991
......
......@@ -111,7 +111,7 @@ along with GCC; see the file COPYING3. If not see
Fourth, we eliminate fully redundant expressions.
This is a simple statement walk that replaces redundant
calculations with the now available values. */
calculations with the now available values. */
/* Representations of value numbers:
......@@ -189,7 +189,7 @@ DEF_VEC_P (vuse_vec);
DEF_VEC_ALLOC_P (vuse_vec, heap);
static VEC(vuse_vec, heap) *expression_vuses;
/* Mapping from expression to id number we can use in bitmap sets. */
static VEC(tree, heap) *expressions;
......@@ -545,7 +545,7 @@ phi_trans_add (tree e, tree v, basic_block pred, VEC (tree, gc) *vuses)
static inline bool
constant_expr_p (tree v)
{
return TREE_CODE (v) != VALUE_HANDLE &&
return TREE_CODE (v) != VALUE_HANDLE &&
(TREE_CODE (v) == FIELD_DECL || is_gimple_min_invariant (v));
}
......@@ -965,7 +965,7 @@ find_leader_in_sets (tree expr, bitmap_set_t set1, bitmap_set_t set2)
the phis in PRED. SEEN is a bitmap saying which expression we have
translated since we started translation of the toplevel expression.
Return NULL if we can't find a leader for each part of the
translated expression. */
translated expression. */
static tree
phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2,
......@@ -1323,13 +1323,13 @@ phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2,
{
tree val;
tree def = PHI_ARG_DEF (phi, e->dest_idx);
if (is_gimple_min_invariant (def))
return def;
if (is_undefined_value (def))
return NULL;
val = get_value_handle (def);
gcc_assert (val);
return def;
......@@ -1343,9 +1343,9 @@ phi_translate_1 (tree expr, bitmap_set_t set1, bitmap_set_t set2,
}
/* Translate EXPR using phis in PHIBLOCK, so that it has the values of
the phis in PRED.
the phis in PRED.
Return NULL if we can't find a leader for each part of the
translated expression. */
translated expression. */
static tree
phi_translate (tree expr, bitmap_set_t set1, bitmap_set_t set2,
......@@ -2063,7 +2063,7 @@ can_value_number_call (tree stmt)
}
/* Return true if OP is an exception handler related operation, such as
FILTER_EXPRor EXC_PTR_EXPR. */
FILTER_EXPR or EXC_PTR_EXPR. */
static bool
is_exception_related (tree op)
......@@ -2077,7 +2077,7 @@ is_exception_related (tree op)
static bool
can_value_number_operation (tree op)
{
return (UNARY_CLASS_P (op)
return (UNARY_CLASS_P (op)
&& !is_exception_related (TREE_OPERAND (op, 0)))
|| BINARY_CLASS_P (op)
|| COMPARISON_CLASS_P (op)
......@@ -2523,7 +2523,7 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
NECESSARY (temp) = 0;
VN_INFO_GET (PHI_RESULT (temp))->valnum = PHI_RESULT (temp);
VEC_safe_push (tree, heap, inserted_exprs, temp);
FOR_EACH_EDGE (pred, ei, block->preds)
add_phi_arg (temp, avail[pred->src->index], pred);
......@@ -2892,7 +2892,7 @@ is_undefined_value (tree expr)
}
/* Add OP to EXP_GEN (block), and possibly to the maximal set if it is
not defined by a phi node.
not defined by a phi node.
PHI nodes can't go in the maximal sets because they are not in
TMP_GEN, so it is possible to get into non-monotonic situations
during ANTIC calculation, because it will *add* bits. */
......@@ -2956,7 +2956,7 @@ find_existing_value_expr (tree t, VEC (tree, gc) *vuses)
vh = vn_lookup_with_vuses (t, vuses);
else
vh = vn_lookup (t);
if (!vh)
return NULL;
exprset = VALUE_HANDLE_EXPR_SET (vh);
......@@ -3036,7 +3036,7 @@ create_value_expr_from (tree expr, basic_block block, VEC (tree, gc) *vuses)
}
if (TREE_CODE (op) != TREE_LIST)
add_to_exp_gen (block, op);
if (TREE_CODE (val) == VALUE_HANDLE)
TREE_TYPE (val) = TREE_TYPE (TREE_OPERAND (vexpr, i));
......@@ -3247,7 +3247,7 @@ get_sccvn_value (tree name)
if (!valvh && !is_invariant)
{
tree defstmt = SSA_NAME_DEF_STMT (val);
gcc_assert (VN_INFO (val)->valnum == val);
/* PHI nodes can't have vuses and attempts to iterate over
their VUSE operands will crash. */
......@@ -3261,7 +3261,7 @@ get_sccvn_value (tree name)
}
valvh = vn_lookup_or_add_with_stmt (val, defstmt);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "SCCVN says ");
......@@ -3275,7 +3275,7 @@ get_sccvn_value (tree name)
fprintf (dump_file, ")\n");
}
else
print_generic_stmt (dump_file, val, 0);
print_generic_stmt (dump_file, val, 0);
}
if (valvh)
return valvh;
......@@ -3320,13 +3320,13 @@ make_values_for_stmt (tree stmt, basic_block block)
tree valvh = NULL_TREE;
tree lhsval;
VEC (tree, gc) *vuses = NULL;
valvh = get_sccvn_value (lhs);
if (valvh)
{
vn_add (lhs, valvh);
bitmap_value_insert_into_set (AVAIL_OUT (block), lhs);
bitmap_value_insert_into_set (AVAIL_OUT (block), lhs);
/* Shortcut for FRE. We have no need to create value expressions,
just want to know what values are available where. */
if (in_fre)
......@@ -3343,7 +3343,7 @@ make_values_for_stmt (tree stmt, basic_block block)
bitmap_value_insert_into_set (AVAIL_OUT (block), lhs);
return true;
}
lhsval = valvh ? valvh : get_value_handle (lhs);
vuses = copy_vuses_from_stmt (stmt);
STRIP_USELESS_TYPE_CONVERSION (rhs);
......@@ -3370,10 +3370,10 @@ make_values_for_stmt (tree stmt, basic_block block)
tree val = vn_lookup_or_add_with_vuses (newt, vuses);
vn_add (lhs, val);
}
add_to_exp_gen (block, newt);
}
}
bitmap_insert_into_set (TMP_GEN (block), lhs);
bitmap_value_insert_into_set (AVAIL_OUT (block), lhs);
return true;
......@@ -3385,7 +3385,7 @@ make_values_for_stmt (tree stmt, basic_block block)
|| TREE_INVARIANT (rhs)
|| DECL_P (rhs))
{
if (lhsval)
{
set_expression_vuses (rhs, vuses);
......@@ -3460,7 +3460,7 @@ compute_avail (void)
tree def = gimple_default_def (cfun, param);
vn_lookup_or_add (def);
if (!in_fre)
if (!in_fre)
{
bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
bitmap_value_insert_into_set (maximal_set, def);
......@@ -3621,7 +3621,7 @@ eliminate (void)
sprime = bitmap_find_leader (AVAIL_OUT (b),
get_value_handle (lhs));
if (sprime
&& sprime != lhs
&& (TREE_CODE (*rhs_p) != SSA_NAME
......@@ -3793,7 +3793,7 @@ static void
init_pre (bool do_fre)
{
basic_block bb;
next_expression_id = 0;
expressions = NULL;
expression_vuses = NULL;
......
......@@ -90,7 +90,7 @@ along with GCC; see the file COPYING3. If not see
In order to value number memory, we assign value numbers to vuses.
This enables us to note that, for example, stores to the same
address of the same value from the same starting memory states are
equivalent.
equivalent.
TODO:
1. We can iterate only the changing portions of the SCC's, but
......@@ -264,7 +264,7 @@ VN_INFO_SET (tree name, vn_ssa_aux_t value)
}
/* Get the value numbering info for a given SSA name, creating it if
it does not exist. */
it does not exist. */
vn_ssa_aux_t
VN_INFO_GET (tree name)
......@@ -367,7 +367,7 @@ vn_reference_eq (const void *p1, const void *p2)
if (VEC_index (tree, vr2->vuses, i) != v)
return false;
}
for (i = 0; VEC_iterate (vn_reference_op_s, vr1->operands, i, vro); i++)
{
if (!vn_reference_op_eq (VEC_index (vn_reference_op_s, vr2->operands, i),
......@@ -554,7 +554,7 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
break;
default:
gcc_unreachable ();
}
VEC_safe_push (vn_reference_op_s, heap, *result, &temp);
......@@ -1078,7 +1078,7 @@ visit_copy (tree lhs, tree rhs)
/* Follow chains of copies to their destination. */
while (SSA_VAL (rhs) != rhs && TREE_CODE (SSA_VAL (rhs)) == SSA_NAME)
rhs = SSA_VAL (rhs);
/* The copy may have a more interesting constant filled expression
(we don't, since we know our RHS is just an SSA name). */
VN_INFO (lhs)->has_constants = VN_INFO (rhs)->has_constants;
......@@ -1302,10 +1302,10 @@ visit_phi (tree phi)
VN_INFO (PHI_RESULT (phi))->has_constants = false;
VN_INFO (PHI_RESULT (phi))->expr = sameval;
}
if (TREE_CODE (sameval) == SSA_NAME)
return visit_copy (PHI_RESULT (phi), sameval);
return set_ssa_val_to (PHI_RESULT (phi), sameval);
}
......@@ -1601,7 +1601,7 @@ visit_use (tree use)
have been value numbering optimistically, and
iterating. They may become non-constant in this case,
even if they were optimistically constant. */
VN_INFO (lhs)->has_constants = false;
VN_INFO (lhs)->expr = lhs;
}
......@@ -1730,7 +1730,7 @@ process_scc (VEC (tree, heap) *scc)
if (VEC_length (tree, scc) == 1)
{
tree use = VEC_index (tree, scc, 0);
if (!VN_INFO (use)->use_processed)
if (!VN_INFO (use)->use_processed)
visit_use (use);
}
else
......@@ -1988,7 +1988,7 @@ free_scc_vn (void)
SSA_NAME_VALUE (name) = NULL;
}
}
VEC_free (vn_ssa_aux_t, heap, vn_ssa_aux_table);
VEC_free (tree, heap, sccstack);
free_vn_table (valid_info);
......
......@@ -59,6 +59,6 @@ tree vn_reference_lookup (tree, VEC (tree, gc) *);
void vn_reference_insert (tree, tree, VEC (tree, gc) *);
VEC (tree, gc) *shared_vuses_from_stmt (tree);
VEC (tree, gc) *copy_vuses_from_stmt (tree);
#endif /* TREE_SSA_SCCVN_H */
......@@ -59,7 +59,7 @@ bool
expressions_equal_p (tree e1, tree e2)
{
tree te1, te2;
if (e1 == e2)
return true;
......@@ -82,7 +82,7 @@ expressions_equal_p (tree e1, tree e2)
return true;
}
else if (TREE_CODE (e1) == TREE_CODE (e2)
else if (TREE_CODE (e1) == TREE_CODE (e2)
&& (te1 == te2
|| types_compatible_p (te1, te2))
&& operand_equal_p (e1, e2, OEP_PURE_SAME))
......@@ -92,7 +92,7 @@ expressions_equal_p (tree e1, tree e2)
}
/* Set the value handle for expression E to value V. */
void
set_value_handle (tree e, tree v)
{
......@@ -132,12 +132,12 @@ print_creation_to_file (tree v, tree expr, VEC (tree, gc) *vuses)
print_generic_expr (dump_file, v, dump_flags);
fprintf (dump_file, " for ");
print_generic_expr (dump_file, expr, dump_flags);
if (vuses && VEC_length (tree, vuses) != 0)
{
size_t i;
tree vuse;
fprintf (dump_file, " vuses: (");
for (i = 0; VEC_iterate (tree, vuses, i, vuse); i++)
{
......@@ -146,7 +146,7 @@ print_creation_to_file (tree v, tree expr, VEC (tree, gc) *vuses)
fprintf (dump_file, ",");
}
fprintf (dump_file, ")");
}
}
fprintf (dump_file, "\n");
}
......@@ -154,7 +154,7 @@ print_creation_to_file (tree v, tree expr, VEC (tree, gc) *vuses)
/* Sort the VUSE array so that we can do equality comparisons
quicker on two vuse vecs. */
void
void
sort_vuses (VEC (tree,gc) *vuses)
{
if (VEC_length (tree, vuses) > 1)
......@@ -167,7 +167,7 @@ sort_vuses (VEC (tree,gc) *vuses)
/* Sort the VUSE array so that we can do equality comparisons
quicker on two vuse vecs. */
void
void
sort_vuses_heap (VEC (tree,heap) *vuses)
{
if (VEC_length (tree, vuses) > 1)
......@@ -279,7 +279,7 @@ vn_lookup (tree expr)
if (TREE_CODE (expr) == CALL_EXPR || DECL_P (expr))
return vn_reference_lookup (expr, NULL);
else if (TREE_CODE (expr) == SSA_NAME)
return SSA_NAME_VALUE (expr);
return SSA_NAME_VALUE (expr);
else if (TREE_CODE (expr) == ADDR_EXPR)
return vn_unary_op_lookup (expr);
/* FALLTHROUGH */
......@@ -291,7 +291,7 @@ vn_lookup (tree expr)
/* Search in the value numbering tables for an existing instance of
expression EXPR, and return its value, or NULL if none has been set. STMT
represents the stmt associated with EXPR. It is used when computing the
represents the stmt associated with EXPR. It is used when computing the
hash value for EXPR for reference operations. */
tree
......@@ -328,9 +328,9 @@ static tree
create_value_handle_for_expr (tree expr, VEC(tree, gc) *vuses)
{
tree v;
v = make_value_handle (TREE_TYPE (expr));
if (dump_file && (dump_flags & TDF_DETAILS))
print_creation_to_file (v, expr, vuses);
return v;
......@@ -343,7 +343,7 @@ tree
vn_lookup_or_add (tree expr)
{
tree v = vn_lookup (expr);
if (v == NULL_TREE)
{
v = create_value_handle_for_expr (expr, NULL);
......@@ -387,10 +387,10 @@ tree
vn_lookup_or_add_with_vuses (tree expr, VEC (tree, gc) *vuses)
{
tree v;
if (!vuses || VEC_length (tree, vuses) == 0)
return vn_lookup_or_add (expr);
v = vn_lookup_with_vuses (expr, vuses);
if (v == NULL_TREE)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment