diff mbox series

[45/46] Remove vect_stmt_in_region_p

Message ID 87in55kkpg.fsf@arm.com
State New
Headers show
Series Remove vinfo_for_stmt etc. | expand

Commit Message

Richard Sandiford July 24, 2018, 10:10 a.m. UTC
Unlike the old vinfo_for_stmt, vec_info::lookup_stmt can cope with
any statement, so there's no need to check beforehand that the statement
is part of the vectorisable region.  This means that there are no longer
any calls to vect_stmt_in_region_p.


2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vectorizer.h (vect_stmt_in_region_p): Delete.
	* tree-vectorizer.c (vect_stmt_in_region_p): Likewise.

Comments

Richard Biener July 31, 2018, 12:06 p.m. UTC | #1
On Tue, Jul 24, 2018 at 12:11 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> Unlike the old vinfo_for_stmt, vec_info::lookup_stmt can cope with
> any statement, so there's no need to check beforehand that the statement
> is part of the vectorisable region.  This means that there are no longer
> any calls to vect_stmt_in_region_p.

OK.

Richard.

>
> 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
>
> gcc/
>         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
>         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
>
> Index: gcc/tree-vectorizer.h
> ===================================================================
> --- gcc/tree-vectorizer.h       2018-07-24 10:24:29.300253129 +0100
> +++ gcc/tree-vectorizer.h       2018-07-24 10:24:32.472224947 +0100
> @@ -1609,7 +1609,6 @@ void vect_pattern_recog (vec_info *);
>
>  /* In tree-vectorizer.c.  */
>  unsigned vectorize_loops (void);
> -bool vect_stmt_in_region_p (vec_info *, gimple *);
>  void vect_free_loop_info_assumptions (struct loop *);
>
>  #endif  /* GCC_TREE_VECTORIZER_H  */
> Index: gcc/tree-vectorizer.c
> ===================================================================
> --- gcc/tree-vectorizer.c       2018-07-24 10:24:29.300253129 +0100
> +++ gcc/tree-vectorizer.c       2018-07-24 10:24:32.472224947 +0100
> @@ -700,33 +700,6 @@ vect_free_loop_info_assumptions (struct
>    loop_constraint_clear (loop, LOOP_C_FINITE);
>  }
>
> -/* Return whether STMT is inside the region we try to vectorize.  */
> -
> -bool
> -vect_stmt_in_region_p (vec_info *vinfo, gimple *stmt)
> -{
> -  if (!gimple_bb (stmt))
> -    return false;
> -
> -  if (loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo))
> -    {
> -      struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
> -      if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
> -       return false;
> -    }
> -  else
> -    {
> -      bb_vec_info bb_vinfo = as_a <bb_vec_info> (vinfo);
> -      if (gimple_bb (stmt) != BB_VINFO_BB (bb_vinfo)
> -         || gimple_uid (stmt) == -1U
> -         || gimple_code (stmt) == GIMPLE_PHI)
> -       return false;
> -    }
> -
> -  return true;
> -}
> -
> -
>  /* If LOOP has been versioned during ifcvt, return the internal call
>     guarding it.  */
>
diff mbox series

Patch

Index: gcc/tree-vectorizer.h
===================================================================
--- gcc/tree-vectorizer.h	2018-07-24 10:24:29.300253129 +0100
+++ gcc/tree-vectorizer.h	2018-07-24 10:24:32.472224947 +0100
@@ -1609,7 +1609,6 @@  void vect_pattern_recog (vec_info *);
 
 /* In tree-vectorizer.c.  */
 unsigned vectorize_loops (void);
-bool vect_stmt_in_region_p (vec_info *, gimple *);
 void vect_free_loop_info_assumptions (struct loop *);
 
 #endif  /* GCC_TREE_VECTORIZER_H  */
Index: gcc/tree-vectorizer.c
===================================================================
--- gcc/tree-vectorizer.c	2018-07-24 10:24:29.300253129 +0100
+++ gcc/tree-vectorizer.c	2018-07-24 10:24:32.472224947 +0100
@@ -700,33 +700,6 @@  vect_free_loop_info_assumptions (struct
   loop_constraint_clear (loop, LOOP_C_FINITE);
 }
 
-/* Return whether STMT is inside the region we try to vectorize.  */
-
-bool
-vect_stmt_in_region_p (vec_info *vinfo, gimple *stmt)
-{
-  if (!gimple_bb (stmt))
-    return false;
-
-  if (loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo))
-    {
-      struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-      if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt)))
-	return false;
-    }
-  else
-    {
-      bb_vec_info bb_vinfo = as_a <bb_vec_info> (vinfo);
-      if (gimple_bb (stmt) != BB_VINFO_BB (bb_vinfo)
-	  || gimple_uid (stmt) == -1U
-	  || gimple_code (stmt) == GIMPLE_PHI)
-	return false;
-    }
-
-  return true;
-}
-
-
 /* If LOOP has been versioned during ifcvt, return the internal call
    guarding it.  */