diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-03-05 21:05:09 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2019-03-05 21:05:09 +0000 |
commit | 5c644c9bcaacd3da1d9a0f220427033a94d456c8 (patch) | |
tree | 8b3a06fd48ce0ff4bcfbc09793e04ded81d726cc /llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | |
parent | d15f3b188bf728e0e7bff64163e29dfbee030965 (diff) | |
download | bcm5719-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/WebAssemblyISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp index 2ade6ab1c83..6c5a5ab9ea5 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -358,8 +358,7 @@ static MachineBasicBlock *LowerFPToInt(MachineInstr &MI, DebugLoc DL, F->insert(It, DoneMBB); // Transfer the remainder of BB and its successor edges to DoneMBB. - DoneMBB->splice(DoneMBB->begin(), BB, - std::next(MachineBasicBlock::iterator(MI)), BB->end()); + DoneMBB->splice(DoneMBB->begin(), BB, std::next(MI.getIterator()), BB->end()); DoneMBB->transferSuccessorsAndUpdatePHIs(BB); BB->addSuccessor(TrueMBB); |