[OBVIOUS] Use gsi_bb instead of iterator->bb.

Message ID f3c7f225-8ed7-af95-7ab8-b764c5555ff7@suse.cz
State New
Headers show
Series
  • [OBVIOUS] Use gsi_bb instead of iterator->bb.
Related show

Commit Message

Martin Liška June 29, 2020, 11:28 a.m.
One obvious transformation, pushed to master.

Martin

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.
---
  gcc/tree-ssa-ccp.c       | 2 +-
  gcc/tree-ssa-math-opts.c | 2 +-
  gcc/tree-vectorizer.h    | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.27.0

Patch

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;