]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/auto-profile.c
c++: Handle multiple aggregate overloads [PR95319].
[thirdparty/gcc.git] / gcc / auto-profile.c
index 92e980f68a204cd598e65aa80badbbdda48c5f95..7d09887c9e189a9ade2fa0479b0fe71bf469da50 100644 (file)
@@ -1,5 +1,5 @@
 /* Read and annotate call graph profile from the auto profile data file.
-   Copyright (C) 2014-2019 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
    Contributed by Dehao Chen (dehao@google.com)
 
 This file is part of GCC.
@@ -41,7 +41,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-into-ssa.h"
 #include "gimple-iterator.h"
 #include "value-prof.h"
-#include "params.h"
 #include "symbol-summary.h"
 #include "ipa-prop.h"
 #include "ipa-fnsummary.h"
@@ -1056,7 +1055,7 @@ afdo_indirect_call (gimple_stmt_iterator *gsi, const icall_target_map &map,
   struct cgraph_edge *new_edge
       = indirect_edge->make_speculative (direct_call,
                                         profile_count::uninitialized ());
-  new_edge->redirect_call_stmt_to_callee ();
+  cgraph_edge::redirect_call_stmt_to_callee (new_edge);
   gimple_remove_histogram_value (cfun, stmt, hist);
   inline_call (new_edge, true, NULL, NULL, false);
 }
@@ -1629,7 +1628,8 @@ auto_profile (void)
        function before annotation, so the profile inside bar@loc_foo2
        will be useful.  */
     autofdo::stmt_set promoted_stmts;
-    for (int i = 0; i < param_early_inliner_max_iterations; i++)
+    for (int i = 0; i < opt_for_fn (node->decl,
+                                   param_early_inliner_max_iterations); i++)
       {
         if (!flag_value_profile_transformations
             || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts))