Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7825a32d2bf0b2cf0c0088f0386a052274d25c86
      
https://github.com/WebKit/WebKit/commit/7825a32d2bf0b2cf0c0088f0386a052274d25c86
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M Source/JavaScriptCore/b3/air/AirLivenessAdapter.h
    M Source/JavaScriptCore/b3/air/AirRegLiveness.cpp
    M Source/JavaScriptCore/b3/air/AirRegLiveness.h
    M Source/WTF/wtf/Liveness.h

  Log Message:
  -----------
  [JSC] Add Streaming mode of Liveness adaptor
https://bugs.webkit.org/show_bug.cgi?id=324795
rdar://188059985

Reviewed by Yijia Huang.

WTF::Liveness is collecting all gen and kill information by running
adaptor's information, and using this collected information to construct
liveness. As a result, we only use adaptor's information once.
As a result, AirLivenessAdapter is constructing entire action matrix,
but it is used only once to construct gen and kill information. So then
we do not need to construct this matrix.

This patch adds streaming interface to Liveness adaptor, so it uses this
interface to construct gen and kill information. AirLivenessAdapter no
longer need to construct and retain action matrix, significantly
accelerate liveness construction. This patch improves
GreedyRegAlloc::buildLiveRanges by 8.88%.

We also remove LocalCalcForUnifiedTmpLiveness as nobody is using it. So
we can just use streaming interface of AirLivenessAdapter.

* Source/JavaScriptCore/b3/air/AirLivenessAdapter.h:
(JSC::B3::Air::LivenessAdapter::prepareToCompute):
(JSC::B3::Air::LivenessAdapter::forEachActionGroupDescendingStreaming):
(JSC::B3::Air::LivenessAdapter::forEachUseInGroup):
(JSC::B3::Air::LivenessAdapter::forEachDefInGroup):
(JSC::B3::Air::LivenessAdapter::ensureActions):
(JSC::B3::Air::LivenessAdapter::actionsAt):
(JSC::B3::Air::LivenessAdapter::forEachActionGroupDescending):
(JSC::B3::Air::LivenessAdapter::forEachUseAtTail):
* Source/JavaScriptCore/b3/air/AirRegLiveness.cpp:
(JSC::B3::Air::RegLiveness::LocalCalcForUnifiedTmpLiveness::LocalCalcForUnifiedTmpLiveness):
 Deleted.
(JSC::B3::Air::RegLiveness::LocalCalcForUnifiedTmpLiveness::execute): Deleted.
* Source/JavaScriptCore/b3/air/AirRegLiveness.h:
(JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc):
(JSC::B3::Air::RegLiveness::LocalCalcBase::LocalCalcBase): Deleted.
(JSC::B3::Air::RegLiveness::LocalCalcBase::live const): Deleted.
(JSC::B3::Air::RegLiveness::LocalCalcBase::isLive const): Deleted.
* Source/WTF/wtf/Liveness.h:
(WTF::Liveness::adapterStreamsActions):
(WTF::Liveness::computeDense):

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



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

Reply via email to