summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-07-28 18:40:00 +0000
committerMatthias Braun <matze@braunis.de>2016-07-28 18:40:00 +0000
commit941a705b7bf155fc581632ec7d80f22a139bdac0 (patch)
treecd87202aa17c3e46adca731ccbf7b73ec1b92d81 /llvm/lib/CodeGen/VirtRegMap.cpp
parent51524b755616c9562a00371b1539784320c0b504 (diff)
downloadbcm5719-llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.tar.gz
bcm5719-llvm-941a705b7bf155fc581632ec7d80f22a139bdac0.zip
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/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 8a3a0328870..ddbb72bf9d8 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -73,8 +73,8 @@ void VirtRegMap::grow() {
}
unsigned VirtRegMap::createSpillSlot(const TargetRegisterClass *RC) {
- int SS = MF->getFrameInfo()->CreateSpillStackObject(RC->getSize(),
- RC->getAlignment());
+ int SS = MF->getFrameInfo().CreateSpillStackObject(RC->getSize(),
+ RC->getAlignment());
++NumSpillSlots;
return SS;
}
@@ -110,7 +110,7 @@ void VirtRegMap::assignVirt2StackSlot(unsigned virtReg, int SS) {
assert(Virt2StackSlotMap[virtReg] == NO_STACK_SLOT &&
"attempt to assign stack slot to already spilled register");
assert((SS >= 0 ||
- (SS >= MF->getFrameInfo()->getObjectIndexBegin())) &&
+ (SS >= MF->getFrameInfo().getObjectIndexBegin())) &&
"illegal fixed frame index");
Virt2StackSlotMap[virtReg] = SS;
}
OpenPOWER on IntegriCloud