Fix typo in inliner badness calculation
diff mbox series

Message ID 20191005213816.5z5zn7hthrf3ssdr@kam.mff.cuni.cz
State New
Headers show
Series
  • Fix typo in inliner badness calculation
Related show

Commit Message

Jan Hubicka Oct. 5, 2019, 9:38 p.m. UTC
Hi,
this patch fixes a typo in the way edge badness is calculated I noticed
while verifing the code.

Bootstrapped/regtested x86_64-linux, comitted.

	* ipa-inline.c: Fix type; compute size rather than self_size
	for size of caller function.

Patch
diff mbox series

Index: ipa-inline.c
===================================================================
--- ipa-inline.c	(revision 276628)
+++ ipa-inline.c	(working copy)
@@ -1186,7 +1186,7 @@  edge_badness (struct cgraph_edge *edge,
 	     if (need_more_work)
 	       noninline_callee ();
 	   }
-	 Withhout panilizing this case, we usually inline noninline_callee
+	 Withhout penalizing this case, we usually inline noninline_callee
 	 into the inline_caller because overall_growth is small preventing
 	 further inlining of inline_caller.
 
@@ -1243,7 +1243,7 @@  edge_badness (struct cgraph_edge *edge,
 	    overall_growth += 256 * 256 - 256;
 	  denominator *= overall_growth;
         }
-      denominator *= ipa_fn_summaries->get (caller)->self_size + growth;
+      denominator *= ipa_fn_summaries->get (caller)->size + growth;
 
       badness = - numerator / denominator;