Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ba0e7b402408ae38dc8c74d2f4981588cff9cb31
      
https://github.com/WebKit/WebKit/commit/ba0e7b402408ae38dc8c74d2f4981588cff9cb31
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp
    M Source/JavaScriptCore/b3/B3FixSSA.cpp
    M Source/JavaScriptCore/b3/B3Procedure.cpp
    M Source/JavaScriptCore/b3/B3Procedure.h

  Log Message:
  -----------
  [JSC] Actually remove B3::Variable from B3::Procedure
https://bugs.webkit.org/show_bug.cgi?id=325058
rdar://188225905

Reviewed by Keith Miller.

We found two efficiency issues.

1. Procedure::deleteVariable just clears and assigns `nullptr` to
   SparseCollection. So it does not reduce size, thus, `isEmpty()` guard
   in fixSSA was meaningless.
2. We are not deleting any Varaibles after fixSSAGlobally while it must
   drop all Variables.

The fix is,

1. When liveVariables are zero in fixSSALocally, killDeadVariables
   should call deleteAllVariables.
2. After fixSSAGlobally, we should call deleteAllVariables.
3. deleteAllVariables should just clear SparseCollection completely.

* Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp:
(JSC::B3::eliminateDeadCodeImpl):
* Source/JavaScriptCore/b3/B3FixSSA.cpp:
(JSC::B3::fixSSA):
* Source/JavaScriptCore/b3/B3Procedure.cpp:
(JSC::B3::Procedure::deleteAllVariables):
* Source/JavaScriptCore/b3/B3Procedure.h:

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



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

Reply via email to