summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-03-05 21:05:09 +0000
committerHeejin Ahn <aheejin@gmail.com>2019-03-05 21:05:09 +0000
commit5c644c9bcaacd3da1d9a0f220427033a94d456c8 (patch)
tree8b3a06fd48ce0ff4bcfbc09793e04ded81d726cc /llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
parentd15f3b188bf728e0e7bff64163e29dfbee030965 (diff)
downloadbcm5719-llvm-5c644c9bcaacd3da1d9a0f220427033a94d456c8.tar.gz
bcm5719-llvm-5c644c9bcaacd3da1d9a0f220427033a94d456c8.zip
[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 llvm-svn: 355444
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
index 8494737d43d..d1bb8a7097a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -274,7 +274,7 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) {
if (!MFI.isVRegStackified(OldReg)) {
const TargetRegisterClass *RC = MRI.getRegClass(OldReg);
unsigned NewReg = MRI.createVirtualRegister(RC);
- auto InsertPt = std::next(MachineBasicBlock::iterator(&MI));
+ auto InsertPt = std::next(MI.getIterator());
if (MI.getOpcode() == WebAssembly::IMPLICIT_DEF) {
MI.eraseFromParent();
Changed = true;
OpenPOWER on IntegriCloud