mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 19:55:11 +00:00
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
This commit is contained in:
parent
ae69f703d5
commit
a2e435cd23
@ -32,8 +32,9 @@ void finalizeBundle(MachineBasicBlock &MBB,
|
|||||||
/// finalizeBundle - Same functionality as the previous finalizeBundle except
|
/// finalizeBundle - Same functionality as the previous finalizeBundle except
|
||||||
/// the last instruction in the bundle is not provided as an input. This is
|
/// 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
|
/// used in cases where bundles are pre-determined by marking instructions
|
||||||
/// with 'InsideBundle' marker.
|
/// with 'InsideBundle' marker. It returns the MBB instruction iterator that
|
||||||
void finalizeBundle(MachineBasicBlock &MBB,
|
/// points to the end of the bundle.
|
||||||
|
MachineBasicBlock::instr_iterator finalizeBundle(MachineBasicBlock &MBB,
|
||||||
MachineBasicBlock::instr_iterator FirstMI);
|
MachineBasicBlock::instr_iterator FirstMI);
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -184,12 +184,15 @@ void llvm::finalizeBundle(MachineBasicBlock &MBB,
|
|||||||
/// finalizeBundle - Same functionality as the previous finalizeBundle except
|
/// finalizeBundle - Same functionality as the previous finalizeBundle except
|
||||||
/// the last instruction in the bundle is not provided as an input. This is
|
/// 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
|
/// used in cases where bundles are pre-determined by marking instructions
|
||||||
/// with 'InsideBundle' marker.
|
/// with 'InsideBundle' marker. It returns the MBB instruction iterator that
|
||||||
void llvm::finalizeBundle(MachineBasicBlock &MBB,
|
/// points to the end of the bundle.
|
||||||
MachineBasicBlock::instr_iterator FirstMI) {
|
MachineBasicBlock::instr_iterator
|
||||||
|
llvm::finalizeBundle(MachineBasicBlock &MBB,
|
||||||
|
MachineBasicBlock::instr_iterator FirstMI) {
|
||||||
MachineBasicBlock::instr_iterator E = MBB.instr_end();
|
MachineBasicBlock::instr_iterator E = MBB.instr_end();
|
||||||
MachineBasicBlock::instr_iterator LastMI = llvm::next(FirstMI);
|
MachineBasicBlock::instr_iterator LastMI = llvm::next(FirstMI);
|
||||||
while (LastMI != E && LastMI->isInsideBundle())
|
while (LastMI != E && LastMI->isInsideBundle())
|
||||||
++LastMI;
|
++LastMI;
|
||||||
finalizeBundle(MBB, FirstMI, LastMI);
|
finalizeBundle(MBB, FirstMI, LastMI);
|
||||||
|
return LastMI;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user