gcc/
* tree-ssa-dom.c (struct hashable_expr): Strengthen field
call.fn_from from gimple to gimple_call.
(initialize_hash_element): Replace check against GIMPLE_CALL
with dyn_cast_gimple_call and update gimple_call_ uses to use
new gimple_call local, along with fn_from initializer.
(iterative_hash_hashable_expr): Strengthen type of local "fn_from"
from gimple to gimple_call.
(print_expr_hash_elt): Likewise.
---
gcc/tree-ssa-dom.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 8fc8e1a..82e937e 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -79,7 +79,7 @@ struct hashable_expr
struct { enum tree_code op; tree opnd; } unary;
struct { enum tree_code op; tree opnd0, opnd1; } binary;
struct { enum tree_code op; tree opnd0, opnd1, opnd2; } ternary;
- struct { gimple fn_from; bool pure; size_t nargs; tree *args; } call;
+ struct { gimple_call fn_from; bool pure; size_t nargs; tree *args; } call;
struct { size_t nargs; tree *args; } phi;
} ops;
};
@@ -321,18 +321,18 @@ initialize_hash_element (gimple stmt, tree lhs,
expr->ops.binary.opnd0 = gimple_cond_lhs (stmt);
expr->ops.binary.opnd1 = gimple_cond_rhs (stmt);
}
- else if (code == GIMPLE_CALL)
+ else if (gimple_call call_stmt = stmt->dyn_cast_gimple_call ())
{
- size_t nargs = gimple_call_num_args (stmt);
+ size_t nargs = gimple_call_num_args (call_stmt);
size_t i;
- gcc_assert (gimple_call_lhs (stmt));
+ gcc_assert (gimple_call_lhs (call_stmt));
- expr->type = TREE_TYPE (gimple_call_lhs (stmt));
+ expr->type = TREE_TYPE (gimple_call_lhs (call_stmt));
expr->kind = EXPR_CALL;
- expr->ops.call.fn_from = stmt;
+ expr->ops.call.fn_from = call_stmt;
- if (gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE))
+ if (gimple_call_flags (call_stmt) & (ECF_CONST | ECF_PURE))
expr->ops.call.pure = true;
else
expr->ops.call.pure = false;
@@ -340,7 +340,7 @@ initialize_hash_element (gimple stmt, tree lhs,
expr->ops.call.nargs = nargs;
expr->ops.call.args = XCNEWVEC (tree, nargs);
for (i = 0; i < nargs; i++)
- expr->ops.call.args[i] = gimple_call_arg (stmt, i);
+ expr->ops.call.args[i] = gimple_call_arg (call_stmt, i);
}
else if (gimple_switch swtch_stmt = stmt->dyn_cast_gimple_switch ())
{
@@ -626,7 +626,7 @@ iterative_hash_hashable_expr (const struct hashable_expr
*expr, hashval_t val)
{
size_t i;
enum tree_code code = CALL_EXPR;
- gimple fn_from;
+ gimple_call fn_from;
val = iterative_hash_object (code, val);
fn_from = expr->ops.call.fn_from;
@@ -703,7 +703,7 @@ print_expr_hash_elt (FILE * stream, const struct
expr_hash_elt *element)
{
size_t i;
size_t nargs = element->expr.ops.call.nargs;
- gimple fn_from;
+ gimple_call fn_from;
fn_from = element->expr.ops.call.fn_from;
if (gimple_call_internal_p (fn_from))
--
1.8.5.3