[GOOGLE] guard recording of autofdo annotation info in a flag
Dehao Chen
dehao@google.com
Fri Mar 21 17:46:00 GMT 2014
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.
More information about the Gcc-patches
mailing list