[webkit-changes] [WebKit/WebKit] 8dcb71: Clean-up ArrayProfile usage in call opcodes

Keith Miller noreply at github.com
Wed Jul 5 18:27:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8dcb7191395e7e21c6512a42a9fb0f40a92199a7
      https://github.com/WebKit/WebKit/commit/8dcb7191395e7e21c6512a42a9fb0f40a92199a7
  Author: Keith Miller <keith_miller at apple.com>
  Date:   2023-07-05 (Wed, 05 Jul 2023)

  Changed paths:
    M Source/JavaScriptCore/bytecode/BytecodeList.rb
    M Source/JavaScriptCore/bytecode/BytecodeOperandsForCheckpoint.h
    M Source/JavaScriptCore/bytecode/CodeBlock.cpp
    M Source/JavaScriptCore/bytecode/Opcode.h
    M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
    M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
    M Source/JavaScriptCore/jit/JITCall.cpp
    M Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

  Log Message:
  -----------
  Clean-up ArrayProfile usage in call opcodes
https://bugs.webkit.org/show_bug.cgi?id=258894

Reviewed by Justin Michaud.

Right now we have an ArrayProfile for every call opcode. This, I assume, was because the
templated code in the Baseline JIT expected a member in the metadata with the name
m_arrayProfile. However we would only ever write to this profile for op_call in the
Baseline. In the interpreter, however, we would write to the profile for op_call and
op_tail_call. This patch consolidates the behavior of the different tiers. Additionally,
I noticed that op_iterator_open does not use it's ArrayProfile but should because the
iterable could be a TypedArray, which requires ArrayProfile information use the intrinsic.

For all other call opcodes this patch removes the ArrayProfile as they would be effectively unused.

* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/bytecode/BytecodeOperandsForCheckpoint.h:
(JSC::arrayProfileForImpl): Deleted.
(JSC::hasArrayProfileFor): Deleted.
(JSC::arrayProfileFor): Deleted.
* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::updateAllArrayProfilePredictions):
* Source/JavaScriptCore/bytecode/Opcode.h:
* Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::allocateSharedProfiles):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getArrayMode):
* Source/JavaScriptCore/jit/JITCall.cpp:
(JSC::JIT::compileSetupFrame):
* Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:

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




More information about the webkit-changes mailing list