alexcrichton transferred Issue #1163:
I think the stack_load format should be renamed, as it is used for stack_addr here too.
_Originally posted by @bjorn3 in https://github.com/CraneStation/cranelift/pull/1160_
It's a good idea, but I can't think of a right name right now. Format naming can sometimes be inconsistent.
The
stack_load
format is used by two instructions:
- the
stack_load
instruction (load from the stack)- the
stack_addr
instruction, which computes the address of a stack slot.The
stack_store
format is used only the instruction that has the same name.For consistency with other operators, I thought about renaming stack_load => UnaryStack, and stack_store => BinaryStack, but I feel it hides part of the information (which is why I'm not a huge fan of BinaryImm in the first place).
Maybe an alternative is to rename stack_load into stack_read, and keep stack_store as is?
(Let the bikeshed begin!)
Last updated: Dec 23 2024 at 14:03 UTC