[webkit-changes] [WebKit/WebKit] b53bf3: [JSC] Fix jitCompileSIMDFunction when recompiling ...

Yijia Huang noreply at github.com
Sat May 18 10:28:54 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b53bf3051822348ead87b99a62f53bbcbe571ed8
      https://github.com/WebKit/WebKit/commit/b53bf3051822348ead87b99a62f53bbcbe571ed8
  Author: Yijia Huang <yijia_huang at apple.com>
  Date:   2024-05-18 (Sat, 18 May 2024)

  Changed paths:
    M Source/JavaScriptCore/runtime/MemoryMode.h
    M Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntTierUpCounter.h
    M Source/JavaScriptCore/wasm/WasmLLIntTierUpCounter.h
    M Source/JavaScriptCore/wasm/WasmOMGPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmPlan.h
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmTierUpCount.cpp
    M Source/JavaScriptCore/wasm/WasmTierUpCount.h

  Log Message:
  -----------
  [JSC] Fix jitCompileSIMDFunction when recompiling the same function with a compiled replacement in different mode
https://bugs.webkit.org/show_bug.cgi?id=274327
rdar://128141991

Reviewed by Mark Lam and Yusuke Suzuki.

We might encounter a situation that a WASM SIMD function was previously compiled
with the fast memory in a Signaling mode, but failed and tried to recompile
the same function in a BoundsChecking mode. In that case, we should allow it
to be compiled.

To fix this issue, the compilation status should be tracked and updated for each
memory mode. This patch fixes all the potential issues among
WasmIPIntTierUpCounter.h, WasmLLIntTierUpCounter.h, and WasmTierUpCount.h.

* Source/JavaScriptCore/runtime/MemoryMode.h:
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::work):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
(JSC::IPInt::jitCompileAndSetHeuristics):
(JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL):
* Source/JavaScriptCore/wasm/WasmIPIntTierUpCounter.h:
(JSC::Wasm::IPIntTierUpCounter::IPIntTierUpCounter):
(JSC::Wasm::IPIntTierUpCounter::compilationStatus):
(JSC::Wasm::IPIntTierUpCounter::setCompilationStatus):
(JSC::Wasm::IPIntTierUpCounter::loopCompilationStatus):
(JSC::Wasm::IPIntTierUpCounter::setLoopCompilationStatus):
(): Deleted.
* Source/JavaScriptCore/wasm/WasmLLIntTierUpCounter.h:
(JSC::Wasm::LLIntTierUpCounter::LLIntTierUpCounter):
(JSC::Wasm::LLIntTierUpCounter::compilationStatus):
(JSC::Wasm::LLIntTierUpCounter::setCompilationStatus):
(JSC::Wasm::LLIntTierUpCounter::loopCompilationStatus):
(JSC::Wasm::LLIntTierUpCounter::setLoopCompilationStatus):
(): Deleted.
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::work):
* Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp:
(JSC::Wasm::OSREntryPlan::work):
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::triggerOMGReplacementCompile):
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmPlan.h:
(JSC::Wasm::Plan::mode const):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::jitCompileSIMDFunction):
(JSC::LLInt::WASM_SLOW_PATH_DECL):
* Source/JavaScriptCore/wasm/WasmTierUpCount.cpp:
(JSC::Wasm::TierUpCount::TierUpCount):
* Source/JavaScriptCore/wasm/WasmTierUpCount.h:
(JSC::Wasm::TierUpCount::compilationStatusForOMG):
(JSC::Wasm::TierUpCount::setCompilationStatusForOMG):
(JSC::Wasm::TierUpCount::compilationStatusForOMGForOSREntry):
(JSC::Wasm::TierUpCount::setCompilationStatusForOMGForOSREntry):
(): Deleted.

Canonical link: https://commits.webkit.org/278957@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