aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sccvn.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-07-12 07:08:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-07-12 07:08:34 +0000
commit19353855bfc05914faaee9f297684f608fd9a485 (patch)
tree5efac508c9b97fdcd24bad7d09b0a091e2dae779 /gcc/tree-ssa-sccvn.c
parent2c81daeeb5456d3b588e2ad22b5ec098bea2d393 (diff)
downloadgcc-19353855bfc05914faaee9f297684f608fd9a485.zip
gcc-19353855bfc05914faaee9f297684f608fd9a485.tar.gz
gcc-19353855bfc05914faaee9f297684f608fd9a485.tar.bz2
tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2018-07-12 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (mprts_hook_cnt): Remove. (vn_lookup_simplify_result): Remove recursion limit applied here. (vn_nary_build_or_lookup_1): Adjust. (try_to_simplify): Likewise. * gimple-match-head.c (gimple_resimplify1): Instead apply one here. (gimple_resimplify2): Likewise. (gimple_resimplify3): Likewise. (gimple_resimplify4): Likewise. From-SVN: r262573
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r--gcc/tree-ssa-sccvn.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c
index 1e16e13..de3531d 100644
--- a/gcc/tree-ssa-sccvn.c
+++ b/gcc/tree-ssa-sccvn.c
@@ -1648,7 +1648,6 @@ vn_reference_lookup_or_insert_for_pieces (tree vuse,
}
static vn_nary_op_t vn_nary_op_insert_stmt (gimple *stmt, tree result);
-static unsigned mprts_hook_cnt;
/* Hook for maybe_push_res_to_seq, lookup the expression in the VN tables. */
@@ -1672,13 +1671,8 @@ vn_lookup_simplify_result (gimple_match_op *res_op)
vn_nary_op_t vnresult = NULL;
tree res = vn_nary_op_lookup_pieces (length, (tree_code) res_op->code,
res_op->type, ops, &vnresult);
- /* We can end up endlessly recursing simplifications if the lookup above
- presents us with a def-use chain that mirrors the original simplification.
- See PR80887 for an example. Limit successful lookup artificially
- to 10 times if we are called as mprts_hook. */
if (res
- && mprts_hook
- && --mprts_hook_cnt == 0)
+ && mprts_hook)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Resetting mprts_hook after too many "
@@ -1701,7 +1695,6 @@ vn_nary_build_or_lookup_1 (gimple_match_op *res_op, bool insert)
So first simplify and lookup this expression to see if it
is already available. */
mprts_hook = vn_lookup_simplify_result;
- mprts_hook_cnt = 9;
bool res = false;
switch (TREE_CODE_LENGTH ((tree_code) res_op->code))
{
@@ -4051,7 +4044,6 @@ try_to_simplify (gassign *stmt)
/* First try constant folding based on our current lattice. */
mprts_hook = vn_lookup_simplify_result;
- mprts_hook_cnt = 9;
tem = gimple_fold_stmt_to_constant_1 (stmt, vn_valueize, vn_valueize);
mprts_hook = NULL;
if (tem