From 130bd90e1732950234d3afe4e36d54507491b9a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 25 Aug 2015 22:05:55 +0000 Subject: MachineBasicBlock: Use MCPhysReg instead of unsigned in livein API This is friendlier to the readers as it makes it clear that the API is not meant for vregs but just for physregs. llvm-svn: 245977 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 9ff4858f0a4e..c30b95a6b2d6 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -322,20 +322,19 @@ void MachineBasicBlock::printAsOperand(raw_ostream &OS, OS << "BB#" << getNumber(); } -void MachineBasicBlock::removeLiveIn(unsigned Reg) { - std::vector::iterator I - = std::find(LiveIns.begin(), LiveIns.end(), Reg); +void MachineBasicBlock::removeLiveIn(MCPhysReg Reg) { + LiveInVector::iterator I = std::find(LiveIns.begin(), LiveIns.end(), Reg); if (I != LiveIns.end()) LiveIns.erase(I); } -bool MachineBasicBlock::isLiveIn(unsigned Reg) const { +bool MachineBasicBlock::isLiveIn(MCPhysReg Reg) const { livein_iterator I = std::find(livein_begin(), livein_end(), Reg); return I != livein_end(); } unsigned -MachineBasicBlock::addLiveIn(unsigned PhysReg, const TargetRegisterClass *RC) { +MachineBasicBlock::addLiveIn(MCPhysReg PhysReg, const TargetRegisterClass *RC) { assert(getParent() && "MBB must be inserted in function"); assert(TargetRegisterInfo::isPhysicalRegister(PhysReg) && "Expected physreg"); assert(RC && "Register class is required"); -- cgit v1.2.3