From 4f899c4298cce9b332248e4f7a42ca81e51d20a5 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Mon, 7 Jun 2021 23:36:15 -0400 Subject: return auto_vec from get_dominated_by Signed-off-by: Trevor Saunders gcc/ChangeLog: * dominance.c (get_dominated_by): Return auto_vec. * 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. --- gcc/auto-profile.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gcc/auto-profile.c') 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 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) { -- cgit v1.1