This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[GOOGLE] guard recording of autofdo annotation info in a flag
- From: Dehao Chen <dehao at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 21 Mar 2014 10:10:15 -0700
- Subject: [GOOGLE] guard recording of autofdo annotation info in a flag
- Authentication-results: sourceware.org; auth=none
This patch guards autofdo annotation coverage recording with a flag.
Test on-going.
OK for google-4_8 if test passes?
Thanks,
Dehao
Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 208753)
+++ gcc/auto-profile.c (working copy)
@@ -1634,7 +1634,8 @@ auto_profile (void)
pop_cfun ();
}
- autofdo::afdo_source_profile->write_annotated_count ();
+ if (flag_auto_profile_record_coverage_in_elf)
+ autofdo::afdo_source_profile->write_annotated_count ();
return 0;
}
Index: gcc/common.opt
===================================================================
--- gcc/common.opt (revision 208753)
+++ gcc/common.opt (working copy)
@@ -946,6 +946,10 @@ fauto-profile-accurate
Common Report Var(flag_auto_profile_accurate) Optimization
Whether to assume the sample profile is accurate.
+fauto-profile-record-coverage-in-elf
+Common Report Var(flag_auto_profile_record_coverage_in_elf) Optimization
+Whether to record annotation coverage info in elf.
+
; -fcheck-bounds causes gcc to generate array bounds checks.
; For C, C++ and ObjC: defaults off.
; For Java: defaults to on.