diff mbox

Fix bb-reorder code size regression on Itanium

Message ID 20170704101746.GB14843@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka July 4, 2017, 10:17 a.m. UTC
Hi,
better_edge_p will always return false when best_prob is uninitialized.  This
patch makes it to chose first edge with initialized probability instead.
This solves code size regression seen on our Itanium tester at least for
gzip's deflate.

Will commit it after bootstrapping/regtesting x86_64-linux.

Honza
	
	* bb-reorder.c (better_edge_p): Deal with uninitialized best_prob.
diff mbox

Patch

Index: bb-reorder.c
===================================================================
--- bb-reorder.c	(revision 249928)
+++ bb-reorder.c	(working copy)
@@ -957,7 +957,7 @@  better_edge_p (const_basic_block bb, con
     return !cur_best_edge
 	   || cur_best_edge->dest->index > e->dest->index;
 
-  if (prob > best_prob + diff_prob)
+  if (prob > best_prob + diff_prob || !best_prob.initialized_p ())
     /* The edge has higher probability than the temporary best edge.  */
     is_better_edge = true;
   else if (prob < best_prob - diff_prob)