re PR tree-optimization/78496 (Missed opportunities for jump threading)
authorJeff Law <law@redhat.com>
Mon, 4 Dec 2017 16:14:24 +0000 (09:14 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 4 Dec 2017 16:14:24 +0000 (09:14 -0700)
commitd49e06ce40a76c3f6e96bf2eccb59db19d4d2b1d
tree1744737fd0c09e38928cb3ca91a814e849bbac4b
parentd48f6f3f2d1f8b62b538939f82740f463a193b8b
re PR tree-optimization/78496 (Missed opportunities for jump threading)

PR tree-optimizatin/78496
* gimple-ssa-evrp-analyze.h
(evrp_range_analyzer::get_vr_values): Simplify.
* gimple-ssa-evrp-analyze.c: Corresponding changes.
* tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
and gimple-ssa-evrp-analyze.h.
(dom_opt_dom_walker class): Add evrp_range_analyzer member.
(simplify_stmt_for_jump_threading): Copy a blob of code from
tree-vrp.c to use ranges to simplify statements.
(dom_opt_dom_walker::before_dom_children): Call
evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
(dom_opt_dom_walker::after_dom_children): Similarly for
evrp_range_analyzer::leave.
(dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
conditionals.

PR tree-optimization/78496
* gcc.dg/builtin-unreachable-6.c: Disable DOM.
* gcc.dg/builtin-unreachable-6a.c: New test.
* gcc.dg/tree-ssa/20030922-1.c: No longer XFAIL.
* gcc.dg/ssa-dom-branch-1.c: Tweak expected output.

From-SVN: r255387
gcc/ChangeLog
gcc/gimple-ssa-evrp-analyze.h
gcc/gimple-ssa-evrp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-unreachable-6.c
gcc/testsuite/gcc.dg/builtin-unreachable-6a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/20030922-2.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c
gcc/tree-ssa-dom.c