summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options_map-inl.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2023-12-01 14:47:37 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2023-12-04 10:35:16 +0000
commit8891ea4eac12b8f48934d47f2d99da1e9b455788 (patch)
tree00b523efef48ab608779156af751e1bf38c70091 /compiler/driver/compiler_options_map-inl.h
parentf51e433b5d32cb83eb2ee302544ecf67a10525b9 (diff)
Put branch profiling under a flag.
Until we evaluate its usefulness and reduce its overhead. Bug: 306638020 Test: test.py Change-Id: Ibb01c70a7ea19b03802dcc1b0792d3d2ff4f4d67
Diffstat (limited to 'compiler/driver/compiler_options_map-inl.h')
-rw-r--r--compiler/driver/compiler_options_map-inl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h
index 4734950a2c..9a02b576d1 100644
--- a/compiler/driver/compiler_options_map-inl.h
+++ b/compiler/driver/compiler_options_map-inl.h
@@ -68,6 +68,9 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string
if (map.Exists(Base::Baseline)) {
options->baseline_ = true;
}
+ if (map.Exists(Base::ProfileBranches)) {
+ options->profile_branches_ = true;
+ }
map.AssignIfExists(Base::AbortOnHardVerifierFailure, &options->abort_on_hard_verifier_failure_);
map.AssignIfExists(Base::AbortOnSoftVerifierFailure, &options->abort_on_soft_verifier_failure_);
if (map.Exists(Base::DumpInitFailures)) {
@@ -198,6 +201,10 @@ NO_INLINE void AddCompilerOptionsArgumentParserOptions(Builder& b) {
.WithHelp("Produce code using the baseline compilation")
.IntoKey(Map::Baseline)
+ .Define("--profile-branches")
+ .WithHelp("Profile branches in baseline generated code")
+ .IntoKey(Map::ProfileBranches)
+
.Define({"--abort-on-hard-verifier-error", "--no-abort-on-hard-verifier-error"})
.WithValues({true, false})
.IntoKey(Map::AbortOnHardVerifierFailure)