summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackSlotColoring.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-27 20:14:29 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-27 20:14:29 +0000
commitbe8f8c4478dee41e124650fa9d166eaf5dc6b2be (patch)
treeb53b248f768f9dbaf37d7824b865b9cffd394d5f /llvm/lib/CodeGen/StackSlotColoring.cpp
parentfd8cc23220d25dfe6956470da8bd63d26649c428 (diff)
downloadbcm5719-llvm-be8f8c4478dee41e124650fa9d166eaf5dc6b2be.tar.gz
bcm5719-llvm-be8f8c4478dee41e124650fa9d166eaf5dc6b2be.zip
CodeGen: Update LiveIntervalAnalysis API to use MachineInstr&, NFC
These parameters aren't expected to be null, so take them by reference. llvm-svn: 262151
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
-rw-r--r--llvm/lib/CodeGen/StackSlotColoring.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp
index 51f4d0e6817..0ba90f343d6 100644
--- a/llvm/lib/CodeGen/StackSlotColoring.cpp
+++ b/llvm/lib/CodeGen/StackSlotColoring.cpp
@@ -145,9 +145,9 @@ void StackSlotColoring::ScanForSpillSlotRefs(MachineFunction &MF) {
MachineBasicBlock *MBB = &*MBBI;
for (MachineBasicBlock::iterator MII = MBB->begin(), EE = MBB->end();
MII != EE; ++MII) {
- MachineInstr *MI = &*MII;
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = MI->getOperand(i);
+ MachineInstr &MI = *MII;
+ for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = MI.getOperand(i);
if (!MO.isFI())
continue;
int FI = MO.getIndex();
@@ -156,11 +156,12 @@ void StackSlotColoring::ScanForSpillSlotRefs(MachineFunction &MF) {
if (!LS->hasInterval(FI))
continue;
LiveInterval &li = LS->getInterval(FI);
- if (!MI->isDebugValue())
+ if (!MI.isDebugValue())
li.weight += LiveIntervals::getSpillWeight(false, true, MBFI, MI);
}
- for (MachineInstr::mmo_iterator MMOI = MI->memoperands_begin(),
- EE = MI->memoperands_end(); MMOI != EE; ++MMOI) {
+ for (MachineInstr::mmo_iterator MMOI = MI.memoperands_begin(),
+ EE = MI.memoperands_end();
+ MMOI != EE; ++MMOI) {
MachineMemOperand *MMO = *MMOI;
if (const FixedStackPseudoSourceValue *FSV =
dyn_cast_or_null<FixedStackPseudoSourceValue>(
OpenPOWER on IntegriCloud