diff options
author | Matthias Braun <matze@braunis.de> | 2016-05-03 00:24:32 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-05-03 00:24:32 +0000 |
commit | d1aabb28134a7e72ce4d6ac26b093648f5c57e88 (patch) | |
tree | 2442763e87b35507f5fc54eb68af0e6ff1d6a223 /llvm/lib/CodeGen/LivePhysRegs.cpp | |
parent | a4e71bd11a8cbec276460bb3db47283fc3b05428 (diff) | |
download | bcm5719-llvm-d1aabb28134a7e72ce4d6ac26b093648f5c57e88.tar.gz bcm5719-llvm-d1aabb28134a7e72ce4d6ac26b093648f5c57e88.zip |
livePhysRegs: Pass MBB by reference in addLive{Ins|Outs}(); NFC
The block must no be nullptr for the addLiveIns()/addLiveOuts()
function.
llvm-svn: 268340
Diffstat (limited to 'llvm/lib/CodeGen/LivePhysRegs.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LivePhysRegs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp index 4945b3d216c..eb2955045fd 100644 --- a/llvm/lib/CodeGen/LivePhysRegs.cpp +++ b/llvm/lib/CodeGen/LivePhysRegs.cpp @@ -143,18 +143,18 @@ static void addPristines(LivePhysRegs &LiveRegs, const MachineFunction &MF, LiveRegs.removeReg(Info.getReg()); } -void LivePhysRegs::addLiveOutsNoPristines(const MachineBasicBlock *MBB) { +void LivePhysRegs::addLiveOutsNoPristines(const MachineBasicBlock &MBB) { // To get the live-outs we simply merge the live-ins of all successors. - for (const MachineBasicBlock *Succ : MBB->successors()) + for (const MachineBasicBlock *Succ : MBB.successors()) ::addLiveIns(*this, *Succ); } -void LivePhysRegs::addLiveOuts(const MachineBasicBlock *MBB) { - const MachineFunction &MF = *MBB->getParent(); +void LivePhysRegs::addLiveOuts(const MachineBasicBlock &MBB) { + const MachineFunction &MF = *MBB.getParent(); const MachineFrameInfo &MFI = *MF.getFrameInfo(); if (MFI.isCalleeSavedInfoValid()) { addPristines(*this, MF, MFI, *TRI); - if (MBB->isReturnBlock()) { + if (MBB.isReturnBlock()) { // The return block has no successors whose live-ins we could merge // below. So instead we add the callee saved registers manually. for (const MCPhysReg *I = TRI->getCalleeSavedRegs(&MF); *I; ++I) @@ -165,10 +165,10 @@ void LivePhysRegs::addLiveOuts(const MachineBasicBlock *MBB) { addLiveOutsNoPristines(MBB); } -void LivePhysRegs::addLiveIns(const MachineBasicBlock *MBB) { - const MachineFunction &MF = *MBB->getParent(); +void LivePhysRegs::addLiveIns(const MachineBasicBlock &MBB) { + const MachineFunction &MF = *MBB.getParent(); const MachineFrameInfo &MFI = *MF.getFrameInfo(); if (MFI.isCalleeSavedInfoValid()) addPristines(*this, MF, MFI, *TRI); - ::addLiveIns(*this, *MBB); + ::addLiveIns(*this, MBB); } |