diff options
author | Richard Guenther <rguenther@suse.de> | 2010-07-07 12:06:57 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-07-07 12:06:57 +0000 |
commit | 523968bfbb7ea90fd33b50cef7df0bf8732385b0 (patch) | |
tree | c58a9f0704189719510e62faa499e804da793b0b /gcc/tree-ssa-propagate.c | |
parent | b0d9e66374cae4f996a4a2f8f2a58b9f70819ad1 (diff) | |
download | gcc-523968bfbb7ea90fd33b50cef7df0bf8732385b0.tar.gz |
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/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 5f2ecce08b6..6f50fc5453a 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -639,7 +639,7 @@ valid_gimple_rhs_p (tree expr) as a single GIMPLE_CALL statement. If the arguments require further gimplification, return false. */ -bool +static bool valid_gimple_call_p (tree expr) { unsigned i, nargs; @@ -649,8 +649,17 @@ valid_gimple_call_p (tree expr) nargs = call_expr_nargs (expr); for (i = 0; i < nargs; i++) - if (! is_gimple_operand (CALL_EXPR_ARG (expr, i))) - return false; + { + tree arg = CALL_EXPR_ARG (expr, i); + if (is_gimple_reg_type (arg)) + { + if (!is_gimple_val (arg)) + return false; + } + else + if (!is_gimple_lvalue (arg)) + return false; + } return true; } |