Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5d6638408f1678e26ebbb0a665b1dd6c9a1d6ed8
https://github.com/WebKit/WebKit/commit/5d6638408f1678e26ebbb0a665b1dd6c9a1d6ed8
Author: Yusuke Suzuki <[email protected]>
Date: 2026-10-14 (Wed, 14 Oct 2026)
Changed paths:
M Source/JavaScriptCore/b3/B3FixSSA.cpp
M Source/JavaScriptCore/b3/B3ReduceStrength.cpp
M Source/JavaScriptCore/b3/testb3.h
M Source/JavaScriptCore/b3/testb3_3.cpp
M Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp
M Source/WTF/wtf/Dominators.h
M Source/WTF/wtf/SSACalculator.h
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WTF/DominatorsTests.cpp
Log Message:
-----------
[JSC] Improve B3 FixSSA by tracking reachable defs
https://bugs.webkit.org/show_bug.cgi?id=327547
rdar://190031307
Reviewed by Keith Miller.
FixSSA is taking very long time for SSACalculator::reachingDefAtHead,
but we can do exact same optimization to 323542@main to reduce the cost.
Let's visit the blocks in dominator tree pre-ordering. And keep
computing the current reachable defs and rolling back when we move to
the different subtree via undo logging.
We also introduce Dominators::forAllBlocksInDominatorTreePreOrder as we
frequently see this dominator tree pre-ordering in our compilers.
* Source/JavaScriptCore/b3/B3FixSSA.cpp:
(JSC::B3::fixSSA):
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/testb3.h:
* Source/JavaScriptCore/b3/testb3_3.cpp:
(checkFixSSAResult):
(testFixSSALocalOnly):
(testFixSSADiamondSetInOneArm):
(testFixSSADiamondJoinPhi):
(testFixSSADominatorChain):
(testFixSSAGetBeforeSet):
(testFixSSASetFromGetInSameBlock):
(addShrTests):
* Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:
* Source/WTF/wtf/Dominators.h:
(WTF::Dominators::forAllBlocksInDominatorTreePreOrder const):
* Source/WTF/wtf/SSACalculator.h:
(WTF::SSACalculator::newDefBlock):
(WTF::SSACalculator::reachingDefAtTail):
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/DominatorsTests.cpp: Added.
(TestWebKitAPI::TEST(WTF_Dominators, PreOrderWalkSingleNode)):
(TestWebKitAPI::TEST(WTF_Dominators, PreOrderWalkNesting)):
(TestWebKitAPI::TEST(WTF_Dominators, PreOrderWalkReversePostOrder)):
Canonical link: https://commits.webkit.org/323798@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications