diff options
-rw-r--r-- | include/llvm/CodeGen/MachineInstrBundle.h | 5 | ||||
-rw-r--r-- | lib/CodeGen/MachineInstrBundle.cpp | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineInstrBundle.h b/include/llvm/CodeGen/MachineInstrBundle.h index 8189507..2beddc1 100644 --- a/include/llvm/CodeGen/MachineInstrBundle.h +++ b/include/llvm/CodeGen/MachineInstrBundle.h @@ -32,8 +32,9 @@ void 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 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 diff --git a/lib/CodeGen/MachineInstrBundle.cpp b/lib/CodeGen/MachineInstrBundle.cpp index 7873fd0..23dc796 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; } |