Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd03ee92315ed0b6eab52869d3665fd4f970581f
      
https://github.com/WebKit/WebKit/commit/bd03ee92315ed0b6eab52869d3665fd4f970581f
  Author: Dan Hecht <[email protected]>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

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

  Log Message:
  -----------
  [JSC] GreedyRegAlloc: introduce gap points between instructions
https://bugs.webkit.org/show_bug.cgi?id=302815
rdar://165070452

Reviewed by Yusuke Suzuki.

Currently, there are two points per instruction: Early point which models
early effects and late point which models late effects. This means that
in the case of an early def by the first instruction in a block
or late use by the last instruction in a block, the live ranges
cannot distinguish whether the range is live into / out of
the block since the first / last points will include the ranges in either
case of the last point def'ing / using the Tmp or the Tmp being live
across block boundaries.

Instead, let's use four points per instruction. Then, for the first
instruction of a block, the Pre point will be included in an interval
if and only if the Tmp is live into the block, and likewise for the
Post point and the block exit.

This will allow for more sophisticated live range splitting to be
implemented without needing to keep around explicit liveness information
for the duration of register allocation by allowing the live ranges to
be the full source of truth.

Bonus: Similarly, because the previous instruction's late point and next
instruction's early point are adjacent, the live range intervals
do not indicate kill positions in the case of a late use followed
by early def. Note however that this case is currently handled using
padInterference which inserts Nop instructions at these locations.
So as a bonus, this change removes a dependency on padInterference and
eventually padInterference can go away.

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



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

Reply via email to