Files
clang-p2996/llvm/lib/Target/WebAssembly/WebAssembly.h
Heejin Ahn d4cdb516ee [WebAssembly] Add RefTypeMem2Local pass (#81965)
This adds `WebAssemblyRefTypeMem2Local` pass, which changes the address
spaces of reference type `alloca`s to `addrspace(1)`. This in turn
changes the address spaces of all `load` and `store` instructions that
use the `alloca`s.

`addrspace(1)` is `WASM_ADDRESS_SPACE_VAR`, and loads and stores to this
address space become `local.get`s and `local.set`s, thanks to the Wasm
local IR support added in

82f92e35c6.

In a follow-up PR, I am planning to replace the usage of mem2reg pass
with this to solve the reference type `alloca` problems described in
#81575.
2024-02-27 14:00:43 -08:00

4.5 KiB