diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-09-19 17:21:45 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-09-19 18:54:43 +0200 |
commit | 08900f28893b98b2ad0e0c284338d8555636067c (patch) | |
tree | 69f47d73c37d4c7800e1f95dab4bb32af9d28133 /gcc/tree-ssa-threadbackward.c | |
parent | 124c354ad70f09c31610f67743b277a359527649 (diff) | |
download | gcc-08900f28893b98b2ad0e0c284338d8555636067c.zip gcc-08900f28893b98b2ad0e0c284338d8555636067c.tar.gz gcc-08900f28893b98b2ad0e0c284338d8555636067c.tar.bz2 |
Minor cleanups to forward threader.
Every time we allocate a threading edge we push it onto the path in a
distinct step. There's no need to do this in two steps, and avoiding
this, keeps us from exposing the internals of the registry.
I've also did some tiny cleanups in thread_across_edge, most importantly
removing the bitmap in favor of an auto_bitmap.
There are no functional changes.
gcc/ChangeLog:
* tree-ssa-threadbackward.c
(back_threader_registry::register_path): Use push_edge.
* tree-ssa-threadedge.c
(jump_threader::thread_around_empty_blocks): Same.
(jump_threader::thread_through_normal_block): Same.
(jump_threader::thread_across_edge): Same. Also, use auto_bitmap.
Tidy up code.
* tree-ssa-threadupdate.c
(jt_path_registry::allocate_thread_edge): Remove.
(jt_path_registry::push_edge): New.
(dump_jump_thread_path): Make static.
* tree-ssa-threadupdate.h (allocate_thread_edge): Remove.
(push_edge): New.
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index 805b7ac..c6530d3 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -902,15 +902,11 @@ back_threader_registry::register_path (const vec<basic_block> &m_path, edge e = find_edge (bb1, bb2); gcc_assert (e); - jump_thread_edge *x - = m_lowlevel_registry.allocate_thread_edge (e, EDGE_COPY_SRC_BLOCK); - jump_thread_path->safe_push (x); + m_lowlevel_registry.push_edge (jump_thread_path, e, EDGE_COPY_SRC_BLOCK); } - jump_thread_edge *x - = m_lowlevel_registry.allocate_thread_edge (taken_edge, - EDGE_NO_COPY_SRC_BLOCK); - jump_thread_path->safe_push (x); + m_lowlevel_registry.push_edge (jump_thread_path, + taken_edge, EDGE_NO_COPY_SRC_BLOCK); if (m_lowlevel_registry.register_jump_thread (jump_thread_path)) ++m_threaded_paths; |