Example #1
0
MachineBasicBlock::iterator
MachineBasicBlock::erase(MachineBasicBlock::iterator I) {
  if (I->isBundle()) {
    MachineBasicBlock::iterator E = llvm::next(I);
    return Insts.erase(I.getInstrIterator(), E.getInstrIterator());
  }

  return Insts.erase(I.getInstrIterator());
}
Example #2
0
void MachineBasicBlock::splice(MachineBasicBlock::iterator where,
                               MachineBasicBlock *Other,
                               MachineBasicBlock::iterator From) {
  if (From->isBundle()) {
    MachineBasicBlock::iterator To = llvm::next(From);
    Insts.splice(where.getInstrIterator(), Other->Insts,
                 From.getInstrIterator(), To.getInstrIterator());
    return;
  }

  Insts.splice(where.getInstrIterator(), Other->Insts, From.getInstrIterator());
}
Example #3
0
// End the current packet, bundle packet instructions and reset DFA state.
void VLIWPacketizerList::endPacket(MachineBasicBlock *MBB,
                                   MachineBasicBlock::iterator MI) {
  if (CurrentPacketMIs.size() > 1) {
    MachineInstr &MIFirst = *CurrentPacketMIs.front();
    finalizeBundle(*MBB, MIFirst.getIterator(), MI.getInstrIterator());
  }
  CurrentPacketMIs.clear();
  ResourceTracker->clearResources();
}