Commit a84a62fa authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

Switch PGO to IR PGO

Using fprofile-generate instead of fprofile-instr-generate will enable
IR PGO (instead of Frontend PGO), this significantly improve the PGO
perf gains in local benchmarks.

Profile merging is the default value when using fprofile-generate so
it's not necessary to specify -fprofile-generate=%m anymore.

Bug: 1060025
Change-Id: I0d9cf7272814693e6a68ac52699fd3f9faf88de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229010Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774819}
parent 21be43eb
......@@ -15,15 +15,15 @@ config("pgo_instrumentation_flags") {
# are not required to be defined when we're not actually using PGO.
if (chrome_pgo_phase == 1 && is_clang && !is_nacl && is_a_target_toolchain) {
# TODO(sebmarchand): Add a GN flag that allows setting the PGO profile
# name or find a way to remove use {target_name} in the filename?
# name or find a way to use {target_name} in the filename?
# This uses the "%m" specifier to allow concurrent runs of the
# instrumented image.
cflags = [ "-fprofile-instr-generate=%m.profraw" ]
cflags = [ "-fprofile-generate=%m.profraw" ]
if (!is_win) {
# Windows directly calls link.exe instead of the compiler driver when
# linking, and embeds the path to the profile runtime library as
# dependent library into each object file.
ldflags = [ "-fprofile-instr-generate" ]
ldflags = [ "-fprofile-generate" ]
}
}
}
......@@ -75,6 +75,13 @@ config("pgo_optimization_flags") {
# out of date, so make sure we don't error for those cases.
"-Wno-profile-instr-unprofiled",
"-Wno-profile-instr-out-of-date",
# Some hashing conflict results in a lot of warning like this when doing
# a PGO build:
# warning: foo.cc: Function control flow change detected (hash mismatch)
# [-Wbackend-plugin]
# See https://crbug.com/978401
"-Wno-backend-plugin",
]
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment