Skip to content

Commit 8d3be7e

Browse files
Googlercopybara-github
authored andcommitted
Allow implicitly enabling memprof_optimize for FDO.
This is the instrumented FDO version of unknown commit, which added this support for AutoFDO. Similar to features such as ThinLTO, with this change we insert a feature which allows implicitly enabling memprof_optimize for FDO targets. The "enable_fdo_memprof_optimize" feature when present along with "fdo_implicit_memprof_optimize" expands to the "memprof_optimize" feature. This mechanism allows users to opt-out via --features=-memprof_optimize. PiperOrigin-RevId: 855299865 Change-Id: Ie33df43aed2a4b228850666033f512aa17a05bc3
1 parent d1a4aea commit 8d3be7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cc/private/toolchain_config/configure_features.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ def configure_features(
176176
branch_fdo_provider.branch_fdo_mode == "llvm_cs_fdo") and
177177
"fdo_optimize" not in all_unsupported_features_set):
178178
all_features.append("fdo_optimize")
179+
if "memprof_optimize" not in all_unsupported_features_set:
180+
all_features.append("enable_fdo_memprof_optimize")
179181
if "thin_lto" not in all_unsupported_features_set:
180182
all_features.append("enable_fdo_thinlto")
181183
if ("split_functions" not in all_unsupported_features_set and

0 commit comments

Comments
 (0)