diff options
author | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-11-01 00:12:36 -0500 |
---|---|---|
committer | Xionghu Luo <luoxhu@linux.ibm.com> | 2021-11-01 00:13:19 -0500 |
commit | f35af8df241a9eb9c2edf7da26d3c5f53d6e2511 (patch) | |
tree | 86849b0db6931ea7879a63c9d2f7e9f3416f0d1f /gcc/cfgloopmanip.h | |
parent | 7a71ea4df7e97a640e6747d6787a1885eb3bbc40 (diff) | |
download | gcc-f35af8df241a9eb9c2edf7da26d3c5f53d6e2511.zip gcc-f35af8df241a9eb9c2edf7da26d3c5f53d6e2511.tar.gz gcc-f35af8df241a9eb9c2edf7da26d3c5f53d6e2511.tar.bz2 |
Refactor loop_version
loop_version currently does lv_adjust_loop_entry_edge
before it loopifys the copy inserted on the header. This patch moves
the condition generation later and thus we have four pieces to help
understanding of how the adjustment works:
1) duplicating the loop on the entry edge.
2) loopify the duplicated new loop.
3) adjusting the CFG to insert a condition branching to either loop
with lv_adjust_loop_entry_edge.
4) From loopify extract the scale_loop_frequencies bits.
Also removed some piece of code seems obviously useless:
- redirect_all_edges since it is false and loopify only called once.
- extract_cond_bb_edges and lv_flush_pending_stmts (false_edge) as the
edge is not redirected actually.
gcc/ChangeLog:
2021-11-01 Xionghu Luo <luoxhu@linux.ibm.com>
* cfgloopmanip.c (loop_version): Refactor loopify to
loop_version. Move condition generation after loopify.
(loopify): Delete.
* cfgloopmanip.h (loopify): Delete.
Diffstat (limited to 'gcc/cfgloopmanip.h')
-rw-r--r-- | gcc/cfgloopmanip.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/cfgloopmanip.h b/gcc/cfgloopmanip.h index 07d5f92..312a3b4 100644 --- a/gcc/cfgloopmanip.h +++ b/gcc/cfgloopmanip.h @@ -42,9 +42,6 @@ extern void scale_loop_profile (class loop *, profile_probability, gcov_type); extern edge create_empty_if_region_on_edge (edge, tree); extern class loop *create_empty_loop_on_edge (edge, tree, tree, tree, tree, tree *, tree *, class loop *); -extern class loop *loopify (edge, edge, - basic_block, edge, edge, bool, - profile_probability, profile_probability); extern void unloop (class loop *, bool *, bitmap); extern void copy_loop_info (class loop *loop, class loop *target); extern class loop * duplicate_loop (class loop *, class loop *, |