Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6e8264d2a17461cc9cfac2def534d7fb18bbcb4
https://github.com/WebKit/WebKit/commit/d6e8264d2a17461cc9cfac2def534d7fb18bbcb4
Author: Yijia Huang <[email protected]>
Date: 2025-04-02 (Wed, 02 Apr 2025)
Changed paths:
A JSTests/stress/loop-unrolling-variable-with-inverted-condition.js
M Source/JavaScriptCore/dfg/DFGLoopUnrollingPhase.cpp
Log Message:
-----------
[JSC] Fix inverted condition in partial loop unrolling and clarify logic with
shouldFullyUnroll()
https://bugs.webkit.org/show_bug.cgi?id=290927
rdar://148439864
Reviewed by Yusuke Suzuki.
This patch fixes an inverted condition bug that affected partial loop unrolling.
Previously, full unrolling handled the edge direction implicitly during constant
iteration computation. Therefore, for partial unrolling, we need to explicitly
swap the taken and notTaken edges at the terminal branch to maintain correct
control flow.
To clarify the semantics, the helper method isOperandConstant() has been renamed
to shouldFullyUnroll() to make the distinction between full and partial
unrolling
explicit. All related code paths have been updated accordingly.
* JSTests/stress/loop-unrolling-variable-with-inverted-condition.js: Added.
(test):
* Source/JavaScriptCore/dfg/DFGLoopUnrollingPhase.cpp:
(JSC::DFG::LoopUnrollingPhase::LoopData::shouldFullyUnroll const):
(JSC::DFG::LoopUnrollingPhase::identifyInductionVariable):
(JSC::DFG::LoopUnrollingPhase::shouldUnrollLoop):
(JSC::DFG::LoopUnrollingPhase::unrollLoop):
(JSC::DFG::LoopUnrollingPhase::LoopData::dump const):
(JSC::DFG::LoopUnrollingPhase::LoopData::isOperandConstant const): Deleted.
Canonical link: https://commits.webkit.org/293123@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes