PR tree-optimization/68398
commit9b849350eb9e1ca7ec63da07fa6a808f5245ad2e
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jan 2016 19:19:47 +0000 (27 19:19 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Jan 2016 19:19:47 +0000 (27 19:19 +0000)
treed12efa856784b2c9751e6eb3e813f70f08470400
parentfee5e491300358fafc16fcc8c1806afb737ac106
PR tree-optimization/68398
* params.def (PARAM_FSM_SCALE_PATH_STMTS): New parameter.
(PARAM_FSM_SCALE_PATH_BLOCKS): Likewise.
* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
Only count PHIs in the last block in the path.  The others will
const/copy propagate away.  Add heuristic to allow more irreducible
subloops to be created when it is likely profitable to do so.

* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
Fix typo in comment.  Use gsi_after_labels and remove the GIMPLE_LABEL
check from within the loop.  Use gsi_next_nondebug rather than gsi_next.

PR tree-optimization/68398
* gcc.dg/tree-ssa/pr66752-3.c: Update expected output.
* gcc.dg/tree-ssa/ssa-dom-thread-2c.c: Add extra statements on thread
path to avoid new heuristic allowing more irreducible regions
* gcc.dg/tree-ssa/ssa-dom-thread-2d.c: Likewise.
* gcc.dg/tree-ssa/vrp46.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-7.c: Update expected output.
* gcc.dg/tree-ssa/ssa-dom-thread-2g.c: New test.
* gcc.dg/tree-ssa/ssa-dom-thread-2h.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232897 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/params.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2c.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2d.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2g.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2h.c [copied from gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2d.c with 75% similarity]
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c
gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
gcc/tree-ssa-threadbackward.c