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]

Minor predict.c improvement


hi,
this patch makes predict_loop to predict even loop with exits not
dominating the latch when their iteration bound is known.

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 193101)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@
 2012-11-02  Jan Hubicka  <jh@suse.cz>
 
+	* predict.c (predict_loops): Predict also exits not dominating
+	latch.
+
+2012-11-02  Jan Hubicka  <jh@suse.cz>
+
 	* predict.c (predict_loops): Do not predict infinite loops.
 
 2012-11-02  Jan Hubicka  <jh@suse.cz>
Index: predict.c
===================================================================
--- predict.c	(revision 193101)
+++ predict.c	(working copy)
@@ -1419,7 +1419,7 @@ predict_loops (void)
 
 	  predict_extra_loop_exits (ex);
 
-	  if (number_of_iterations_exit (loop, ex, &niter_desc, false))
+	  if (number_of_iterations_exit (loop, ex, &niter_desc, false, false))
 	    niter = niter_desc.niter;
 	  if (!niter || TREE_CODE (niter_desc.niter) != INTEGER_CST)
 	    niter = loop_niter_by_eval (loop, ex);


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