Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e41732697b999464e80dc3fe1c95900c6c438888
      
https://github.com/WebKit/WebKit/commit/e41732697b999464e80dc3fe1c95900c6c438888
  Author: Daniel Liu <[email protected]>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M JSTests/microbenchmarks/exceptions-simd.js
    M JSTests/microbenchmarks/wasm-cc-int-to-int.js
    M JSTests/wasm/lowExecutableMemory/executable-memory-oom.js
    M JSTests/wasm/lowExecutableMemory/exports-oom.js
    M JSTests/wasm/noJIT/noJIT.js
    A JSTests/wasm/stress/cc-double-to-double.js
    A JSTests/wasm/stress/cc-f32-kitchen-sink.js
    A JSTests/wasm/stress/cc-float-to-float.js
    A JSTests/wasm/stress/cc-funcref.js
    A JSTests/wasm/stress/cc-i32-kitchen-sink-neg.js
    M JSTests/wasm/stress/cc-i32-kitchen-sink.js
    A JSTests/wasm/stress/cc-i64-kitchen-sink-neg.js
    A JSTests/wasm/stress/cc-i64-kitchen-sink.js
    A JSTests/wasm/stress/cc-infinite-int-glitch.js
    M JSTests/wasm/stress/cc-int-to-int-cross-module-with-exception.js
    M JSTests/wasm/stress/cc-int-to-int-cross-module.js
    M JSTests/wasm/stress/cc-int-to-int-jit-to-llint.js
    M JSTests/wasm/stress/cc-int-to-int-memory.js
    M JSTests/wasm/stress/cc-int-to-int-no-jit.js
    M JSTests/wasm/stress/cc-int-to-int.js
    A JSTests/wasm/stress/cc-lotsofints-to-int.js
    A JSTests/wasm/stress/cc-so-i-heard-you-like-parameters.js
    M Source/JavaScriptCore/assembler/JITOperationList.cpp
    M Source/JavaScriptCore/bytecode/BytecodeList.rb
    M Source/JavaScriptCore/interpreter/CallFrame.h
    M Source/JavaScriptCore/interpreter/CallFrameInlines.h
    M Source/JavaScriptCore/jit/FPRInfo.h
    M Source/JavaScriptCore/jit/GPRInfo.h
    M Source/JavaScriptCore/llint/InPlaceInterpreter.cpp
    M Source/JavaScriptCore/llint/InPlaceInterpreter.h
    M Source/JavaScriptCore/llint/LLIntThunks.cpp
    M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
    M Source/JavaScriptCore/llint/WebAssembly.asm
    M Source/JavaScriptCore/runtime/InitializeThreading.cpp
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/runtime/OptionsList.h
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.h
    M Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOMGPlan.h
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.h
    M Source/JavaScriptCore/wasm/js/JSToWasm.cpp
    M Source/JavaScriptCore/wasm/js/JSToWasm.h
    M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
    M Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h

  Log Message:
  -----------
  Implement JITless JS entry thunk to Wasm
https://bugs.webkit.org/show_bug.cgi?id=277266
rdar://113768974

Reviewed by Yusuke Suzuki.

This patch builds on Justin's previous patch 
(https://commits.webkit.org/280485@main) to fully implement JITless entry to 
Wasm  code. This now allows us to run WebAssembly without enabling JIT. The 
lack of generated JIT thunks should significantly improve memory performance on 
programs with many call signatures.

Performance Testing: (N=10)
---------------------------

JetStream 2.0: 431.3 +/- 0.96 pt; up from 429.6 +/- 0.77 pt (0.40% significant 
progression)
Membuster 5: 1.357 GB +/- 3 MB; up from 1.354 GB +/- 3 MB (0.18% insignificant 
regression)

* JSTests/microbenchmarks/wasm-cc-int-to-int.js:
(wasm_instance.exports):
* JSTests/wasm/lowExecutableMemory/executable-memory-oom.js:
* JSTests/wasm/lowExecutableMemory/exports-oom.js:
(failCount.0.catch): Deleted.
(failCount.0.module.undefined.catch): Deleted.
* JSTests/wasm/noJIT/noJIT.js:
* JSTests/wasm/stress/cc-double-to-double.js: Copied from 
JSTests/wasm/stress/cc-int-to-int.js.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.f64.result.f64.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.f64.result.f64.f64.add.local.x.f64.const.42.func.export.string_appeared_here.param.x.f64.result.f64.f64.add.local.x.call.test.f64.const.1337.func.export.string_appeared_here.param.x.f64.result.f64.local.x.f64.const.98.call_indirect.t.type.sig_test.i32.const.0.f64.add.async
 test):
