From: Martin Liska Date: Mon, 29 Jun 2020 11:26:45 +0000 (+0200) Subject: Use gsi_bb instead of iterator->bb. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e712ef9eee7f9dea4cc0b8df40d9eae9adb15f1e;p=gcc.git Use gsi_bb instead of iterator->bb. gcc/ChangeLog: * tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Use gsi_bb instead of gimple_stmt_iterator::bb. * tree-ssa-math-opts.c (insert_reciprocals): Likewise. * tree-vectorizer.h: Likewise. --- diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index e8333ac27d9..7e3921869b8 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2159,7 +2159,7 @@ gsi_prev_dom_bb_nondebug (gimple_stmt_iterator *i) gsi_prev_nondebug (i); while (gsi_end_p (*i)) { - dom = get_immediate_dominator (CDI_DOMINATORS, i->bb); + dom = get_immediate_dominator (CDI_DOMINATORS, gsi_bb (*i)); if (dom == NULL || dom == ENTRY_BLOCK_PTR_FOR_FN (cfun)) return; diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index 104ae97a707..8423caa3ee3 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -446,7 +446,7 @@ insert_reciprocals (gimple_stmt_iterator *def_gsi, struct occurrence *occ, if (should_insert_square_recip) gsi_insert_before (&gsi, new_square_stmt, GSI_SAME_STMT); } - else if (def_gsi && occ->bb == def_gsi->bb) + else if (def_gsi && occ->bb == gsi_bb (*def_gsi)) { /* Case 2: insert right after the definition. Note that this will never happen if the definition statement can throw, because in diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index d9f6a67264d..c393d7e5fa6 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -869,7 +869,7 @@ public: { const_reverse_iterator begin = region_end; if (*begin == NULL) - begin = const_reverse_iterator (gsi_last_bb (region_end.bb)); + begin = const_reverse_iterator (gsi_last_bb (gsi_bb (region_end))); else ++begin;