aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-07 12:06:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-07-07 12:06:57 +0000
commit523968bfbb7ea90fd33b50cef7df0bf8732385b0 (patch)
treec58a9f0704189719510e62faa499e804da793b0b /gcc/gimple.c
parentb0d9e66374cae4f996a4a2f8f2a58b9f70819ad1 (diff)
downloadgcc-523968bfbb7ea90fd33b50cef7df0bf8732385b0.zip
gcc-523968bfbb7ea90fd33b50cef7df0bf8732385b0.tar.gz
gcc-523968bfbb7ea90fd33b50cef7df0bf8732385b0.tar.bz2
tree-ssa-propagate.h (valid_gimple_call_p): Remove.
2010-07-07 Richard Guenther <rguenther@suse.de> * 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
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c37
1 files changed, 21 insertions, 16 deletions
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. */