Fix thiko when maintaining priority heap

Jan Hubicka hubicka@ucw.cz
Thu Jan 22 20:35:00 GMT 2015


Hi,
this patch fixes problem noticed by HJ about matinenance of the heap.
I doubt it really fixed the underlying correctness issue of the PR mentioned.

Bootstrapped/regtested x86_64-linux, comitted.
Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 220010)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2015-01-22  Jan Hubicka  <hubicka@ucw.cz>
+	    H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ipa/64694
+	* ipa-inline.c (inline_small_functions): Fix thinko in maintenance of
+	heap.
+
 2015-01-22  Wei Mi  <wmi@google.com>
 
 	PR rtl-optimization/64557
Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 219969)
+++ ipa-inline.c	(working copy)
@@ -1755,7 +1755,7 @@ inline_small_functions (void)
 #endif
       if (current_badness != badness)
 	{
-	  if (edge_heap.min () && badness > edge_heap.min_key ())
+	  if (edge_heap.min () && current_badness > edge_heap.min_key ())
 	    {
 	      edge->aux = edge_heap.insert (current_badness, edge);
 	      continue;



More information about the Gcc-patches mailing list