Skip to content

[CodeGen] Use MCRegister for ignoreCSRForAllocationOrder. #123685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/ARMSubtarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/ARMSubtarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
Loading