Skip to content

Commit 75825f3

Browse files
committed
[AArch64] Adopt x8+ allocation order for GPR64noip.
73078ec added GPR64noip for hwasan pseudos. Give it an allocation order that prefers allocating from x8 and up, to match GPR64: this allows for easier regalloc, as x0-x7 are likely to be used for parameter passing.
1 parent 96fa240 commit 75825f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Target/AArch64/AArch64RegisterInfo.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,10 @@ def tcGPRnotx16 : RegisterClass<"AArch64", [i64], 64, (sub tcGPR64, X16)>;
234234
// Register set that excludes registers that are reserved for procedure calls.
235235
// This is used for pseudo-instructions that are actually implemented using a
236236
// procedure call.
237-
def GPR64noip : RegisterClass<"AArch64", [i64], 64, (sub GPR64, X16, X17, LR)>;
237+
def GPR64noip : RegisterClass<"AArch64", [i64], 64, (sub GPR64, X16, X17, LR)> {
238+
let AltOrders = [(rotl GPR64noip, 8)];
239+
let AltOrderSelect = [{ return 1; }];
240+
}
238241

239242
// GPR register classes for post increment amount of vector load/store that
240243
// has alternate printing when Rm=31 and prints a constant immediate value

0 commit comments

Comments
 (0)