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
Summary:
Adds `kLoadPair`, the load-side counterpart to the existing `kStorePair`, so
adjacent 64-bit loads can be emitted as a single `ldp`. It takes the same
(offset, base) shape as `kStorePair`, with the first destination as the output
and the second as an extra input. On x86 it lowers to two `mov`s.
The first user is `PopulateEntryBlock`, which loads the vectorcall arguments
from consecutive slots of the argument array on every JIT function entry:
```
mov x10, x1 mov x10, x1
ldr x1, [x10] ldp x1, x2, [x10]
ldr x2, [x10, #8] -> ldp x3, x4, [x10, #0x10]
ldr x3, [x10, #0x10] ldp x5, x6, [x10, #0x20]
ldr x4, [x10, #0x18]
ldr x5, [x10, #0x20]
ldr x6, [x10, #0x28]
```
One important caveat about this - we have no support for instructions w/ multiple outputs. So this instruction is only available after register allocation where we've previously allocated the output register as part of a load instruction. The current usage runs after register allocation and the next diff adds a post-alloc pass as well.
Pairing is limited to aarch64 so x86 output is unchanged.
Reviewed By: alexmalyshev
Differential Revision: D114969843
fbshipit-source-id: 6f77f125a67b19201aac2d52dbcace9fc8bc3837
0 commit comments