Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5d5a2e3a036f05666f9f21cb2026896b9f0d8a05
      
https://github.com/WebKit/WebKit/commit/5d5a2e3a036f05666f9f21cb2026896b9f0d8a05
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-07-06 (Mon, 06 Jul 2026)

  Changed paths:
    M Source/JavaScriptCore/b3/air/AirSimplifyCFG.cpp

  Log Message:
  -----------
  [JSC] Make Air::simplifyCFG single path by chasing foldable blocks repeatedly
https://bugs.webkit.org/show_bug.cgi?id=318653
rdar://181461212

Reviewed by Yijia Huang.

We make Air::simplifyCFG better by reorganizing it into a single path
form instead of fix-point iteration to avoid repeated graph iterations.

1. When folding thread of basic blocks with only one jump, we chase the
   final target instead of folding only one. So we can quickly fold them.
   When the basic blocks are constructing a loop (and they are orphans
   since there is no entrance), then this chase never finishes. So we
   deploy Floyd's cycle detection mechanism to avoid this case. But note
   that this cycle should be extremely rare.
2. Other rewrites are as-is.

We found that by (1), 99.9% of conversion can be covered by a single-path.

* Source/JavaScriptCore/b3/air/AirSimplifyCFG.cpp:
(JSC::B3::Air::simplifyCFG):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to