aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-propagate.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-07 12:06:57 +0000
committerRichard Guenther <rguenther@suse.de>2010-07-07 12:06:57 +0000
commit7f50a1f12708df65a5f251a816377f10c3699fb6 (patch)
treec58a9f0704189719510e62faa499e804da793b0b /gcc/tree-ssa-propagate.c
parent41f25c7b7dc526cfa34fe6751d8d5b4aaaee417c (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@161905 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r--gcc/tree-ssa-propagate.c15
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;
}