Patchwork Minor predict.c improvement

login
register
mail settings
Submitter Jan Hubicka
Date Nov. 2, 2012, 7:39 p.m.
Message ID <20121102193911.GB4020@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/196751/
State New
Headers show

Comments

Jan Hubicka - Nov. 2, 2012, 7:39 p.m.
hi,
this patch makes predict_loop to predict even loop with exits not
dominating the latch when their iteration bound is known.

Honza

Patch

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);