Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7ae08af38bbd7af281d7f4e04da84b09cc148f03
https://github.com/WebKit/WebKit/commit/7ae08af38bbd7af281d7f4e04da84b09cc148f03
Author: Yusuke Suzuki <[email protected]>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
M Source/WTF/wtf/IntervalSet.h
M Tools/TestWebKitAPI/Tests/WTF/IntervalSet.cpp
Log Message:
-----------
[JSC] Add a fast bulk-building constructor to IntervalSet
https://bugs.webkit.org/show_bug.cgi?id=324750
rdar://188026211
Reviewed by Dan Hecht.
GreedyRegAlloc is initially constructing IntervalSet from already
sorted, non-overlapping sequence of Interval span. We can quickly
construct IntervalSet from that by constructing each level in a bulk style.
This patch adds IntervalSet constructor which takes span for Intervals
and value, then we build each level of IntervalSet.
This removes ~10% time reduction in GreedyRegAlloc::allocateRegisters.
Test: Tools/TestWebKitAPI/Tests/WTF/IntervalSet.cpp
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::RegisterRange::add):
* Source/WTF/wtf/IntervalSet.h:
(WTF::IntervalSet::IntervalSet):
* Tools/TestWebKitAPI/Tests/WTF/IntervalSet.cpp:
(TestWebKitAPI::TEST(WTF_IntervalSet, ConstructFromSortedIntervals)):
(TestWebKitAPI::TEST(WTF_IntervalSet, ConstructFromNoIntervals)):
(TestWebKitAPI::TEST(WTF_IntervalSet, ConstructOverPopulatedSet)):
Canonical link: https://commits.webkit.org/321570@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications