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-dom.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-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 5b5adca..c980dfd 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -522,6 +522,14 @@ hashable_expr_equal_p (const struct hashable_expr *expr0, expr1->ops.call.args[i], 0)) return false; + if (stmt_could_throw_p (expr0->ops.call.fn_from)) + { + int lp0 = lookup_stmt_eh_lp (expr0->ops.call.fn_from); + int lp1 = lookup_stmt_eh_lp (expr1->ops.call.fn_from); + if ((lp0 > 0 || lp1 > 0) && lp0 != lp1) + return false; + } + return true; } |