Stream: cranelift

Topic: code generation for load and store instrction


view this post on Zulip Mary (Aug 23 2022 at 18:30):

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?

view this post on Zulip Chris Fallin (Aug 23 2022 at 18:35):

@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

view this post on Zulip Chris Fallin (Aug 23 2022 at 18:36):

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: Nov 22 2024 at 17:03 UTC