From: Kazu Hirata Date: Fri, 8 Jan 2021 04:29:32 +0000 (-0800) Subject: [CodeGen] Remove unused function isCallerPreservedOrConstPhysReg (NFC) X-Git-Tag: llvmorg-13-init~1757 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8febb2e0f56107b3256999c9e1520fdc51fcd1b4;p=platform%2Fupstream%2Fllvm.git [CodeGen] Remove unused function isCallerPreservedOrConstPhysReg (NFC) The last use of the function was removed on Oct 20, 2018 in commit 8d6ff4c0af843e1a61b76d89812aed91e358de34. --- diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h index a4da62d..a1a6705 100644 --- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h @@ -625,10 +625,6 @@ public: /// function. Writing to a constant register has no effect. bool isConstantPhysReg(MCRegister PhysReg) const; - /// Returns true if either isConstantPhysReg or TRI->isCallerPreservedPhysReg - /// returns true. This is a utility member function. - bool isCallerPreservedOrConstPhysReg(MCRegister PhysReg) const; - /// Get an iterator over the pressure sets affected by the given physical or /// virtual register. If RegUnit is physical, it must be a register unit (from /// MCRegUnitIterator). diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp index f5793c6..9165d6d 100644 --- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp +++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp @@ -532,13 +532,6 @@ bool MachineRegisterInfo::isConstantPhysReg(MCRegister PhysReg) const { return true; } -bool -MachineRegisterInfo::isCallerPreservedOrConstPhysReg(MCRegister PhysReg) const { - const TargetRegisterInfo *TRI = getTargetRegisterInfo(); - return isConstantPhysReg(PhysReg) || - TRI->isCallerPreservedPhysReg(PhysReg, *MF); -} - /// markUsesInDebugValueAsUndef - Mark every DBG_VALUE referencing the /// specified register as undefined which causes the DBG_VALUE to be /// deleted during LiveDebugVariables analysis.