]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/auto-profile.c
Update copyright years.
[thirdparty/gcc.git] / gcc / auto-profile.c
index 26353a21486250b9f3d1605858907bc1827cdf5e..6aca2f2902259c50bddfdcf9ed36b2a57a643355 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"
@@ -104,7 +103,7 @@ namespace autofdo
 /* Intermediate edge info used when propagating AutoFDO profile information.
    We can't edge->count() directly since it's computed from edge's probability
    while probability is yet not decided during propagation.  */
-#define AFDO_EINFO(e)                     ((struct edge_info *) e->aux)
+#define AFDO_EINFO(e)                     ((class edge_info *) e->aux)
 class edge_info
 {
 public:
@@ -136,8 +135,9 @@ typedef std::map<unsigned, gcov_type> icall_target_map;
 typedef std::set<gimple *> stmt_set;
 
 /* Represent count info of an inline stack.  */
-struct count_info
+class count_info
 {
+public:
   /* Sampled count of the inline stack.  */
   gcov_type count;
 
@@ -605,8 +605,6 @@ function_instance::find_icall_target_map (gcall *stmt,
           get_identifier (afdo_string_table->get_name (callee)));
       if (node == NULL)
         continue;
-      if (!check_ic_target (stmt, node))
-        continue;
       (*map)[callee] = iter->second->total_count ();
       ret += iter->second->total_count ();
     }
@@ -1033,7 +1031,7 @@ afdo_indirect_call (gimple_stmt_iterator *gsi, const icall_target_map &map,
       print_generic_expr (dump_file, direct_call->decl, TDF_SLIM);
     }
 
-  if (direct_call == NULL || !check_ic_target (stmt, direct_call))
+  if (direct_call == NULL)
     {
       if (dump_file)
         fprintf (dump_file, " not transforming\n");
@@ -1630,7 +1628,7 @@ 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_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS); i++)
+    for (int i = 0; i < param_early_inliner_max_iterations; i++)
       {
         if (!flag_value_profile_transformations
             || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts))