summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-08-13 19:38:39 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-08-13 19:38:39 +0000
commit7aec7a38d7283e5eb83db7f0dc9556202214c5f0 (patch)
tree923c9ec3f6319b2aca98cf53c729f7eb221b396c /gcc/tree-ssa-sccvn.c
parent70a1c2f9595135edb6224c2cc1006968f3416cb2 (diff)
downloadgcc-7aec7a38d7283e5eb83db7f0dc9556202214c5f0.tar.gz
gimple.h (gimple_call_set_chain): Accept SSA variables.
* gimple.h (gimple_call_set_chain): Accept SSA variables. * tree-ssa-pre.c (create_component_ref_by_pieces_1) <CALL_EXPR>: Rematerialize the static chain, if any. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Also copy the static chain. From-SVN: r139072
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index f6492bdafd8..f502440b46f 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -686,12 +686,12 @@ copy_reference_ops_from_call (gimple call,
vn_reference_op_s temp;
unsigned i;
- /* Copy the call_expr opcode, type, function being called, and
- arguments. */
+ /* Copy the type, opcode, function being called and static chain. */
memset (&temp, 0, sizeof (temp));
temp.type = gimple_call_return_type (call);
temp.opcode = CALL_EXPR;
temp.op0 = gimple_call_fn (call);
+ temp.op1 = gimple_call_chain (call);
VEC_safe_push (vn_reference_op_s, heap, *result, &temp);
/* Copy the call arguments. As they can be references as well,
@@ -701,7 +701,6 @@ copy_reference_ops_from_call (gimple call,
tree callarg = gimple_call_arg (call, i);
copy_reference_ops_from_ref (callarg, result);
}
- return;
}
/* Create a vector of vn_reference_op_s structures from REF, a