diff options
author | Matthias Braun <matze@braunis.de> | 2016-04-06 02:47:09 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-04-06 02:47:09 +0000 |
commit | 7dc03f060e1110cda920ea00044d35265fb10673 (patch) | |
tree | 2c2dd359b30959dd7ce6ce5ed819ac1f080f68ba /llvm/lib/Target | |
parent | 61da4cef6c5c6bcafc5b844d21cf3515ae6d976a (diff) | |
download | bcm5719-llvm-7dc03f060e1110cda920ea00044d35265fb10673.tar.gz bcm5719-llvm-7dc03f060e1110cda920ea00044d35265fb10673.zip |
RegisterScavenger: Take a reference as enterBasicBlock() argument.
Make it obvious that the argument cannot be nullptr.
Remove an unnecessary nullptr check in initRegState.
llvm-svn: 265511
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/Mips16InstrInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp index d7088743bcd..01f354d19e8 100644 --- a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp +++ b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp @@ -497,7 +497,7 @@ bool AArch64A57FPLoadBalancing::colorChainSet(std::vector<Chain*> GV, int AArch64A57FPLoadBalancing::scavengeRegister(Chain *G, Color C, MachineBasicBlock &MBB) { RegScavenger RS; - RS.enterBasicBlock(&MBB); + RS.enterBasicBlock(MBB); RS.forward(MachineBasicBlock::iterator(G->getStart())); // Can we find an appropriate register that is available throughout the life diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp index 4b1b15f868a..ed51b3bad1c 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -744,7 +744,7 @@ unsigned SIInstrInfo::calculateLDSSpillAddress(MachineBasicBlock &MBB, Entry.addLiveIn(Reg); } - RS->enterBasicBlock(&Entry); + RS->enterBasicBlock(Entry); // FIXME: Can we scavenge an SReg_64 and access the subregs? unsigned STmp0 = RS->scavengeRegister(&AMDGPU::SGPR_32RegClass, 0); unsigned STmp1 = RS->scavengeRegister(&AMDGPU::SGPR_32RegClass, 0); diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp index da8ada4e539..c439a5fe9f5 100644 --- a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp +++ b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp @@ -326,7 +326,7 @@ unsigned Mips16InstrInfo::loadImmediate(unsigned FrameReg, int64_t Imm, int Reg =0; int SpReg = 0; - rs.enterBasicBlock(&MBB); + rs.enterBasicBlock(MBB); rs.forward(II); // // We need to know which registers can be used, in the case where there diff --git a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp index 1d592286f43..aadf64d0bbe 100644 --- a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp @@ -596,7 +596,7 @@ PPCFrameLowering::findScratchRegister(MachineBasicBlock *MBB, (!UseAtEnd && (&MBB->getParent()->front() == MBB))) return true; - RS.enterBasicBlock(MBB); + RS.enterBasicBlock(*MBB); if (UseAtEnd && !MBB->empty()) { // The scratch register will be used at the end of the block, so must diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp index 538011ea25c..5d720869be9 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp @@ -867,7 +867,7 @@ void WasmPEI::replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn, unsigned FrameSetupOpcode = TII.getCallFrameSetupOpcode(); unsigned FrameDestroyOpcode = TII.getCallFrameDestroyOpcode(); - if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(BB); + if (RS && !FrameIndexVirtualScavenging) RS->enterBasicBlock(*BB); bool InsideCallSequence = false; @@ -977,7 +977,7 @@ WasmPEI::scavengeFrameVirtualRegs(MachineFunction &Fn) { // Run through the instructions and find any virtual registers. for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB) { - RS->enterBasicBlock(&*BB); + RS->enterBasicBlock(*BB); int SPAdj = 0; |