[webkit-changes] [WebKit/WebKit] 5ec607: [JSC] Materialize Const128 as MemoryValue

Yusuke Suzuki noreply at github.com
Thu Dec 15 10:44:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ec607384e6cab3e0822efcc9f6bc3227b7d5505
      https://github.com/WebKit/WebKit/commit/5ec607384e6cab3e0822efcc9f6bc3227b7d5505
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M Source/JavaScriptCore/b3/B3LowerToAir.cpp
    M Source/JavaScriptCore/b3/B3MoveConstants.cpp
    M Source/JavaScriptCore/b3/B3ReduceStrength.cpp
    M Source/JavaScriptCore/b3/B3Value.cpp
    M Source/JavaScriptCore/b3/B3ValueKey.cpp
    M Source/JavaScriptCore/b3/B3ValueKey.h
    M Source/JavaScriptCore/b3/testb3.h
    M Source/JavaScriptCore/b3/testb3_1.cpp
    M Source/JavaScriptCore/b3/testb3_6.cpp
    M Source/JavaScriptCore/jit/SIMDInfo.h

  Log Message:
  -----------
  [JSC] Materialize Const128 as MemoryValue
https://bugs.webkit.org/show_bug.cgi?id=249372
rdar://103388495

Reviewed by Justin Michaud.

This patch implements Const128 MemroyValue materialization in B3 MoveConstants phase.
Materializing Const128 takes a lot of instructions. So usually compiler makes it
load-from-data-section. We already did this for double / float, so this patch extends
B3 MoveConstants to handle Const128 too.

We reorganize our DataSection in B3. Previously all the slots are 8-bytes. But now,
we create this section as follows.

    [ V128 slots ... ][ Double slots ... ][ Float slots ... ]

Since the section starts with V128, which has the largest alignment, we do not need to
consider about alignment when calculating offset in this table. Each slot is exact-sized
so that we do not waste much memory for double / float even though there is a V128 slot.

* Source/JavaScriptCore/b3/B3LowerToAir.cpp:
* Source/JavaScriptCore/b3/B3MoveConstants.cpp:
* Source/JavaScriptCore/b3/B3Value.cpp:
(JSC::B3::Value::dump const):
(JSC::B3::Value::key const):
* Source/JavaScriptCore/b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize const):
* Source/JavaScriptCore/b3/B3ValueKey.h:
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::vectorValue const):
(JSC::B3::ValueKey::hash const):
* Source/JavaScriptCore/jit/SIMDInfo.h:
(JSC::bitEquals):

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




More information about the webkit-changes mailing list