Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 96b1030b8df45a6799b4e4bc1f354287c20e56c8
https://github.com/WebKit/WebKit/commit/96b1030b8df45a6799b4e4bc1f354287c20e56c8
Author: Yusuke Suzuki <[email protected]>
Date: 2026-08-24 (Mon, 24 Aug 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
M Source/JavaScriptCore/b3/air/AirPrintSpecial.cpp
M Source/JavaScriptCore/b3/air/AirPrintSpecial.h
Log Message:
-----------
[JSC] Make Air Greedy RegAlloc faster
https://bugs.webkit.org/show_bug.cgi?id=322350
rdar://185620492
Reviewed by Sosuke Suzuki.
Perform several optimizations to reduce compile time in Air Greedy RegAlloc.
1. Caching ClobberSite for each point. Some of Air Inst, like Call is
clobbering all caller-save registers. Thus this query can be executed
frequently with the same point. Let's just cache it in the Vector so
that we can quickly answer to the question here.
2. Use forEachTmpFast if possible as it is dramatically faster than forEachArg.
We also fixes AirPrintSpecial was not reporting the args correctly.
3. In emitSpillCodeAndEnqueueNewTmps, before doing complicated spill
analysis and emission code, we do quick rejection via forEachTmpFast
check.
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::GreedyAllocator::buildLiveRanges):
(JSC::B3::Air::Greedy::GreedyAllocator::trySplitAroundClobbers):
(JSC::B3::Air::Greedy::GreedyAllocator::validateFastTmpEnumeration):
(JSC::B3::Air::Greedy::GreedyAllocator::ensureUseDefLists):
(JSC::B3::Air::Greedy::GreedyAllocator::emitSpillCodeAndEnqueueNewTmps):
* Source/JavaScriptCore/b3/air/AirPrintSpecial.cpp:
(JSC::B3::Air::PrintSpecial::forEachArg):
(JSC::B3::Air::PrintSpecial::generate):
* Source/JavaScriptCore/b3/air/AirPrintSpecial.h:
Canonical link: https://commits.webkit.org/319706@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications