Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4a10860dc35cd5fd9f388244773c119a687b6313
https://github.com/WebKit/WebKit/commit/4a10860dc35cd5fd9f388244773c119a687b6313
Author: Yusuke Suzuki <[email protected]>
Date: 2026-08-12 (Wed, 12 Aug 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
M Source/WTF/wtf/Liveness.h
Log Message:
-----------
[JSC] Make Air Liveness computation faster
https://bugs.webkit.org/show_bug.cgi?id=321628
rdar://184756552
Reviewed by Yijia Huang.
This patch makes Air Liveness computation faster via two changes.
1. Tighten WTF::Liveness
Let's avoid iterating blocks unnecessarily. We do not need to have
boundary iteration since normal iteration is also iterating the exact
same set of Insts. Also, avoid zeroing genStore as we are not relying on
the zero-ed values in genStore.
2. Liveness::forEachLiveAtHeadNotLiveAtTail /
Liveness::forEachLiveAtTailNotLiveAtHead
Because Liveness is maintaining head and tail liveness, it is very
efficient for them to generate difference between these two set.
These two new interfaces generate the sets, which is very useful in
AirAllocateRegistersByGreedy. We use this quick scanning of set to
update live range information in AirAllocateRegistersByGreedy. Like,
GreedyRegAlloc::buildLiveRanges is getting 17% reduction of time.
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::GreedyAllocator::validateAssignments):
(JSC::B3::Air::Greedy::GreedyAllocator::buildLiveRanges):
* Source/WTF/wtf/Liveness.h:
(WTF::Liveness::forEachLiveAtHead):
(WTF::Liveness::forEachLiveAtTail):
(WTF::Liveness::forEachLiveAtHeadNotLiveAtTail):
(WTF::Liveness::forEachLiveAtTailNotLiveAtHead):
(WTF::Liveness::computeDense):
(WTF::Liveness::forEachInDense):
(WTF::Liveness::forEachInSparse):
(WTF::Liveness::forEachInDenseDifference):
(WTF::Liveness::forEachInSparseDifference):
Canonical link: https://commits.webkit.org/319081@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications