Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8,tools: expose experimental wasm revectorize feature #54896

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@ def configure_v8(o, configs):
raise Exception(
'Only one of the --v8-enable-object-print or --v8-disable-object-print options '
'can be specified at a time.')
if o['variables']['v8_enable_webassembly'] and o['variables']['target_arch'] == 'x64':
o['variables']['v8_enable_wasm_simd256_revec'] = 1

def configure_openssl(o):
variables = o['variables']
Expand Down
8 changes: 7 additions & 1 deletion tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@

# Enable advanced BigInt algorithms, costing about 10-30 KiB binary size
# depending on platform.
'v8_advanced_bigint_algorithms%': 1
'v8_advanced_bigint_algorithms%': 1,

# Enable 256-bit long vector re-vectorization pass in WASM compilation pipeline.
'v8_enable_wasm_simd256_revec%' : 0
},

'target_defaults': {
Expand Down Expand Up @@ -541,6 +544,9 @@
['v8_advanced_bigint_algorithms==1', {
'defines': ['V8_ADVANCED_BIGINT_ALGORITHMS',],
}],
['v8_enable_wasm_simd256_revec==1', {
'defines': ['V8_ENABLE_WASM_SIMD256_REVEC',],
}],
], # conditions
'defines': [
'V8_GYP_BUILD',
Expand Down
10 changes: 10 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_webassembly.*?sources \\+= ")',
],
}],
['v8_enable_wasm_simd256_revec==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_wasm_simd256_revec.*?sources \\+= ")',
],
}],
['v8_enable_i18n_support==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?sources \\+= ")',
Expand Down Expand Up @@ -882,6 +887,11 @@
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_webassembly.*?v8_compiler_sources \\+= ")',
],
}],
['v8_enable_wasm_simd256_revec==1', {
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_wasm_simd256_revec.*?v8_compiler_sources \\+= ")',
],
}],
],
}
}, # v8_compiler_sources
Expand Down