[llvm-commits] [llvm] r148462 - in /llvm/trunk: include/llvm/CodeGen/MachineInstrBundle.h lib/CodeGen/MachineInstrBundle.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jan 18 22:13:10 PST 2012
Author: evancheng
Date: Thu Jan 19 00:13:10 2012
New Revision: 148462
URL: http://llvm.org/viewvc/llvm-project?rev=148462&view=rev
Log:
Enhance finalizeBundle to return end of bundle iterator because it makes sense.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h
llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h?rev=148462&r1=148461&r2=148462&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBundle.h Thu Jan 19 00:13:10 2012
@@ -32,8 +32,9 @@
/// 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 finalizeBundle(MachineBasicBlock &MBB,
+/// with 'InsideBundle' marker. It returns the MBB instruction iterator that
+/// points to the end of the bundle.
+MachineBasicBlock::instr_iterator finalizeBundle(MachineBasicBlock &MBB,
MachineBasicBlock::instr_iterator FirstMI);
} // End llvm namespace
Modified: llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp?rev=148462&r1=148461&r2=148462&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstrBundle.cpp Thu Jan 19 00:13:10 2012
@@ -184,12 +184,15 @@
/// 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;
}
More information about the llvm-commits
mailing list