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

  Changed paths:
    M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
    M Source/JavaScriptCore/b3/air/AirTmpMap.h

  Log Message:
  -----------
  [JSC] Use Vector+InlineCapacity in LiveRange in AirAllocateRegistersByGreedy
https://bugs.webkit.org/show_bug.cgi?id=324009
rdar://187246753

Reviewed by Keith Miller.

Use Vector with InlineCapacity in AirAllocateRegistersByGreedy's
LiveRange construction.

1. Use InlineCapacity to avoid repeated alloc & free calls. Most of
   cases, this size 4 is enough.
2. Use Vector instead of Deque. And during construction, we append
   instead of prepend, and then when finalizing, we just reverse it.
   Deque is faster for this prepend, but Vector iteration etc. is
   faster than Deque due to Deque's iterator handles round-trip.
   And read-side is more heavy in this LiveRange data structure.

* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::LiveRange::validate):
(JSC::B3::Air::Greedy::LiveRange::prependDescending):
(JSC::B3::Air::Greedy::LiveRange::lowestSoFar const):
(JSC::B3::Air::Greedy::LiveRange::finishDescendingBuild):
(JSC::B3::Air::Greedy::LiveRange::intervals const):
(JSC::B3::Air::Greedy::GreedyAllocator::buildLiveRanges):
(JSC::B3::Air::Greedy::GreedyAllocator::addTmpImpl):
(JSC::B3::Air::Greedy::LiveRange::prepend): Deleted.
* Source/JavaScriptCore/b3/air/AirTmpMap.h:
(JSC::B3::Air::TmpMap::forEachValue):

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



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

Reply via email to