public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix bb-reorder code size regression on Itanium
@ 2017-07-04 10:17 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2017-07-04 10:17 UTC (permalink / raw)
  To: gcc-patches

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.

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-04 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-04 10:17 Fix bb-reorder code size regression on Itanium Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).