Hi,
the PR tree-opt/86020 track regression from patch I committed in
2017-05-22.  I believe I did so accidentally becuase the patch does not
make much sense to me - the badness is documented as:

  /* When profile is available. Compute badness as:
     
                 time_saved * caller_count
     goodness =  -------------------------------------------------
                 growth_of_caller * overall_growth * combined_size

     badness = - goodness

     Again use negative value to make calls with profile appear hotter
     then calls without.
  */

And the code computes combined_size while I have chnaged it to be
inlined_time.  I see no reason for penalizing functions running for long
time and I believed I meant it as a micro optimization since I read the
calcuation as time instead of size calculatoin.

I did some benchmarking on SPEC and Firefox and while there are changes
it seems neutral overall and thus I have decided to revert the patch.

Bootstrapped/regtested x86_64-linux, comitted.

        PR tree-opt/86020
        Revert:
        2017-05-22  Jan Hubicka  <hubi...@ucw.cz>
        
        * ipa-inline.c (edge_badness): Use inlined_time instead of
        inline_summaries->get.

Index: ipa-inline.c
===================================================================
--- ipa-inline.c        (revision 267610)
+++ ipa-inline.c        (working copy)
@@ -1173,7 +1173,7 @@
            overall_growth += 256 * 256 - 256;
          denominator *= overall_growth;
         }
-      denominator *= inlined_time;
+      denominator *= ipa_fn_summaries->get (caller)->self_size + growth;
 
       badness = - numerator / denominator;
 

Reply via email to