Enable Flow Sensitive AutoFDO
FSAFDO (Flow Sensitive AutoFDO) is an improvement over AutoFDO. It
attempts to capture and represent the flow-sensitive profile in LLVM
optimization passes with the mechanism to expose and iteratively
reload/match the profile with better precision.
Enable this for all AFDO projects so that we can capture data from the
field, and then evaluate the performance gain.
Test: presubmit
Bug: 304282732
Change-Id: I0de6b4071e4f0a75500f3ffd5171a7be5117ec86
diff --git a/cc/afdo.go b/cc/afdo.go
index 23d196d..5c587c0 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -84,6 +84,7 @@
// 3. Make the profile searchable by the build system. So it's used the next time the binary
// is built.
flags.Local.CFlags = append([]string{"-funique-internal-linkage-names"}, flags.Local.CFlags...)
+ flags.Local.CFlags = append([]string{"-mllvm", "-enable-fs-discriminator=true"}, flags.Local.CFlags...)
}
if path := afdo.Properties.FdoProfilePath; path != nil {
// The flags are prepended to allow overriding.