Repository navigation
Allow NativeAOT WASM method folding with frame identity relocations - #137073
Conversation
Normalize self-targeting WASM frame identity relocations consistently in method-body hashing and equality. Preserve all signature, GC, unwind, and exception-handling comparisons. Co-authored-by: Copilot <[email protected]> Copilot-Session: 9bc3dfee-1040-4648-bdad-86922a749613
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
jkotas
left a comment
There was a problem hiding this comment.
I assume that we did not take any wasm shortcuts elsewhere and the function pointer to method info mapping still works fine with this change.
There was a problem hiding this comment.
🔵 Needs a closer look
Changes to WASM shadow-frame identity require NativeAOT WASM runtime validation of GC, exception handling, and stack walking, which was unavailable in this static review.
No open issues 🎉
What changed in this PR
Enables NativeAOT WebAssembly method-body folding when otherwise identical methods differ only in self-targeting frame identity relocations.
Changes:
- Adds shared detection of self-targeting frame identity relocations for consistent hashing and equality.
- Passes method owners into body comparison while leaving signature, GC, unwind, and exception-handling comparisons unchanged.
| File | Description |
|---|---|
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MethodBodyDeduplicator.cs |
Normalizes self-targeting WASM frame identity relocations during method-body hashing and equality checks. |
Review effort: Balanced
I'm not aware of taking shortcuts, this should work same as other architectures and I think I ran the tests on this locally. Either way, will find out soon. |
Normalize self-targeting WASM frame identity relocations consistently in method-body hashing and equality. Preserve all signature, GC, unwind, and exception-handling comparisons.