Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4e25b3d33639634597b7fb073b67c4aabaa8f51e
      
https://github.com/WebKit/WebKit/commit/4e25b3d33639634597b7fb073b67c4aabaa8f51e
  Author: Yijia Huang <yijia_hu...@apple.com>
  Date:   2025-04-08 (Tue, 08 Apr 2025)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGLoopUnrollingPhase.cpp

  Log Message:
  -----------
  [JSC] Support partial loop unrolling with non-constant initial induction 
values
https://bugs.webkit.org/show_bug.cgi?id=291297
rdar://148865126

Reviewed by Yusuke Suzuki.

Previously, loop unrolling required the induction variable's initial value to
be a constant (CheckedInt32) in order to proceed with full or partial unrolling.
This change generalizes the handling of the initialValue field to support both
constant and non-constant forms by making it a std::variant<Node*, 
CheckedInt32>.

As a result, partial unrolling can now proceed even when the induction variable
is initialized with a non-constant value, improving the optimizer's ability to
handle a broader range of loop forms. Also updated debug output to reflect the
variant type of initialValue.

* Source/JavaScriptCore/dfg/DFGLoopUnrollingPhase.cpp:
(JSC::DFG::LoopUnrollingPhase::LoopData::shouldFullyUnroll const):
(JSC::DFG::LoopUnrollingPhase::identifyInductionVariable):
(JSC::DFG::LoopUnrollingPhase::LoopData::dump const):

Canonical link: https://commits.webkit.org/293452@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to