[all-commits] [llvm/llvm-project] 84efad: [RISCV][MRI] Account for fixed registers when dete...
Michael Maitland via All-commits
all-commits at lists.llvm.org
Fri Dec 6 11:07:49 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 84efad0b471543003c0724c85f158f66fccfdc0f
https://github.com/llvm/llvm-project/commit/84efad0b471543003c0724c85f158f66fccfdc0f
Author: Michael Maitland <michaeltmaitland at gmail.com>
Date: 2024-12-06 (Fri, 06 Dec 2024)
Changed paths:
M llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
M llvm/lib/CodeGen/MachineRegisterInfo.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
M llvm/lib/Target/RISCV/RISCVSubtarget.h
A llvm/test/CodeGen/RISCV/fixed-csr.ll
Log Message:
-----------
[RISCV][MRI] Account for fixed registers when determining callee saved regs (#115756)
This fixes
https://discourse.llvm.org/t/fixed-register-being-spill-and-restored-in-clang/83058.
We need to do it in `MachineRegisterInfo::getCalleeSavedRegs` instead of
`RISCVRegisterInfo::getCalleeSavedRegs` since the MF argument of
`TargetRegisterInfo:::getCalleeSavedRegs` is `const`, so we can't call
`MF->getRegInfo().disableCalleeSavedRegister` there.
So to put it in `MachineRegisterInfo::getCalleeSavedRegs`, we move
`isRegisterReservedByUser` into `TargetSubtargetInfo`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list