This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Make vectorizer to use likely upper bounds


Hi,
this patch makes vectorizer to give up when likely maximal number of iterations
is low.

boostrapped/regtested x86_64-linux, will commit it once benchmark machines
pick up the earlier changes.
	* tree-vect-loop.c (vect_analyze_loop_2): Use
	likely_max_stmt_executions_int.
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c	(revision 236850)
+++ tree-vect-loop.c	(working copy)
@@ -1945,7 +1945,7 @@ start_over:
 		     LOOP_VINFO_INT_NITERS (loop_vinfo));
 
   HOST_WIDE_INT max_niter
-    = max_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo));
+    = likely_max_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo));
   if ((LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
        && (LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor))
       || (max_niter != -1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]