This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] Fix the LIPO support in AutoFDO


This patch fixes LIPO support in AutoFDO.

Bootstrapped and passed regression tests.

OK for google-4_7 branch?

Thanks,
Dehao

Index: gcc/coverage.c
===================================================================
--- gcc/coverage.c (revision 198056)
+++ gcc/coverage.c (working copy)
@@ -2857,7 +2857,7 @@ coverage_init (const char *filename, const char* s
       strcat (main_input_file_name, source_name);
     }

-  if (flag_branch_probabilities)
+  if (flag_branch_probabilities && !flag_auto_profile)
     read_counts_file (da_file_name, 0);

   /* Reads at most one auxiliary GCDA file since we don't support merging */
Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 198057)
+++ gcc/auto-profile.c (working copy)
@@ -1850,6 +1850,13 @@ auto_profile (void)
       pop_cfun ();
     }

+  cgraph_pre_profiling_inlining_done = true;
+  cgraph_process_module_scope_statics ();
+  /* Now perform link to allow cross module inlining.  */
+  cgraph_do_link ();
+  varpool_do_link ();
+  cgraph_unify_type_alias_sets ();
+
   return TODO_rebuild_cgraph_edges;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]