CodeGen: MachineInstr::getIterator() => getInstrIterator(), NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 21 Feb 2016 22:58:35 +0000 (22:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 21 Feb 2016 22:58:35 +0000 (22:58 +0000)
commitdc0848c0293d798fecd4d02273cf98e84dc95866
treedc64f6a8e3754c45b452e5972576f429d84dd23d
parente1fd99c197ede469c25d2c25e24397130a0a48f3
CodeGen: MachineInstr::getIterator() => getInstrIterator(), NFC

Delete MachineInstr::getIterator(), since the term "iterator" is
overloaded when talking about MachineInstr.

- Downcast to ilist_node in iplist::getNextNode() and getPrevNode() so
  that ilist_node::getIterator() is still available.
- Add it back as MachineInstr::getInstrIterator().  This matches the
  naming in MachineBasicBlock.
- Add MachineInstr::getBundleIterator().  This is explicitly called
  "bundle" (not matching MachineBasicBlock) to disintinguish it clearly
  from ilist_node::getIterator().
- Update all calls.  Some of these I switched to `auto` to remove
  boiler-plate, since the new name is clear about the type.

There was one call I updated that looked fishy, but it wasn't clear what
the right answer was.  This was in X86FrameLowering::inlineStackProbe(),
added in r252578 in lib/Target/X86/X86FrameLowering.cpp.  I opted to
leave the behaviour unchanged, but I'll reply to the original commit on
the list in a moment.

llvm-svn: 261504
21 files changed:
llvm/include/llvm/ADT/ilist.h
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/include/llvm/CodeGen/MachineInstrBuilder.h
llvm/include/llvm/CodeGen/MachineInstrBundle.h
llvm/lib/CodeGen/DFAPacketizer.cpp
llvm/lib/CodeGen/MachineCopyPropagation.cpp
llvm/lib/CodeGen/MachineInstr.cpp
llvm/lib/CodeGen/ProcessImplicitDefs.cpp
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp
llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
llvm/lib/Target/Mips/MipsAsmPrinter.cpp
llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
llvm/lib/Target/X86/X86FrameLowering.cpp