CodeGen: Take MachineInstr& in SlotIndexes and LiveIntervals, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 27 Feb 2016 06:40:41 +0000 (06:40 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 27 Feb 2016 06:40:41 +0000 (06:40 +0000)
commit3ac9cc615694361653d51148995f1fead69f9487
tree940feeaeb882518bc7728d0809085607793097c2
parent0bed1eab3937cc9c78baaef88ae85da9f3f91402
CodeGen: Take MachineInstr& in SlotIndexes and LiveIntervals, NFC

Take MachineInstr by reference instead of by pointer in SlotIndexes and
the SlotIndex wrappers in LiveIntervals.  The MachineInstrs here are
never null, so this cleans up the API a bit.  It also incidentally
removes a few implicit conversions from MachineInstrBundleIterator to
MachineInstr* (see PR26753).

At a couple of call sites it was convenient to convert to a range-based
for loop over MachineBasicBlock::instr_begin/instr_end, so I added
MachineBasicBlock::instrs.

llvm-svn: 262115
26 files changed:
llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h
llvm/include/llvm/CodeGen/MachineBasicBlock.h
llvm/include/llvm/CodeGen/SlotIndexes.h
llvm/lib/CodeGen/InlineSpiller.cpp
llvm/lib/CodeGen/LiveDebugVariables.cpp
llvm/lib/CodeGen/LiveInterval.cpp
llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
llvm/lib/CodeGen/LiveRangeCalc.cpp
llvm/lib/CodeGen/LiveRangeEdit.cpp
llvm/lib/CodeGen/MachineBasicBlock.cpp
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/lib/CodeGen/PHIElimination.cpp
llvm/lib/CodeGen/RegisterCoalescer.cpp
llvm/lib/CodeGen/RegisterPressure.cpp
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
llvm/lib/CodeGen/SlotIndexes.cpp
llvm/lib/CodeGen/SplitKit.cpp
llvm/lib/CodeGen/StackColoring.cpp
llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
llvm/lib/CodeGen/VirtRegMap.cpp
llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp
llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp
llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp