Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a78705db7c08d5354b03bd114d338603a88e4834
https://github.com/WebKit/WebKit/commit/a78705db7c08d5354b03bd114d338603a88e4834
Author: Dan Hecht <[email protected]>
Date: 2026-02-10 (Tue, 10 Feb 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WTF/wtf/CMakeLists.txt
A Source/WTF/wtf/GenerationalSet.h
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WTF/GenerationalSet.cpp
Log Message:
-----------
[JSC] GreedyRegAlloc: amortize cost of clearing the visited set in the evict
loop
https://bugs.webkit.org/show_bug.cgi?id=307389
rdar://170013416
Reviewed by Yusuke Suzuki and Marcus Plutowski.
When there are a lot of Tmps, the visited.clearAll() can be too
expensive to do for each eviction attempt of each register.
Amortize this overhead by introducing a generation based set.
Tests: Tools/TestWebKitAPI/Tests/WTF/GenerationalSet.cpp
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::GreedyAllocator::tryEvict):
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/GenerationalSet.h: Added.
(WTF::GenerationalSet::GenerationalSet):
(WTF::GenerationalSet::resize):
(WTF::GenerationalSet::size const):
(WTF::GenerationalSet::clear):
(WTF::GenerationalSet::contains const):
(WTF::GenerationalSet::add):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/GenerationalSet.cpp: Added.
(TestWebKitAPI::TEST(WTF_GenerationalSet, Basic)):
(TestWebKitAPI::TEST(WTF_GenerationalSet, GenerationWrapAround)):
(TestWebKitAPI::TEST(WTF_GenerationalSet, Resize)):
(TestWebKitAPI::TEST(WTF_GenerationalSet, DifferentGenerationTypes)):
Canonical link: https://commits.webkit.org/307222@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications