You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MIR the MoveRegister instruction has a volatile field, meant to signal "this move should not be optimized away". It's currently only used when assigning registers that correspond to a local variable.
We could replace this with a SetLocal instruction as this more clearly communicates its intent. In addition, I think this makes it easier to add debug info for local variables at some point in the future. However, since local variables don't really exist at the MIR level this might be a bit odd.
The only place where we read this field is when determining the number of uses of a register, where in case volatile = true we also count the target register. I'm not sure we actually need that or if there's a better approach in the first place.
The text was updated successfully, but these errors were encountered:
In MIR the
MoveRegister
instruction has avolatile
field, meant to signal "this move should not be optimized away". It's currently only used when assigning registers that correspond to a local variable.We could replace this with a
SetLocal
instruction as this more clearly communicates its intent. In addition, I think this makes it easier to add debug info for local variables at some point in the future. However, since local variables don't really exist at the MIR level this might be a bit odd.The only place where we read this field is when determining the number of uses of a register, where in case
volatile = true
we also count the target register. I'm not sure we actually need that or if there's a better approach in the first place.The text was updated successfully, but these errors were encountered: