aboutsummaryrefslogtreecommitdiff
path: root/gcc/auto-profile.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde@tbsaunde.org>2021-06-07 23:36:15 -0400
committerTrevor Saunders <tbsaunde@tbsaunde.org>2021-06-17 04:43:27 -0400
commit4f899c4298cce9b332248e4f7a42ca81e51d20a5 (patch)
treeab2dff2977ba8b74c198cdc5ebdbe528b7fda999 /gcc/auto-profile.c
parenta165040e11e340f6b397104f23717ef398408e67 (diff)
downloadgcc-4f899c4298cce9b332248e4f7a42ca81e51d20a5.zip
gcc-4f899c4298cce9b332248e4f7a42ca81e51d20a5.tar.gz
gcc-4f899c4298cce9b332248e4f7a42ca81e51d20a5.tar.bz2
return auto_vec from get_dominated_by
Signed-off-by: Trevor Saunders <tbsaunde@tbsaunde.org> gcc/ChangeLog: * dominance.c (get_dominated_by): Return auto_vec<basic_block>. * dominance.h (get_dominated_by): Likewise. * auto-profile.c (afdo_find_equiv_class): Adjust. * cfgloopmanip.c (duplicate_loop_to_header_edge): Likewise. * loop-unroll.c (unroll_loop_runtime_iterations): Likewise. * tree-cfg.c (test_linear_chain): Likewise. (test_diamond): Likewise.
Diffstat (limited to 'gcc/auto-profile.c')
-rw-r--r--gcc/auto-profile.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index ed788dc..43d6fa0 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -1155,13 +1155,10 @@ afdo_find_equiv_class (bb_set *annotated_bb)
FOR_ALL_BB_FN (bb, cfun)
{
- vec<basic_block> dom_bbs;
-
if (bb->aux != NULL)
continue;
bb->aux = bb;
- dom_bbs = get_dominated_by (CDI_DOMINATORS, bb);
- for (basic_block bb1 : dom_bbs)
+ for (basic_block bb1 : get_dominated_by (CDI_DOMINATORS, bb))
if (bb1->aux == NULL && dominated_by_p (CDI_POST_DOMINATORS, bb, bb1)
&& bb1->loop_father == bb->loop_father)
{
@@ -1172,8 +1169,8 @@ afdo_find_equiv_class (bb_set *annotated_bb)
set_bb_annotated (bb, annotated_bb);
}
}
- dom_bbs = get_dominated_by (CDI_POST_DOMINATORS, bb);
- for (basic_block bb1 : dom_bbs)
+
+ for (basic_block bb1 : get_dominated_by (CDI_POST_DOMINATORS, bb))
if (bb1->aux == NULL && dominated_by_p (CDI_DOMINATORS, bb, bb1)
&& bb1->loop_father == bb->loop_father)
{