PR tree-optimizatin/78496
commit5e3bbe7725f5909694bc0a527ec27467c41db29a
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Dec 2017 16:14:24 +0000 (4 16:14 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Dec 2017 16:14:24 +0000 (4 16:14 +0000)
tree1744737fd0c09e38928cb3ca91a814e849bbac4b
parent256aaca01d094952bb1877936f96899ce0738673
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255387 138bc75d-0d04-0410-961f-82ee72b054a4
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