diff options
author | Jeff Law <law@gcc.gnu.org> | 2017-12-15 15:11:06 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-12-15 15:11:06 -0700 |
commit | 5806e0622de3356ae291a74a4c0d4c2e0af4c0d6 (patch) | |
tree | b8e6c164eb187dd22c1305123e27d655276679ec /gcc/tree-ssa-threadedge.c | |
parent | 38f4bea834ef4c25cd89c824f15ee8d6b30a3760 (diff) | |
download | gcc-5806e0622de3356ae291a74a4c0d4c2e0af4c0d6.zip gcc-5806e0622de3356ae291a74a4c0d4c2e0af4c0d6.tar.gz gcc-5806e0622de3356ae291a74a4c0d4c2e0af4c0d6.tar.bz2 |
re PR tree-optimization/81165 (Regression in GCC-8.0.0's optimizer)
PR tree-optimization/81165
* tree-ssa-threadupdate.c (uses_in_bb): New.
(estimate_threading_killed_stmts): New.
* tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts_at_dest): Expand limit
when its hit.
PR tree-optimization/81165
* gcc.dg/pr81165.c: New.
From-SVN: r255724
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index b7781dc..1fafd7b 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -244,7 +244,22 @@ record_temporary_equivalences_from_stmts_at_dest (edge e, expansion, then do not thread through this block. */ stmt_count++; if (stmt_count > max_stmt_count) - return NULL; + { + /* If any of the stmts in the PATH's dests are going to be + killed due to threading, grow the max count + accordingly. */ + if (max_stmt_count + == PARAM_VALUE (PARAM_MAX_JUMP_THREAD_DUPLICATION_STMTS)) + { + max_stmt_count += estimate_threading_killed_stmts (e->dest); + if (dump_file) + fprintf (dump_file, "threading bb %i up to %i stmts\n", + e->dest->index, max_stmt_count); + } + /* If we're still past the limit, we're done. */ + if (stmt_count > max_stmt_count) + return NULL; + } /* These are temporary ranges, do nto reflect them back into the global range data. */ |