I want to change code generation for (in x64 arch) load and store instruction when want to load/store data section of a wasm module. But I couldn’t find the related code in Cranelift. Are there any specific functions in the lowering step?
@Mary there is the "legalization" step that turns the heap_addr
instruction into a specific address computation, then we use load
and store
instructions to access this address. These instructions are not distinguished by type from the others (e.g. to VM-internal state) though
However there is an alias-analysis flag for heap
and if you want to experiment with doing special things to just these instructions you could recognize them that way
Last updated: Dec 23 2024 at 12:05 UTC