[webkit-changes] [WebKit/WebKit] 6b4986: [JSC] Add teeLocal to wasm generators

Yusuke Suzuki noreply at github.com
Thu Aug 1 23:48:39 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b4986c3854b7290cb9e50f6121d9d632c54ba98
      https://github.com/WebKit/WebKit/commit/6b4986c3854b7290cb9e50f6121d9d632c54ba98
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT.h
    M Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp

  Log Message:
  -----------
  [JSC] Add teeLocal to wasm generators
https://bugs.webkit.org/show_bug.cgi?id=277525
rdar://133029463

Reviewed by Keith Miller.

This patch adds TeeLocal handling in wasm code generators. In LLInt, it is the same.

1. In BBQ, we attempt to avoid loading value from the local slot.
2. In OMG, we reuse B3 Value as the result and avoid loading from the variable slot. After the optimization, this does not matter much but it reduces use of B3::Variable.

* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::teeLocal):
* Source/JavaScriptCore/wasm/WasmBBQJIT.h:
* Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp:
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::teeLocal):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::teeLocal):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::teeLocal):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp:
(JSC::Wasm::OMGIRGenerator::teeLocal):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list