sweet: add mode for PGO benchmarking
With -pgo, for each configuration sweet automatically runs an initial
profiling configuration. The merged profiles from these runs are used as
the PGO input to a ".pgo" variant of the configuration. Comparing the
base configuration to the ".pgo" variant indicates the effect of PGO.
At a lower level, the config format adds a "pgofiles" map, which can be
used to specify PGO profiles to use for each benchmark.
Ultimately this sets GOFLAGS=-pgo=/path in BuildEnv. Some benchmarks may
not currently properly plumb this into their build (e.g., the GoBuild
benchmarks don't build the compiler at all). Existing benchmarks need to
be double-checked that they actually get PGO enabled.
Reviewed-by: Michael Knyszek <firstname.lastname@example.org>
TryBot-Result: Gopher Robot <email@example.com>
Auto-Submit: Michael Pratt <firstname.lastname@example.org>
Run-TryBot: Michael Pratt <email@example.com>
9 files changed