diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-05-20 17:01:35 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-05-20 17:01:35 +0000 |
commit | 7eab31edf283c355051f1f58bc79ea13a0bdb3fd (patch) | |
tree | ea01704fc2a9e703217c6f711a0256643c25e1aa /gcc/tree-ssa-sccvn.c | |
parent | 467fc67c47287a490d649ffe03ce8ae432c27a71 (diff) | |
download | gcc-7eab31edf283c355051f1f58bc79ea13a0bdb3fd.zip gcc-7eab31edf283c355051f1f58bc79ea13a0bdb3fd.tar.gz gcc-7eab31edf283c355051f1f58bc79ea13a0bdb3fd.tar.bz2 |
tree-ssa-dom.c (hashable_expr_equal_p): Also compare the EH region of calls to pure functions that can throw an exception.
* tree-ssa-dom.c (hashable_expr_equal_p) <EXPR_CALL>: Also compare the
EH region of calls to pure functions that can throw an exception.
* tree-ssa-sccvn.c (vn_reference_eq): Remove duplicated test.
(copy_reference_ops_from_call): Also copy the EH region of the call if
it can throw an exception.
From-SVN: r210649
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index b45dc14..77dcad9 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -663,9 +663,6 @@ vn_reference_eq (const_vn_reference_t const vr1, const_vn_reference_t const vr2) { unsigned i, j; - if (vr1->hashcode != vr2->hashcode) - return false; - /* Early out if this is not a hash collision. */ if (vr1->hashcode != vr2->hashcode) return false; @@ -1125,6 +1122,7 @@ copy_reference_ops_from_call (gimple call, vn_reference_op_s temp; unsigned i; tree lhs = gimple_call_lhs (call); + int lr; /* If 2 calls have a different non-ssa lhs, vdef value numbers should be different. By adding the lhs here in the vector, we ensure that the @@ -1139,12 +1137,14 @@ copy_reference_ops_from_call (gimple call, result->safe_push (temp); } - /* Copy the type, opcode, function being called and static chain. */ + /* Copy the type, opcode, function, static chain and EH region, if any. */ 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); + if (stmt_could_throw_p (call) && (lr = lookup_stmt_eh_lp (call)) > 0) + temp.op2 = size_int (lr); temp.off = -1; result->safe_push (temp); |