* JSTests/wasm/stress/cc-f32-kitchen-sink.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.f0.export.string_appeared_here.param.x0.f32.param.x1.f32.param.x2.f32.param.x3.f32.param.x4.f32.param.x5.f32.param.x6.f32.param.x7.f32.result.f32.f32.add.local.x0.f32.add.local.x1.f32.add.local.x2.f32.add.local.x3.f32.add.local.x4.f32.add.local.x5.f32.add.local.x6.local.x7.func.f1.export.string_appeared_here.param.x0.f32.param.x1.f32.param.x2.f32.param.x3.f32.param.x4.f32.param.x5.f32.param.x6.f32.param.x7.f32.param.x8.f32.param.x9.f32.param.x10.f32.param.x11.f32.result.f32.f32.add.local.x0.f32.add.local.x1.f32.add.local.x2.f32.add.local.x3.f32.add.local.x4.f32.add.local.x5.f32.add.local.x6.f32.add.local.x7.f32.add.local.x8.f32.add.local.x9.f32.add.local.x10.local.x11.func.f2.export.string_appeared_here.param.x0.f32.param.x1.f32.param.x2.f32.param.x3.f32.param.x4.f32.param.x5.f32.param.x6.f32.param.x7.f32.param.x8.f32.param.x9.f32.param.x10.f32.param.x11.f32.result.f32.f32.add.local.x0.local.x11
* JSTests/wasm/stress/cc-float-to-float.js: Copied from 
JSTests/wasm/stress/cc-int-to-int.js.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.f32.result.f32.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.f32.result.f32.f32.add.local.x.f32.const.42.func.export.string_appeared_here.param.x.f32.result.f32.f32.add.local.x.call.test.f32.const.1337.func.export.string_appeared_here.param.x.f32.result.f32.local.x.f32.const.98.call_indirect.t.type.sig_test.i32.const.0.f32.add.async
 test.instance.exports.float):
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.f32.result.f32.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.f32.result.f32.f32.add.local.x.f32.const.42.func.export.string_appeared_here.param.x.f32.result.f32.f32.add.local.x.call.test.f32.const.1337.func.export.string_appeared_here.param.x.f32.result.f32.local.x.f32.const.98.call_indirect.t.type.sig_test.i32.const.0.f32.add.async
 test):
* JSTests/wasm/stress/cc-funcref.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.test.export.string_appeared_here.param.x.funcref.result.funcref.local.x.func.test2.export.string_appeared_here.param.x.funcref.result.funcref.result.funcref.local.x.local.x.async
 test):
