[nci] Add NCI build- and runtime flags

In upcoming work these flags will be used to configure the
experimental native context independent code feature.

Build-time flags:

v8_enable_nci_code

Defines:

V8_ENABLE_NCI_CODE

Runtime flags:

--turbo-nci
--turbo-nci-as-highest_tier
--print-nci-code
--trace-turbo-nci

Drive-by: Remove unused embedded builtins and jitless defines.

Bug: v8:8888
Change-Id: I4466b440634a787bd84b052fe2466b22540216a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2184295
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67650}
This commit is contained in:
Jakob Gruber 2020-05-06 13:41:26 +02:00 committed by Commit Bot
parent ec01074831
commit 475c5faad1
2 changed files with 16 additions and 8 deletions

View File

@ -225,6 +225,10 @@ declare_args() {
# Enable V8 heap sandbox experimental feature.
# Sets -DV8_HEAP_SANDBOX.
v8_enable_heap_sandbox = ""
# Experimental support for native context independent code.
# https://crbug.com/v8/8888
v8_enable_nci_code = false
}
# Derived defaults.
@ -453,10 +457,6 @@ config("features") {
}
if (v8_enable_lite_mode) {
defines += [ "V8_LITE_MODE" ]
# TODO(v8:7777): Remove the define once the --jitless runtime flag does
# everything we need.
defines += [ "V8_JITLESS_MODE" ]
}
if (v8_enable_gdbjit) {
defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
@ -526,10 +526,6 @@ config("features") {
if (v8_check_microtasks_scopes_consistency) {
defines += [ "V8_CHECK_MICROTASKS_SCOPES_CONSISTENCY" ]
}
# TODO(v8:8519): Remove the define once all use-sites in
# the code are removed/fixed
defines += [ "V8_EMBEDDED_BUILTINS" ]
if (v8_use_multi_snapshots) {
defines += [ "V8_MULTI_SNAPSHOTS" ]
}
@ -557,6 +553,9 @@ config("features") {
if (v8_enable_wasm_gdb_remote_debugging) {
defines += [ "V8_ENABLE_WASM_GDB_REMOTE_DEBUGGING" ]
}
if (v8_enable_nci_code) {
defines += [ "V8_ENABLE_NCI_CODE" ]
}
}
config("toolchain") {

View File

@ -650,6 +650,15 @@ DEFINE_BOOL(turbo_fast_api_calls, false, "enable fast API calls from TurboFan")
DEFINE_INT(reuse_opt_code_count, 0,
"don't discard optimized code for the specified number of deopts.")
// Native context independent (NCI) code.
DEFINE_BOOL(turbo_nci, false,
"enable experimental native context independent code.")
DEFINE_BOOL(turbo_nci_as_highest_tier, false,
"replace default TF with NCI code as the highest tier for testing "
"purposes.")
DEFINE_BOOL(print_nci_code, false, "print native context independent code.")
DEFINE_BOOL(trace_turbo_nci, false, "trace native context independent code.")
// Favor memory over execution speed.
DEFINE_BOOL(optimize_for_size, false,
"Enables optimizations which favor memory size over execution "