Skip to content

Conversation

@ltratt
Copy link
Contributor

@ltratt ltratt commented May 14, 2025

In 0511255 I introduced an optimisation that designs to reuse spill slots when possible. That turns out to be broken because, at least in part, input variables can alias on the stack. Here is a chunk from a real trace:

; %1: ptr = param Indirect(6, -56, 8)
; %2: ptr = param Indirect(6, -56, 8)

If we reuse %1s spill slot we might (depending on the trace) corrupt %2.

I suspect we can -- if this optimisation is still worth it! -- fix this, but since it's a fairly clear correctness bug right now (indeed it's holding up ykjit/yklua#124), I think the right thing to do is to revert it (and the subsequent commits that tweak it) and give me the time to fix it at my leisure (if I think it's worth fixing).

@ptersilie ptersilie added this pull request to the merge queue May 14, 2025
Merged via the queue into ykjit:master with commit 31cff2e May 14, 2025
2 checks passed
@ltratt ltratt deleted the revert_spill_to branch May 15, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants