[llvm] r192634 - LiveRegUnits: Use *MBB for consistency and convenience.
Andrew Trick
atrick at apple.com
Mon Oct 14 15:19:00 PDT 2013
Author: atrick
Date: Mon Oct 14 17:18:59 2013
New Revision: 192634
URL: http://llvm.org/viewvc/llvm-project?rev=192634&view=rev
Log:
LiveRegUnits: Use *MBB for consistency and convenience.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveRegUnits.h
llvm/trunk/lib/CodeGen/IfConversion.cpp
llvm/trunk/lib/CodeGen/LiveRegUnits.cpp
Modified: llvm/trunk/include/llvm/CodeGen/LiveRegUnits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveRegUnits.h?rev=192634&r1=192633&r2=192634&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveRegUnits.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveRegUnits.h Mon Oct 14 17:18:59 2013
@@ -80,7 +80,7 @@ public:
void stepForward(const MachineInstr &MI, const MCRegisterInfo &MCRI);
/// \brief Adds all registers in the live-in list of block @p BB.
- void addLiveIns(const MachineBasicBlock &BB, const MCRegisterInfo &MCRI);
+ void addLiveIns(const MachineBasicBlock *MBB, const MCRegisterInfo &MCRI);
};
} // namespace llvm
Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=192634&r1=192633&r2=192634&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Mon Oct 14 17:18:59 2013
@@ -1049,13 +1049,13 @@ bool IfConverter::IfConvertSimple(BBInfo
// Initialize liveins to the first BB. These are potentiall redefined by
// predicated instructions.
Redefs.init(TRI);
- Redefs.addLiveIns(*(CvtBBI->BB), *TRI);
- Redefs.addLiveIns(*(NextBBI->BB), *TRI);
+ Redefs.addLiveIns(CvtBBI->BB, *TRI);
+ Redefs.addLiveIns(NextBBI->BB, *TRI);
// Compute a set of registers which must not be killed by instructions in
// BB1: This is everything live-in to BB2.
DontKill.init(TRI);
- DontKill.addLiveIns(*(NextBBI->BB), *TRI);
+ DontKill.addLiveIns(NextBBI->BB, *TRI);
if (CvtBBI->BB->pred_size() > 1) {
BBI.NonPredSize -= TII->RemoveBranch(*BBI.BB);
@@ -1154,8 +1154,8 @@ bool IfConverter::IfConvertTriangle(BBIn
// Initialize liveins to the first BB. These are potentially redefined by
// predicated instructions.
Redefs.init(TRI);
- Redefs.addLiveIns(*(CvtBBI->BB), *TRI);
- Redefs.addLiveIns(*(NextBBI->BB), *TRI);
+ Redefs.addLiveIns(CvtBBI->BB, *TRI);
+ Redefs.addLiveIns(NextBBI->BB, *TRI);
DontKill.clear();
@@ -1284,7 +1284,7 @@ bool IfConverter::IfConvertDiamond(BBInf
// Initialize liveins to the first BB. These are potentially redefined by
// predicated instructions.
Redefs.init(TRI);
- Redefs.addLiveIns(*(BBI1->BB), *TRI);
+ Redefs.addLiveIns(BBI1->BB, *TRI);
// Remove the duplicated instructions at the beginnings of both paths.
MachineBasicBlock::iterator DI1 = BBI1->BB->begin();
Modified: llvm/trunk/lib/CodeGen/LiveRegUnits.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveRegUnits.cpp?rev=192634&r1=192633&r2=192634&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveRegUnits.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveRegUnits.cpp Mon Oct 14 17:18:59 2013
@@ -102,10 +102,10 @@ void LiveRegUnits::stepForward(const Mac
}
/// Adds all registers in the live-in list of block @p BB.
-void LiveRegUnits::addLiveIns(const MachineBasicBlock &BB,
+void LiveRegUnits::addLiveIns(const MachineBasicBlock *MBB,
const MCRegisterInfo &MCRI) {
- for (MachineBasicBlock::livein_iterator L = BB.livein_begin(),
- LE = BB.livein_end(); L != LE; ++L) {
+ for (MachineBasicBlock::livein_iterator L = MBB->livein_begin(),
+ LE = MBB->livein_end(); L != LE; ++L) {
addReg(*L, MCRI);
}
}
More information about the llvm-commits
mailing list