* JSTests/wasm/stress/cc-i32-kitchen-sink-neg.js: Copied from 
JSTests/wasm/stress/cc-i32-kitchen-sink.js.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.f0.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.result.i32.i32.add.local.x0.i32.add.local.x1.i32.add.local.x2.i32.add.local.x3.i32.add.local.x4.i32.add.local.x5.i32.add.local.x6.local.x7.func.f1.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.param.x8.i32.param.x9.i32.param.x10.i32.param.x11.i32.result.i32.i32.add.local.x0.i32.add.local.x1.i32.add.local.x2.i32.add.local.x3.i32.add.local.x4.i32.add.local.x5.i32.add.local.x6.i32.add.local.x7.i32.add.local.x8.i32.add.local.x9.i32.add.local.x10.local.x11.func.f2.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.param.x8.i32.param.x9.i32.param.x10.i32.param.x11.i32.result.i32.i32.add.local.x0.local.x11
* JSTests/wasm/stress/cc-i32-kitchen-sink.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.f0.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.result.i32.i32.add.local.x0.i32.add.local.x1.i32.add.local.x2.i32.add.local.x3.i32.add.local.x4.i32.add.local.x5.i32.add.local.x6.local.x7.func.f1.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.param.x8.i32.param.x9.i32.param.x10.i32.param.x11.i32.result.i32.i32.add.local.x0.i32.add.local.x1.i32.add.local.x2.i32.add.local.x3.i32.add.local.x4.i32.add.local.x5.i32.add.local.x6.i32.add.local.x7.i32.add.local.x8.i32.add.local.x9.i32.add.local.x10.local.x11.func.f2.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.param.x8.i32.param.x9.i32.param.x10.i32.param.x11.i32.result.i32.i32.add.local.x0.local.x11
* JSTests/wasm/stress/cc-i64-kitchen-sink-neg.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.f0.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.result.i64.i64.add.local.x0.i64.add.local.x1.i64.add.local.x2.i64.add.local.x3.i64.add.local.x4.i64.add.local.x5.i64.add.local.x6.local.x7.func.f1.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.param.x8.i64.param.x9.i64.param.x10.i64.param.x11.i64.result.i64.i64.add.local.x0.i64.add.local.x1.i64.add.local.x2.i64.add.local.x3.i64.add.local.x4.i64.add.local.x5.i64.add.local.x6.i64.add.local.x7.i64.add.local.x8.i64.add.local.x9.i64.add.local.x10.local.x11.func.f2.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.param.x8.i64.param.x9.i64.param.x10.i64.param.x11.i64.result.i64.i64.add.local.x0.local.x11
* JSTests/wasm/stress/cc-i64-kitchen-sink.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.f0.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.result.i64.i64.add.local.x0.i64.add.local.x1.i64.add.local.x2.i64.add.local.x3.i64.add.local.x4.i64.add.local.x5.i64.add.local.x6.local.x7.func.f1.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.param.x8.i64.param.x9.i64.param.x10.i64.param.x11.i64.result.i64.i64.add.local.x0.i64.add.local.x1.i64.add.local.x2.i64.add.local.x3.i64.add.local.x4.i64.add.local.x5.i64.add.local.x6.i64.add.local.x7.i64.add.local.x8.i64.add.local.x9.i64.add.local.x10.local.x11.func.f2.export.string_appeared_here.param.x0.i64.param.x1.i64.param.x2.i64.param.x3.i64.param.x4.i64.param.x5.i64.param.x6.i64.param.x7.i64.param.x8.i64.param.x9.i64.param.x10.i64.param.x11.i64.result.i64.i64.add.local.x0.local.x11
* JSTests/wasm/stress/cc-infinite-int-glitch.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.test.export.string_appeared_here.param.x.i32.result.i32.result.i32.local.x.local.x.func.test2.export.string_appeared_here.param.x.i32.result.i32.result.i32.result.i32.local.x.local.x.local.x.async
 test):
* JSTests/wasm/stress/cc-int-to-int-cross-module-with-exception.js:
(noInline.doTest.async test):
* JSTests/wasm/stress/cc-int-to-int-cross-module.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.test.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.i32.const.42.let.wat2.module.type.sig_test.func.param.i32.result.i32.import.string_appeared_here.string_appeared_here.table.t.1.funcref.import.string_appeared_here.string_appeared_here.func.test.param.x.i32.result.i32.func.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.call.test.i32.const.1337.func.export.string_appeared_here.param.x.i32.result.i32.local.x.i32.const.98.call_indirect.t.type.sig_test.i32.const.0.i32.add.async
 test):
* JSTests/wasm/stress/cc-int-to-int-jit-to-llint.js:
(noInline.iter.async test):
* JSTests/wasm/stress/cc-int-to-int-memory.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.1.data.i32.const.0.string_appeared_here.func.test.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.i32.load.i32.const.0.async
 test):
* JSTests/wasm/stress/cc-int-to-int-no-jit.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.i32.result.i32.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.i32.const.42.func.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.call.test.i32.const.1337.func.export.string_appeared_here.param.x.i32.result.i32.local.x.i32.const.98.call_indirect.t.type.sig_test.i32.const.0.i32.add.async
 test):
* JSTests/wasm/stress/cc-int-to-int-tail-call.js:
* JSTests/wasm/stress/cc-int-to-int.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.sig_test.func.param.i32.result.i32.table.t.1.funcref.elem.i32.const.0.test.func.test.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.i32.const.42.func.export.string_appeared_here.param.x.i32.result.i32.i32.add.local.x.call.test.i32.const.1337.func.export.string_appeared_here.param.x.i32.result.i32.local.x.i32.const.98.call_indirect.t.type.sig_test.i32.const.0.i32.add.async
 test):
* JSTests/wasm/stress/cc-lotsofints-to-int.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.test.export.string_appeared_here.param.x0.i32.param.x1.i32.param.x2.i32.param.x3.i32.param.x4.i32.param.x5.i32.param.x6.i32.param.x7.i32.param.x8.i32.param.x9.i32.param.xa.i32.param.xb.i32.param.xc.i32.param.xd.i32.param.xe.i32.param.xf.i32.param.xg.i32.result.i32.i32.add.local.x0.i32.add.local.x1.i32.add.local.x2.i32.add.local.x3.i32.add.local.x4.i32.add.local.x5.i32.add.local.x6.i32.add.local.x7.i32.add.local.x8.i32.add.local.x9.i32.add.local.xa.i32.add.local.xb.i32.add.local.xc.i32.add.local.xd.i32.add.local.xe.i32.add.local.xf.local.xg.async
 test):
* JSTests/wasm/stress/cc-so-i-heard-you-like-parameters.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.psel2.export.string_appeared_here.param.req1.i32.param.req2.i32.result.i32.result.i32.i32.eq.local.req1.i32.const.1.then.i32.const.1.else.result.i32.i32.eq.local.req2.i32.const.1.then.i32.const.2.else.i32.const.0):
(wat.async test):
* Source/JavaScriptCore/assembler/JITOperationList.cpp:
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/interpreter/CallFrame.h:
* Source/JavaScriptCore/interpreter/CallFrameInlines.h:
(JSC::CallFrame::setCallee):
* Source/JavaScriptCore/jit/FPRInfo.h:
(JSC::FPRInfo::toArgumentRegister):
* Source/JavaScriptCore/jit/GPRInfo.h:
(JSC::GPRInfo::toArgumentRegister):
* Source/JavaScriptCore/llint/InPlaceInterpreter.cpp:
(JSC::IPInt::initialize):
* Source/JavaScriptCore/llint/InPlaceInterpreter.h:
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::generateThunkWithJumpToPrologue):
(JSC::LLInt::generateThunkWithJumpToLLIntReturnPoint):
(JSC::LLInt::returnLocationThunk):
* Source/JavaScriptCore/llint/LowLevelInterpreter.asm:
* Source/JavaScriptCore/llint/WebAssembly.asm:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::disableAllJITOptions):
(JSC::Options::notifyOptionsChanged):
* Source/JavaScriptCore/runtime/OptionsList.h:
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::OptimizingJITCallee::addCodeOrigin):
(JSC::Wasm::OptimizingJITCallee::getOrigin const):
(JSC::Wasm::JSEntrypointInterpreterCallee::JSEntrypointInterpreterCallee):
(JSC::Wasm::JSEntrypointInterpreterCallee::entrypointImpl const):
(JSC::Wasm::JSEntrypointInterpreterCallee::calleeSaveRegistersImpl):
* Source/JavaScriptCore/wasm/WasmCallee.h:
(JSC::Wasm::jsEntrypointMetadataForGPR): Deleted.
(JSC::Wasm::jsEntrypointMetadataForFPR): Deleted.
(JSC::Wasm::dumpJSEntrypointInterpreterCalleeMetadata): Deleted.
* Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp:
(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::ensureEntrypoint):
(JSC::Wasm::LLIntPlan::tryCreateInterpretedJSToWasmCallee):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* Source/JavaScriptCore/wasm/WasmOMGPlan.h:
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::gprToIndex):
(JSC::Wasm::fprToIndex):
(JSC::Wasm::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperations.h:
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
(JSC::Wasm::createJSToWasmJITInterpreterCrashForSIMDParameters):
(JSC::Wasm::createJSToWasmJITInterpreter):
(JSC::Wasm::createJSToWasmWrapper):
* Source/JavaScriptCore/wasm/js/JSToWasm.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::m_jsToWasmInterpreterCallee):
(JSC::m_jsToWasmBoxedInterpreterCallee): Deleted.
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:

Canonical link: https://commits.webkit.org/281726@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to