[Wasm Ryujit] Wasm SP is implicitly referenced#124115
[Wasm Ryujit] Wasm SP is implicitly referenced#124115AndyAyersMS merged 1 commit intodotnet:mainfrom
Conversation
Fixes an issue where SP mentions are introduced late (say from a throw helper).
|
@SingleAccretion not sure if this is what we agreed on or you have other ideas. Fixes things like where the only SP mention is in the bounds check helper. |
|
fyi @dotnet/jit-contrib |
There was a problem hiding this comment.
Pull request overview
This PR ensures the Wasm shadow stack pointer local (lvaWasmSpArg) is treated as “implicitly referenced” so it won’t be considered unused when references to it are introduced later in compilation (e.g., via late-added helper calls).
Changes:
- Mark the Wasm stack pointer argument local as
lvImplicitlyReferenced. - Mark the reverse-P/Invoke Wasm stack pointer temp local as
lvImplicitlyReferencedwhen it is allocated.
SingleAccretion
left a comment
There was a problem hiding this comment.
I think the ordering issue between the stack level setter and liveness / ref counting still needs to be fixed, but this is also a correct change (since there are implicit references at nodes like LCLHEAP).
|
@adamperlin @kg can one of you approve? |
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Fixes an issue where SP mentions are introduced late (say from a throw helper).