diff options
author | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-31 16:51:28 +0000 |
---|---|---|
committer | Djordje Todorovic <djordje.todorovic@rt-rk.com> | 2019-07-31 16:51:28 +0000 |
commit | b9973f87c6e23062a8a921e8617d4625c355338d (patch) | |
tree | 18934ca9399cc9422cca62deb6224ebd5d46f845 /llvm/lib/CodeGen/TargetRegisterInfo.cpp | |
parent | f7ef70501cc12d67108694bd76e691aab9592559 (diff) | |
download | bcm5719-llvm-b9973f87c6e23062a8a921e8617d4625c355338d.tar.gz bcm5719-llvm-b9973f87c6e23062a8a921e8617d4625c355338d.zip |
Reland "[DwarfDebug] Dump call site debug info"
The build failure found after the rL365467 has been
resolved.
Differential Revision: https://reviews.llvm.org/D60716
llvm-svn: 367446
Diffstat (limited to 'llvm/lib/CodeGen/TargetRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetRegisterInfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetRegisterInfo.cpp b/llvm/lib/CodeGen/TargetRegisterInfo.cpp index f1b2ecf3243..f081b02df56 100644 --- a/llvm/lib/CodeGen/TargetRegisterInfo.cpp +++ b/llvm/lib/CodeGen/TargetRegisterInfo.cpp @@ -433,6 +433,19 @@ TargetRegisterInfo::getRegAllocationHints(unsigned VirtReg, return false; } +bool TargetRegisterInfo::isCalleeSavedPhysReg( + unsigned PhysReg, const MachineFunction &MF) const { + if (PhysReg == 0) + return false; + const uint32_t *callerPreservedRegs = + getCallPreservedMask(MF, MF.getFunction().getCallingConv()); + if (callerPreservedRegs) { + assert(isPhysicalRegister(PhysReg) && "Expected physical register"); + return (callerPreservedRegs[PhysReg / 32] >> PhysReg % 32) & 1; + } + return false; +} + bool TargetRegisterInfo::canRealignStack(const MachineFunction &MF) const { return !MF.getFunction().hasFnAttribute("no-realign-stack"); } |