aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstrBundle.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-01-19 06:13:10 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-01-19 06:13:10 +0000
commit6ca22721839a1c5447d607b1007fcd524f79e9d4 (patch)
treec748d988fb8fbb8ac29255bc4d117d7f35c137cd /llvm/lib/CodeGen/MachineInstrBundle.cpp
parentbdf3a01bb0d2f612acb2383a91c26142e18e5490 (diff)
downloadllvm-6ca22721839a1c5447d607b1007fcd524f79e9d4.zip
llvm-6ca22721839a1c5447d607b1007fcd524f79e9d4.tar.gz
llvm-6ca22721839a1c5447d607b1007fcd524f79e9d4.tar.bz2
Enhance finalizeBundle to return end of bundle iterator because it makes sense.
llvm-svn: 148462
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstrBundle.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstrBundle.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp
index 7873fd0..23dc796 100644
--- a/llvm/lib/CodeGen/MachineInstrBundle.cpp
+++ b/llvm/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;
}