Commit 98a7d20
Use kObject for address loads in rewriteMoveAbsoluteAddress
Summary: The `rewriteMoveAbsoluteAddress` postgen pass on AArch64 lowers absolute memory address operands into a two-instruction sequence: first loading the address into a virtual register, then using an indirect load through that register. Previously the intermediate `Move(Imm → vreg)` used `DataType::k64bit`, which meant the branch relaxation pass did not recognize it as a pointer-width operand and could not select optimal instruction sequences (e.g. `adr`/`adrp+add`/`ldr` instead of `movz+movk` chains). Changing to `DataType::kObject` allows the value to flow through branch relaxation correctly, since the relaxation pass keys on the data type to determine whether an immediate load is a candidate for address-relative encoding.
Reviewed By: alexmalyshev
Differential Revision: D103072904
fbshipit-source-id: cb00a2fecccfe8adee41ece6294d2b770793de561 parent 870e469 commit 98a7d20
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
701 | | - | |
| 700 | + | |
| 701 | + | |
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
153 | 173 | | |
0 commit comments