From 523968bfbb7ea90fd33b50cef7df0bf8732385b0 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 7 Jul 2010 12:06:57 +0000 Subject: tree-ssa-propagate.h (valid_gimple_call_p): Remove. 2010-07-07 Richard Guenther * tree-ssa-propagate.h (valid_gimple_call_p): Remove. * tree-ssa-propagate.c (valid_gimple_call_p): Make static. Fix. * gimple.h (is_gimple_operand): Remove. * gimple.c (is_gimple_operand): Likewise. (walk_gimple_op): Fix wi->val_only setting for calls. * tree-cfg.c (verify_gimple_call): Fix argument validation. * tree-profile.c (tree_gen_ic_func_profiler): Do not create invalid gimple calls. From-SVN: r161905 --- gcc/gimple.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'gcc/gimple.c') diff --git a/gcc/gimple.c b/gcc/gimple.c index fa5b804..707d4e4 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -1383,7 +1383,10 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, case GIMPLE_CALL: if (wi) - wi->is_lhs = false; + { + wi->is_lhs = false; + wi->val_only = true; + } ret = walk_tree (gimple_call_chain_ptr (stmt), callback_op, wi, pset); if (ret) @@ -1395,21 +1398,32 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, for (i = 0; i < gimple_call_num_args (stmt); i++) { + if (wi) + wi->val_only = is_gimple_reg_type (gimple_call_arg (stmt, i)); ret = walk_tree (gimple_call_arg_ptr (stmt, i), callback_op, wi, pset); if (ret) return ret; } - if (wi) - wi->is_lhs = true; + if (gimple_call_lhs (stmt)) + { + if (wi) + { + wi->is_lhs = true; + wi->val_only = is_gimple_reg_type (gimple_call_lhs (stmt)); + } - ret = walk_tree (gimple_call_lhs_ptr (stmt), callback_op, wi, pset); - if (ret) - return ret; + ret = walk_tree (gimple_call_lhs_ptr (stmt), callback_op, wi, pset); + if (ret) + return ret; + } if (wi) - wi->is_lhs = false; + { + wi->is_lhs = false; + wi->val_only = true; + } break; case GIMPLE_CATCH: @@ -2538,15 +2552,6 @@ const unsigned char gimple_rhs_class_table[] = { /* Validation of GIMPLE expressions. */ -/* Return true if OP is an acceptable tree node to be used as a GIMPLE - operand. */ - -bool -is_gimple_operand (const_tree op) -{ - return op && get_gimple_rhs_class (TREE_CODE (op)) == GIMPLE_SINGLE_RHS; -} - /* Returns true iff T is a valid RHS for an assignment to a renamed user -- or front-end generated artificial -- variable. */ -- cgit v1.1