Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f336bd7ad8e3a976083736de44e9a3f3efa459cc
      
https://github.com/WebKit/WebKit/commit/f336bd7ad8e3a976083736de44e9a3f3efa459cc
  Author: Dan Hecht <[email protected]>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

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

  Log Message:
  -----------
  [JSC][GreedyRegAlloc] Fix a logic error when computing cannotSpillInPlace
https://bugs.webkit.org/show_bug.cgi?id=288611
rdar://145667429

Reviewed by Keith Miller and Yusuke Suzuki.

The filter to ignore tmps that can be spilled in place had a
logic error that made it ineffective. That meant that all
tmps were added to the cannotSpillInPlace set, and so all
tmps that are used only in two consecutive instructions were
marked as unspillable. This is not what was intended and not
optimal.

The b3test::testPatchpointWithAnyResult caught this issue by
causing an assert in the greedy allocator to trigger because that
test clobbers all FP regs at the point where the patchpoint result
is live in order to force the result to spill, but the result tmp
was incorrectly marked as unspillable due to this bug.

* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::GreedyAllocator::initSpillCosts):

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



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

Reply via email to