diff options
author | Matthias Braun <matze@braunis.de> | 2016-12-08 00:15:51 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-12-08 00:15:51 +0000 |
commit | 0c989a893b0e65a7fac91982b1c05426c55ed14b (patch) | |
tree | e7cc6a3ffedbbb17623ce793d3a1689fdad51194 /llvm/lib | |
parent | ae3168da3f9130365f1372b6c23582adbf72aa2c (diff) | |
download | bcm5719-llvm-0c989a893b0e65a7fac91982b1c05426c55ed14b.tar.gz bcm5719-llvm-0c989a893b0e65a7fac91982b1c05426c55ed14b.zip |
LivePhysReg: Use reference instead of pointer in init(); NFC
llvm-svn: 289002
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/IfConversion.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZShortenInst.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86FixupBWInsts.cpp | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index 20c36a923df..20dc8805150 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -353,7 +353,7 @@ void BranchFolder::computeLiveIns(MachineBasicBlock &MBB) { if (!UpdateLiveIns) return; - LiveRegs.init(TRI); + LiveRegs.init(*TRI); LiveRegs.addLiveOutsNoPristines(MBB); for (MachineInstr &MI : make_range(MBB.rbegin(), MBB.rend())) LiveRegs.stepBackward(MI); diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index 54164c94395..e7c6b03f1a4 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -612,7 +612,7 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) { return; // Collect this block's live out register units. - LiveRegSet.init(TRI); + LiveRegSet.init(*TRI); // We do not need to care about pristine registers as they are just preserved // but not actually used in the function. LiveRegSet.addLiveOutsNoPristines(*MBB); diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index e81af66c3b3..56a25e0331d 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/lib/CodeGen/IfConversion.cpp @@ -1517,13 +1517,13 @@ bool IfConverter::IfConvertSimple(BBInfo &BBI, IfcvtKind Kind) { // Initialize liveins to the first BB. These are potentiall redefined by // predicated instructions. - Redefs.init(TRI); + Redefs.init(*TRI); Redefs.addLiveIns(CvtMBB); Redefs.addLiveIns(NextMBB); // 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.init(*TRI); DontKill.addLiveIns(NextMBB); if (CvtMBB.pred_size() > 1) { @@ -1621,7 +1621,7 @@ bool IfConverter::IfConvertTriangle(BBInfo &BBI, IfcvtKind Kind) { // Initialize liveins to the first BB. These are potentially redefined by // predicated instructions. - Redefs.init(TRI); + Redefs.init(*TRI); Redefs.addLiveIns(CvtMBB); Redefs.addLiveIns(NextMBB); @@ -1785,7 +1785,7 @@ bool IfConverter::IfConvertDiamondCommon( // - BB1 live-out regs need implicit uses before being redefined by BB2 // instructions. We start with BB1 live-ins so we have the live-out regs // after tracking the BB1 instructions. - Redefs.init(TRI); + Redefs.init(*TRI); Redefs.addLiveIns(MBB1); Redefs.addLiveIns(MBB2); @@ -1811,7 +1811,7 @@ bool IfConverter::IfConvertDiamondCommon( // Compute a set of registers which must not be killed by instructions in BB1: // This is everything used+live in BB2 after the duplicated instructions. We // can compute this set by simulating liveness backwards from the end of BB2. - DontKill.init(TRI); + DontKill.init(*TRI); for (const MachineInstr &MI : make_range(MBB2.rbegin(), ++DI2.getReverse())) DontKill.stepBackward(MI); diff --git a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp index 546e63247d0..a5ef7c8229f 100644 --- a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp +++ b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp @@ -125,7 +125,7 @@ bool StackMapLiveness::calculateLiveness(MachineFunction &MF) { // For all basic blocks in the function. for (auto &MBB : MF) { DEBUG(dbgs() << "****** BB " << MBB.getName() << " ******\n"); - LiveRegs.init(TRI); + LiveRegs.init(*TRI); // FIXME: This should probably be addLiveOuts(). LiveRegs.addLiveOutsNoPristines(MBB); bool HasStackMap = false; diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index f638b94a2a9..48ab491b5be 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -560,7 +560,7 @@ void ARMLoadStoreOpt::moveLiveRegsBefore(const MachineBasicBlock &MBB, MachineBasicBlock::const_iterator Before) { // Initialize if we never queried in this block. if (!LiveRegsValid) { - LiveRegs.init(TRI); + LiveRegs.init(*TRI); LiveRegs.addLiveOuts(MBB); LiveRegPos = MBB.end(); LiveRegsValid = true; diff --git a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp index 43f01b0b68a..83882fc0310 100644 --- a/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp +++ b/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp @@ -275,7 +275,7 @@ bool SystemZShortenInst::runOnMachineFunction(MachineFunction &F) { const SystemZSubtarget &ST = F.getSubtarget<SystemZSubtarget>(); TII = ST.getInstrInfo(); TRI = ST.getRegisterInfo(); - LiveRegs.init(TRI); + LiveRegs.init(*TRI); bool Changed = false; for (auto &MBB : F) diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp index 345181cca74..8bde4bf98d6 100644 --- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp +++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp @@ -154,7 +154,7 @@ bool FixupBWInstPass::runOnMachineFunction(MachineFunction &MF) { TII = MF.getSubtarget<X86Subtarget>().getInstrInfo(); OptForSize = MF.getFunction()->optForSize(); MLI = &getAnalysis<MachineLoopInfo>(); - LiveRegs.init(&TII->getRegisterInfo()); + LiveRegs.init(TII->getRegisterInfo()); DEBUG(dbgs() << "Start X86FixupBWInsts\n";); |