diff options
author | Matthias Braun <matze@braunis.de> | 2016-07-28 18:40:00 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-07-28 18:40:00 +0000 |
commit | 941a705b7bf155fc581632ec7d80f22a139bdac0 (patch) | |
tree | cd87202aa17c3e46adca731ccbf7b73ec1b92d81 /llvm/lib/CodeGen/RegisterScavenging.cpp | |
parent | 51524b755616c9562a00371b1539784320c0b504 (diff) | |
download | llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.zip llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.tar.gz llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.tar.bz2 |
MachineFunction: Return reference for getFrameInfo(); NFC
getFrameInfo() never returns nullptr so we should use a reference
instead of a pointer.
llvm-svn: 277017
Diffstat (limited to 'llvm/lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterScavenging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp index 79a698d..953e535 100644 --- a/llvm/lib/CodeGen/RegisterScavenging.cpp +++ b/llvm/lib/CodeGen/RegisterScavenging.cpp @@ -73,7 +73,7 @@ void RegScavenger::init(MachineBasicBlock &MBB) { RegUnitsAvailable.set(); // Pristine CSRs are not available. - BitVector PR = MF.getFrameInfo()->getPristineRegs(MF); + BitVector PR = MF.getFrameInfo().getPristineRegs(MF); for (int I = PR.find_first(); I>0; I = PR.find_next(I)) setRegUsed(I); @@ -441,7 +441,7 @@ unsigned RegScavenger::scavengeRegister(const TargetRegisterClass *RC, // Find an available scavenging slot with size and alignment matching // the requirements of the class RC. - const MachineFrameInfo &MFI = *MF.getFrameInfo(); + const MachineFrameInfo &MFI = MF.getFrameInfo(); unsigned NeedSize = RC->getSize(); unsigned NeedAlign = RC->getAlignment(); |