OSDN Git Service

[WebAssembly] Simplify iterator navigations (NFC)
authorHeejin Ahn <aheejin@gmail.com>
Tue, 5 Mar 2019 21:05:09 +0000 (21:05 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 5 Mar 2019 21:05:09 +0000 (21:05 +0000)
commit097c1aa11213eb57070615b2fecd36d28a5c76a4
tree36bf5634c9311265cd654e8ea76d9a4aee205b4c
parentf8d95d2d94caad18b749f54239c31cdbac3e87ed
[WebAssembly] Simplify iterator navigations (NFC)

Summary:
- Replaces some uses of `MachineFunction::iterator(MBB)` with
  `MBB->getIterator()` and `MachineBasicBlock::iterator(MI)` with
  `MI->getIterator()`, which are simpler.
- Replaces some uses of `std::prev` of `std::next` that takes a
  MachineFunction or MachineBasicBlock iterator with `getPrevNode` and
  `getNextNode`, which are also simpler.

Reviewers: sbc100

Subscribers: dschuff, sunfish, jgravelle-google, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58913

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355444 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp