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
If we kept track of what conditions were set we could get better performance on the idiom:
for (inti=something; i!=0; i--) {
// ...
}
Instead of emitting a cmp after the dec, we can work out that we already have the zero flag set from the dec and just emit a jnz. Currently there's no way to abstract over different instructions and get metadata for them, so this would be very complicated to implement without a new assembler.
EDIT: Keeping track of what instructions mutate which condition codes would allow us to implement CraneStation/lightbeam#16 in a way that only spills the "condition" if we're about to emit an instruction that would invalidate it.
The text was updated successfully, but these errors were encountered:
If we kept track of what conditions were set we could get better performance on the idiom:
Instead of emitting a
cmp
after thedec
, we can work out that we already have the zero flag set from thedec
and just emit ajnz
. Currently there's no way to abstract over different instructions and get metadata for them, so this would be very complicated to implement without a new assembler.EDIT: Keeping track of what instructions mutate which condition codes would allow us to implement CraneStation/lightbeam#16 in a way that only spills the "condition" if we're about to emit an instruction that would invalidate it.
The text was updated successfully, but these errors were encountered: