diff options
author | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-11-01 00:14:01 -0500 |
---|---|---|
committer | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-11-01 00:14:01 -0500 |
commit | 4851c80ce8de18896dc5c4b1b023afa8456736ba (patch) | |
tree | 587ebec764b4bcf0088526697c883dd59232644d /gcc/tree-ssa-loop-manip.c | |
parent | f35af8df241a9eb9c2edf7da26d3c5f53d6e2511 (diff) | |
download | gcc-4851c80ce8de18896dc5c4b1b023afa8456736ba.zip gcc-4851c80ce8de18896dc5c4b1b023afa8456736ba.tar.gz gcc-4851c80ce8de18896dc5c4b1b023afa8456736ba.tar.bz2 |
Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge
gcc/ChangeLog:
2021-11-01 Xionghu Luo <luoxhu@linux.ibm.com>
* cfghooks.c (cfg_hook_duplicate_loop_to_header_edge): Rename
duplicate_loop_to_header_edge to
duplicate_loop_body_to_header_edge.
(cfg_hook_duplicate_loop_body_to_header_edge): Likewise.
* cfghooks.h (struct cfg_hooks): Likewise.
(cfg_hook_duplicate_loop_body_to_header_edge): Likewise.
* cfgloopmanip.c (duplicate_loop_body_to_header_edge): Likewise.
(clone_loop_to_header_edge): Likewise.
* cfgloopmanip.h (duplicate_loop_body_to_header_edge): Likewise.
* cfgrtl.c (struct cfg_hooks): Likewise.
* doc/loop.texi: Likewise.
* loop-unroll.c (unroll_loop_constant_iterations): Likewise.
(unroll_loop_runtime_iterations): Likewise.
(unroll_loop_stupid): Likewise.
(apply_opt_in_copies): Likewise.
* tree-cfg.c (struct cfg_hooks): Likewise.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
(try_peel_loop): Likewise.
* tree-ssa-loop-manip.c (copy_phi_node_args): Likewise.
(gimple_duplicate_loop_body_to_header_edge): Likewise.
(tree_transform_and_unroll_loop): Likewise.
* tree-ssa-loop-manip.h (gimple_duplicate_loop_body_to_header_edge):
Likewise.
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 2d576bf..1fb2450 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -911,7 +911,7 @@ copy_phi_node_args (unsigned first_new_block) } -/* The same as cfgloopmanip.c:duplicate_loop_to_header_edge, but also +/* The same as cfgloopmanip.c:duplicate_loop_body_to_header_edge, but also updates the PHI nodes at start of the copied region. In order to achieve this, only loops whose exits all lead to the same location are handled. @@ -921,10 +921,10 @@ copy_phi_node_args (unsigned first_new_block) after the loop has been duplicated. */ bool -gimple_duplicate_loop_to_header_edge (class loop *loop, edge e, - unsigned int ndupl, sbitmap wont_exit, - edge orig, vec<edge> *to_remove, - int flags) +gimple_duplicate_loop_body_to_header_edge (class loop *loop, edge e, + unsigned int ndupl, + sbitmap wont_exit, edge orig, + vec<edge> *to_remove, int flags) { unsigned first_new_block; @@ -934,8 +934,8 @@ gimple_duplicate_loop_to_header_edge (class loop *loop, edge e, return false; first_new_block = last_basic_block_for_fn (cfun); - if (!duplicate_loop_to_header_edge (loop, e, ndupl, wont_exit, - orig, to_remove, flags)) + if (!duplicate_loop_body_to_header_edge (loop, e, ndupl, wont_exit, orig, + to_remove, flags)) return false; /* Readd the removed phi args for e. */ @@ -1388,9 +1388,11 @@ tree_transform_and_unroll_loop (class loop *loop, unsigned factor, bitmap_clear_bit (wont_exit, factor - 1); auto_vec<edge> to_remove; - bool ok = gimple_duplicate_loop_to_header_edge - (loop, loop_latch_edge (loop), factor - 1, - wont_exit, new_exit, &to_remove, DLTHE_FLAG_UPDATE_FREQ); + bool ok + = gimple_duplicate_loop_body_to_header_edge (loop, loop_latch_edge (loop), + factor - 1, wont_exit, + new_exit, &to_remove, + DLTHE_FLAG_UPDATE_FREQ); gcc_assert (ok); for (edge e : to_remove) |