diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-01-19 06:13:10 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-01-19 06:13:10 +0000 |
commit | a2e435cd23427eef7d8e86c72bb94c756e60e473 (patch) | |
tree | 233c30cae162ea7fa4305e63816d96948c64057d /lib/CodeGen/MachineInstrBundle.cpp | |
parent | ae69f703d59410fc96f04be3c1afeaa1c17a45ce (diff) |
Enhance finalizeBundle to return end of bundle iterator because it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstrBundle.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstrBundle.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineInstrBundle.cpp b/lib/CodeGen/MachineInstrBundle.cpp index 7873fd0bdf..23dc796b33 100644 --- a/lib/CodeGen/MachineInstrBundle.cpp +++ b/lib/CodeGen/MachineInstrBundle.cpp @@ -184,12 +184,15 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB, /// finalizeBundle - Same functionality as the previous finalizeBundle except /// the last instruction in the bundle is not provided as an input. This is /// used in cases where bundles are pre-determined by marking instructions -/// with 'InsideBundle' marker. -void llvm::finalizeBundle(MachineBasicBlock &MBB, - MachineBasicBlock::instr_iterator FirstMI) { +/// with 'InsideBundle' marker. It returns the MBB instruction iterator that +/// points to the end of the bundle. +MachineBasicBlock::instr_iterator +llvm::finalizeBundle(MachineBasicBlock &MBB, + MachineBasicBlock::instr_iterator FirstMI) { MachineBasicBlock::instr_iterator E = MBB.instr_end(); MachineBasicBlock::instr_iterator LastMI = llvm::next(FirstMI); while (LastMI != E && LastMI->isInsideBundle()) ++LastMI; finalizeBundle(MBB, FirstMI, LastMI); + return LastMI; } |