From ef3f2b6f29d5cd3384429644cebbc0d280bd3940 Mon Sep 17 00:00:00 2001
From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 23 Jun 2014 16:51:10 +0000
Subject: 2014-06-23  Richard Biener  <rguenther@suse.de>

	* tree-ssa-loop.c (gate_loop): New function.
	(pass_tree_loop::gate): Call it.
	(pass_data_tree_no_loop, pass_tree_no_loop,
	make_pass_tree_no_loop): New.
	* tree-vectorizer.c: Include tree-scalar-evolution.c
	(pass_slp_vectorize::execute): Initialize loops and SCEV if
	required.
	(pass_slp_vectorize::clone): New method.
	* timevar.def (TV_TREE_NOLOOP): New.
	* tree-pass.h (make_pass_tree_no_loop): Declare.
	* passes.def (pass_tree_no_loop): New pass group with
	SLP vectorizer.

	* g++.dg/vect/slp-pr50413.cc: Scan and cleanup appropriate SLP dumps.
	* g++.dg/vect/slp-pr50819.cc: Likewise.
	* g++.dg/vect/slp-pr56812.cc: Likewise.
	* gcc.dg/vect/bb-slp-1.c: Likewise.
	* gcc.dg/vect/bb-slp-10.c: Likewise.
	* gcc.dg/vect/bb-slp-11.c: Likewise.
	* gcc.dg/vect/bb-slp-13.c: Likewise.
	* gcc.dg/vect/bb-slp-14.c: Likewise.
	* gcc.dg/vect/bb-slp-15.c: Likewise.
	* gcc.dg/vect/bb-slp-16.c: Likewise.
	* gcc.dg/vect/bb-slp-17.c: Likewise.
	* gcc.dg/vect/bb-slp-18.c: Likewise.
	* gcc.dg/vect/bb-slp-19.c: Likewise.
	* gcc.dg/vect/bb-slp-2.c: Likewise.
	* gcc.dg/vect/bb-slp-20.c: Likewise.
	* gcc.dg/vect/bb-slp-21.c: Likewise.
	* gcc.dg/vect/bb-slp-22.c: Likewise.
	* gcc.dg/vect/bb-slp-23.c: Likewise.
	* gcc.dg/vect/bb-slp-24.c: Likewise.
	* gcc.dg/vect/bb-slp-25.c: Likewise.
	* gcc.dg/vect/bb-slp-26.c: Likewise.
	* gcc.dg/vect/bb-slp-27.c: Likewise.
	* gcc.dg/vect/bb-slp-28.c: Likewise.
	* gcc.dg/vect/bb-slp-29.c: Likewise.
	* gcc.dg/vect/bb-slp-3.c: Likewise.
	* gcc.dg/vect/bb-slp-30.c: Likewise.
	* gcc.dg/vect/bb-slp-31.c: Likewise.
	* gcc.dg/vect/bb-slp-32.c: Likewise.
	* gcc.dg/vect/bb-slp-4.c: Likewise.
	* gcc.dg/vect/bb-slp-5.c: Likewise.
	* gcc.dg/vect/bb-slp-6.c: Likewise.
	* gcc.dg/vect/bb-slp-7.c: Likewise.
	* gcc.dg/vect/bb-slp-8.c: Likewise.
	* gcc.dg/vect/bb-slp-8a.c: Likewise.
	* gcc.dg/vect/bb-slp-8b.c: Likewise.
	* gcc.dg/vect/bb-slp-9.c: Likewise.
	* gcc.dg/vect/bb-slp-cond-1.c: Likewise.
	* gcc.dg/vect/bb-slp-pattern-1.c: Likewise.
	* gcc.dg/vect/bb-slp-pattern-2.c: Likewise.
	* gcc.dg/vect/fast-math-bb-slp-call-1.c: Likewise.
	* gcc.dg/vect/fast-math-bb-slp-call-2.c: Likewise.
	* gcc.dg/vect/fast-math-bb-slp-call-3.c: Likewise.
	* gcc.dg/vect/no-tree-reassoc-bb-slp-12.c: Likewise.
	* gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Likewise.
	* gcc.dg/vect/pr26359.c: Likewise.
	* gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211904 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/passes.def | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'gcc/passes.def')

diff --git a/gcc/passes.def b/gcc/passes.def
index 26b30c938f1..c574b4ecff4 100644
--- a/gcc/passes.def
+++ b/gcc/passes.def
@@ -198,6 +198,8 @@ along with GCC; see the file COPYING3.  If not see
       NEXT_PASS (pass_sink_code);
       NEXT_PASS (pass_asan);
       NEXT_PASS (pass_tsan);
+      /* Pass group that runs when 1) enabled, 2) there are loops
+	 in the function.  */
       NEXT_PASS (pass_tree_loop);
       PUSH_INSERT_PASSES_WITHIN (pass_tree_loop)
 	  NEXT_PASS (pass_tree_loop_init);
@@ -230,10 +232,18 @@ along with GCC; see the file COPYING3.  If not see
 	  NEXT_PASS (pass_complete_unroll);
 	  NEXT_PASS (pass_slp_vectorize);
 	  NEXT_PASS (pass_loop_prefetch);
+	  /* Run IVOPTs after the last pass that uses data-reference analysis
+	     as that doesn't handle TARGET_MEM_REFs.  */
 	  NEXT_PASS (pass_iv_optimize);
 	  NEXT_PASS (pass_lim);
 	  NEXT_PASS (pass_tree_loop_done);
       POP_INSERT_PASSES ()
+      /* Pass group that runs when pass_tree_loop is disabled or there
+         are no loops in the function.  */
+      NEXT_PASS (pass_tree_no_loop);
+      PUSH_INSERT_PASSES_WITHIN (pass_tree_no_loop)
+	  NEXT_PASS (pass_slp_vectorize);
+      POP_INSERT_PASSES ()
       NEXT_PASS (pass_lower_vector_ssa);
       NEXT_PASS (pass_cse_reciprocals);
       NEXT_PASS (pass_reassoc);
-- 
cgit v1.2.1

