Loop split on semi-invariant conditional statement
authorFeng Xue <fxue@os.amperecomputing.com>
Thu, 7 Nov 2019 15:43:01 +0000 (15:43 +0000)
committerFeng Xue <fxue@gcc.gnu.org>
Thu, 7 Nov 2019 15:43:01 +0000 (15:43 +0000)
commit095f78c62157124ad479a3f98b6995ced090b807
treec923adca9e7c669cc0ba77cd8fe7c525094b99ff
parent163f23d21e5f2faee08163f2dcb363042b53ee1e
Loop split on semi-invariant conditional statement

2019-11-07  Feng Xue <fxue@os.amperecomputing.com>

        PR tree-optimization/89134
        * doc/invoke.texi (min-loop-cond-split-prob): Document new --params.
        * params.def: Add min-loop-cond-split-prob.
        * tree-ssa-loop-split.c (split_loop): Remove niter parameter, move some
        outside checks on loop into the function.
        (split_info): New class.
        (find_vdef_in_loop, get_control_equiv_head_block): New functions.
        (find_control_dep_blocks, vuse_semi_invariant_p): Likewise.
        (ssa_semi_invariant_p, loop_iter_phi_semi_invariant_p): Likewise.
        (control_dep_semi_invariant_p, stmt_semi_invariant_p_1): Likewise.
        (stmt_semi_invariant_p, branch_removable_p): Likewise.
        (get_cond_invariant_branch, compute_added_num_insns): Likewise.
        (get_cond_branch_to_split_loop, do_split_loop_on_cond): Likewise.
        (split_loop_on_cond): Likewise.
        (tree_ssa_split_loops): Add loop split on conditional statement.

2019-11-07  Feng Xue  <fxue@os.amperecomputing.com>

        PR tree-optimization/89134
        * gcc.dg/tree-ssa/loop-cond-split-1.c: New test.
        * g++.dg/tree-ssa/loop-cond-split-1.C: New test.
        * gcc.dg/torture/pr55107.c: Add -fno-split-loops.

From-SVN: r277923
gcc/ChangeLog
gcc/doc/invoke.texi
gcc/params.def
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/loop-cond-split-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr55107.c
gcc/testsuite/gcc.dg/tree-ssa/loop-cond-split-1.c [new file with mode: 0644]
gcc/tree-ssa-loop-split.c