diff options
author | Matthias Braun <matze@braunis.de> | 2015-08-25 22:05:55 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2015-08-25 22:05:55 +0000 |
commit | 130bd90e1732950234d3afe4e36d54507491b9a4 (patch) | |
tree | acf5d023d13fb194bd00926fd62b2ece6c7a3bf0 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | cd5959139669bda01cf23ae398bfc17618128d3d (diff) | |
download | bcm5719-llvm-130bd90e1732950234d3afe4e36d54507491b9a4.tar.gz bcm5719-llvm-130bd90e1732950234d3afe4e36d54507491b9a4.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 9ff4858f0a4..c30b95a6b2d 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<unsigned>::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"); |