gcc/
commita361141865247626a73c0f2257a95bc7d4f274c9
authorienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2015 13:14:09 +0000 (8 13:14 +0000)
committerienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Oct 2015 13:14:09 +0000 (8 13:14 +0000)
tree5f7294b8f0b81c4c83835b68641e48339dc64aa4
parente3cd52d97695e5b5511c5146b0c650600b46bc84
gcc/

* tree-ssa-loop-unswitch.c: Include "gimple-iterator.h" and
"cfghooks.h", add prototypes for introduced new functions.
(tree_ssa_unswitch_loops): Use from innermost loop iterator, move all
checks on ability of loop unswitching to tree_unswitch_single_loop;
invoke tree_unswitch_single_loop or tree_unswitch_outer_loop depending
on innermost loop check.
(tree_unswitch_single_loop): Add all required checks on ability of
loop unswitching under zero recursive level guard.
(tree_unswitch_outer_loop): New function.
(find_loop_guard): Likewise.
(empty_bb_without_guard_p): Likewise.
(used_outside_loop_p): Likewise.
(get_vop_from_header): Likewise.
(hoist_guard): Likewise.
(check_exit_phi): Likewise.

gcc/testsuite/

* gcc.dg/loop-unswitch-2.c: New test.
* gcc.dg/loop-unswitch-3.c: Likewise.
* gcc.dg/loop-unswitch-4.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228599 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/loop-unswitch-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/loop-unswitch-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/loop-unswitch-4.c [new file with mode: 0644]
gcc/tree-ssa-loop-unswitch.c