[llvm] [CodeGen] Use MCRegister for ignoreCSRForAllocationOrder. (PR #123685)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 20:40:14 PST 2025
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/123685
None
>From 3e0160e2423db4da17076ab517c2fb34ecf23ec8 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 20 Jan 2025 20:39:15 -0800
Subject: [PATCH] [CodeGen] Use MCRegister for ignoreCSRForAllocationOrder.
---
llvm/include/llvm/CodeGen/TargetSubtargetInfo.h | 2 +-
llvm/lib/Target/ARM/ARMSubtarget.cpp | 2 +-
llvm/lib/Target/ARM/ARMSubtarget.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h b/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
index a94ebf55f6c1ef..76c94981e1afce 100644
--- a/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
+++ b/llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
@@ -324,7 +324,7 @@ class TargetSubtargetInfo : public MCSubtargetInfo {
/// written in the tablegen descriptions, false if it should allocate
/// the specified physical register later if is it callee-saved.
virtual bool ignoreCSRForAllocationOrder(const MachineFunction &MF,
- unsigned PhysReg) const {
+ MCRegister PhysReg) const {
return false;
}
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index 07207e29bf7d3a..893084785e6f05 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -478,7 +478,7 @@ unsigned ARMSubtarget::getGPRAllocationOrder(const MachineFunction &MF) const {
}
bool ARMSubtarget::ignoreCSRForAllocationOrder(const MachineFunction &MF,
- unsigned PhysReg) const {
+ MCRegister PhysReg) const {
// To minimize code size in Thumb2, we prefer the usage of low regs (lower
// cost per use) so we can use narrow encoding. By default, caller-saved
// registers (e.g. lr, r12) are always allocated first, regardless of
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h
index 611eeac9ef7128..7329d3f2055f0c 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.h
+++ b/llvm/lib/Target/ARM/ARMSubtarget.h
@@ -523,7 +523,7 @@ class ARMSubtarget : public ARMGenSubtargetInfo {
}
bool ignoreCSRForAllocationOrder(const MachineFunction &MF,
- unsigned PhysReg) const override;
+ MCRegister PhysReg) const override;
unsigned getGPRAllocationOrder(const MachineFunction &MF) const;
};
More information about the llvm-commits
mailing list