2011-12-01 21:10:21 +00:00
|
|
|
//=- llvm/CodeGen/DFAPacketizer.cpp - DFA Packetizer for VLIW -*- C++ -*-=====//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// This class implements a deterministic finite automaton (DFA) based
|
|
|
|
// packetizing mechanism for VLIW architectures. It provides APIs to
|
|
|
|
// determine whether there exists a legal mapping of instructions to
|
|
|
|
// functional unit assignments in a packet. The DFA is auto-generated from
|
|
|
|
// the target's Schedule.td file.
|
|
|
|
//
|
|
|
|
// A DFA consists of 3 major elements: states, inputs, and transitions. For
|
|
|
|
// the packetizing mechanism, the input is the set of instruction classes for
|
|
|
|
// a target. The state models all possible combinations of functional unit
|
|
|
|
// consumption for a given set of instructions in a packet. A transition
|
|
|
|
// models the addition of an instruction to a packet. In the DFA constructed
|
|
|
|
// by this class, if an instruction can be added to a packet, then a valid
|
|
|
|
// transition exists from the corresponding state. Invalid transitions
|
|
|
|
// indicate that the instruction cannot be added to the current packet.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2016-07-14 19:04:26 +00:00
|
|
|
#define DEBUG_TYPE "packets"
|
|
|
|
|
2011-12-01 21:10:21 +00:00
|
|
|
#include "llvm/CodeGen/DFAPacketizer.h"
|
|
|
|
#include "llvm/CodeGen/MachineInstr.h"
|
2012-02-15 18:55:14 +00:00
|
|
|
#include "llvm/CodeGen/MachineInstrBundle.h"
|
2012-12-03 16:50:05 +00:00
|
|
|
#include "llvm/CodeGen/ScheduleDAGInstrs.h"
|
2011-12-01 21:10:21 +00:00
|
|
|
#include "llvm/MC/MCInstrItineraries.h"
|
2016-08-19 21:12:52 +00:00
|
|
|
#include "llvm/Support/CommandLine.h"
|
2017-06-06 11:49:48 +00:00
|
|
|
#include "llvm/Target/TargetInstrInfo.h"
|
2016-01-14 21:17:04 +00:00
|
|
|
|
2011-12-01 21:10:21 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2016-08-19 21:12:52 +00:00
|
|
|
static cl::opt<unsigned> InstrLimit("dfa-instr-limit", cl::Hidden,
|
|
|
|
cl::init(0), cl::desc("If present, stops packetizing after N instructions"));
|
|
|
|
static unsigned InstrCount = 0;
|
|
|
|
|
2015-11-22 15:20:19 +00:00
|
|
|
// --------------------------------------------------------------------
|
|
|
|
// Definitions shared between DFAPacketizer.cpp and DFAPacketizerEmitter.cpp
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
DFAInput addDFAFuncUnits(DFAInput Inp, unsigned FuncUnits) {
|
|
|
|
return (Inp << DFA_MAX_RESOURCES) | FuncUnits;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Return the DFAInput for an instruction class input vector.
|
|
|
|
/// This function is used in both DFAPacketizer.cpp and in
|
|
|
|
/// DFAPacketizerEmitter.cpp.
|
|
|
|
DFAInput getDFAInsnInput(const std::vector<unsigned> &InsnClass) {
|
|
|
|
DFAInput InsnInput = 0;
|
2016-01-14 21:17:04 +00:00
|
|
|
assert((InsnClass.size() <= DFA_MAX_RESTERMS) &&
|
|
|
|
"Exceeded maximum number of DFA terms");
|
2015-11-22 15:20:19 +00:00
|
|
|
for (auto U : InsnClass)
|
|
|
|
InsnInput = addDFAFuncUnits(InsnInput, U);
|
|
|
|
return InsnInput;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// --------------------------------------------------------------------
|
|
|
|
|
2015-11-21 20:00:45 +00:00
|
|
|
DFAPacketizer::DFAPacketizer(const InstrItineraryData *I,
|
|
|
|
const DFAStateInput (*SIT)[2],
|
2011-12-06 17:34:16 +00:00
|
|
|
const unsigned *SET):
|
2011-12-01 21:10:21 +00:00
|
|
|
InstrItins(I), CurrentState(0), DFAStateInputTable(SIT),
|
2015-11-21 20:00:45 +00:00
|
|
|
DFAStateEntryTable(SET) {
|
|
|
|
// Make sure DFA types are large enough for the number of terms & resources.
|
2016-05-27 11:36:04 +00:00
|
|
|
static_assert((DFA_MAX_RESTERMS * DFA_MAX_RESOURCES) <=
|
|
|
|
(8 * sizeof(DFAInput)),
|
|
|
|
"(DFA_MAX_RESTERMS * DFA_MAX_RESOURCES) too big for DFAInput");
|
|
|
|
static_assert(
|
|
|
|
(DFA_MAX_RESTERMS * DFA_MAX_RESOURCES) <= (8 * sizeof(DFAStateInput)),
|
|
|
|
"(DFA_MAX_RESTERMS * DFA_MAX_RESOURCES) too big for DFAStateInput");
|
2015-11-21 20:00:45 +00:00
|
|
|
}
|
2011-12-01 21:10:21 +00:00
|
|
|
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
// Read the DFA transition table and update CachedTable.
|
2011-12-01 21:10:21 +00:00
|
|
|
//
|
|
|
|
// Format of the transition tables:
|
|
|
|
// DFAStateInputTable[][2] = pairs of <Input, Transition> for all valid
|
|
|
|
// transitions
|
|
|
|
// DFAStateEntryTable[i] = Index of the first entry in DFAStateInputTable
|
|
|
|
// for the ith state
|
|
|
|
//
|
|
|
|
void DFAPacketizer::ReadTable(unsigned int state) {
|
|
|
|
unsigned ThisState = DFAStateEntryTable[state];
|
|
|
|
unsigned NextStateInTable = DFAStateEntryTable[state+1];
|
|
|
|
// Early exit in case CachedTable has already contains this
|
2011-12-06 17:34:11 +00:00
|
|
|
// state's transitions.
|
2016-01-14 21:17:04 +00:00
|
|
|
if (CachedTable.count(UnsignPair(state, DFAStateInputTable[ThisState][0])))
|
2011-12-01 21:10:21 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
for (unsigned i = ThisState; i < NextStateInTable; i++)
|
|
|
|
CachedTable[UnsignPair(state, DFAStateInputTable[i][0])] =
|
|
|
|
DFAStateInputTable[i][1];
|
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Return the DFAInput for an instruction class.
|
2015-11-21 20:00:45 +00:00
|
|
|
DFAInput DFAPacketizer::getInsnInput(unsigned InsnClass) {
|
|
|
|
// Note: this logic must match that in DFAPacketizerDefs.h for input vectors.
|
|
|
|
DFAInput InsnInput = 0;
|
|
|
|
unsigned i = 0;
|
2016-01-14 21:17:04 +00:00
|
|
|
(void)i;
|
2015-11-21 20:00:45 +00:00
|
|
|
for (const InstrStage *IS = InstrItins->beginStage(InsnClass),
|
2016-01-14 21:17:04 +00:00
|
|
|
*IE = InstrItins->endStage(InsnClass); IS != IE; ++IS) {
|
2015-11-21 20:00:45 +00:00
|
|
|
InsnInput = addDFAFuncUnits(InsnInput, IS->getUnits());
|
2016-01-14 21:17:04 +00:00
|
|
|
assert((i++ < DFA_MAX_RESTERMS) && "Exceeded maximum number of DFA inputs");
|
2015-11-21 20:00:45 +00:00
|
|
|
}
|
|
|
|
return InsnInput;
|
|
|
|
}
|
2011-12-01 21:10:21 +00:00
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Return the DFAInput for an instruction class input vector.
|
2015-11-22 15:20:19 +00:00
|
|
|
DFAInput DFAPacketizer::getInsnInput(const std::vector<unsigned> &InsnClass) {
|
|
|
|
return getDFAInsnInput(InsnClass);
|
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Check if the resources occupied by a MCInstrDesc are available in the
|
|
|
|
// current state.
|
2011-12-06 17:34:16 +00:00
|
|
|
bool DFAPacketizer::canReserveResources(const llvm::MCInstrDesc *MID) {
|
2011-12-01 21:10:21 +00:00
|
|
|
unsigned InsnClass = MID->getSchedClass();
|
2015-11-21 20:00:45 +00:00
|
|
|
DFAInput InsnInput = getInsnInput(InsnClass);
|
|
|
|
UnsignPair StateTrans = UnsignPair(CurrentState, InsnInput);
|
2011-12-01 21:10:21 +00:00
|
|
|
ReadTable(CurrentState);
|
2016-01-14 21:17:04 +00:00
|
|
|
return CachedTable.count(StateTrans) != 0;
|
2011-12-01 21:10:21 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Reserve the resources occupied by a MCInstrDesc and change the current
|
|
|
|
// state to reflect that change.
|
2011-12-06 17:34:16 +00:00
|
|
|
void DFAPacketizer::reserveResources(const llvm::MCInstrDesc *MID) {
|
2011-12-01 21:10:21 +00:00
|
|
|
unsigned InsnClass = MID->getSchedClass();
|
2015-11-21 20:00:45 +00:00
|
|
|
DFAInput InsnInput = getInsnInput(InsnClass);
|
|
|
|
UnsignPair StateTrans = UnsignPair(CurrentState, InsnInput);
|
2011-12-01 21:10:21 +00:00
|
|
|
ReadTable(CurrentState);
|
|
|
|
assert(CachedTable.count(StateTrans) != 0);
|
|
|
|
CurrentState = CachedTable[StateTrans];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
// Check if the resources occupied by a machine instruction are available
|
|
|
|
// in the current state.
|
2016-02-27 19:09:00 +00:00
|
|
|
bool DFAPacketizer::canReserveResources(llvm::MachineInstr &MI) {
|
|
|
|
const llvm::MCInstrDesc &MID = MI.getDesc();
|
2011-12-01 21:10:21 +00:00
|
|
|
return canReserveResources(&MID);
|
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Reserve the resources occupied by a machine instruction and change the
|
|
|
|
// current state to reflect that change.
|
2016-02-27 19:09:00 +00:00
|
|
|
void DFAPacketizer::reserveResources(llvm::MachineInstr &MI) {
|
|
|
|
const llvm::MCInstrDesc &MID = MI.getDesc();
|
2011-12-01 21:10:21 +00:00
|
|
|
reserveResources(&MID);
|
|
|
|
}
|
2012-02-15 18:55:14 +00:00
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
2012-05-01 21:28:30 +00:00
|
|
|
namespace llvm {
|
2016-01-14 21:17:04 +00:00
|
|
|
// This class extends ScheduleDAGInstrs and overrides the schedule method
|
|
|
|
// to build the dependence graph.
|
2012-02-15 18:55:14 +00:00
|
|
|
class DefaultVLIWScheduler : public ScheduleDAGInstrs {
|
2015-12-14 20:35:13 +00:00
|
|
|
private:
|
|
|
|
AliasAnalysis *AA;
|
2016-03-08 15:33:51 +00:00
|
|
|
/// Ordered list of DAG postprocessing steps.
|
|
|
|
std::vector<std::unique_ptr<ScheduleDAGMutation>> Mutations;
|
2012-02-15 18:55:14 +00:00
|
|
|
public:
|
2015-12-14 20:35:13 +00:00
|
|
|
DefaultVLIWScheduler(MachineFunction &MF, MachineLoopInfo &MLI,
|
|
|
|
AliasAnalysis *AA);
|
2016-01-14 21:17:04 +00:00
|
|
|
// Actual scheduling work.
|
2014-03-07 09:26:03 +00:00
|
|
|
void schedule() override;
|
2016-03-08 15:33:51 +00:00
|
|
|
|
|
|
|
/// DefaultVLIWScheduler takes ownership of the Mutation object.
|
|
|
|
void addMutation(std::unique_ptr<ScheduleDAGMutation> Mutation) {
|
|
|
|
Mutations.push_back(std::move(Mutation));
|
|
|
|
}
|
|
|
|
protected:
|
|
|
|
void postprocessDAG();
|
2012-02-15 18:55:14 +00:00
|
|
|
};
|
2015-06-23 09:49:53 +00:00
|
|
|
}
|
2012-02-15 23:34:15 +00:00
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
2014-08-20 20:57:26 +00:00
|
|
|
DefaultVLIWScheduler::DefaultVLIWScheduler(MachineFunction &MF,
|
2015-12-14 20:35:13 +00:00
|
|
|
MachineLoopInfo &MLI,
|
|
|
|
AliasAnalysis *AA)
|
|
|
|
: ScheduleDAGInstrs(MF, &MLI), AA(AA) {
|
2012-05-01 21:28:30 +00:00
|
|
|
CanHandleTerminators = true;
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
2016-03-08 15:33:51 +00:00
|
|
|
/// Apply each ScheduleDAGMutation step in order.
|
|
|
|
void DefaultVLIWScheduler::postprocessDAG() {
|
|
|
|
for (auto &M : Mutations)
|
|
|
|
M->apply(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-03-07 23:00:49 +00:00
|
|
|
void DefaultVLIWScheduler::schedule() {
|
2012-02-15 18:55:14 +00:00
|
|
|
// Build the scheduling graph.
|
2015-12-14 20:35:13 +00:00
|
|
|
buildSchedGraph(AA);
|
2016-03-08 15:33:51 +00:00
|
|
|
postprocessDAG();
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
VLIWPacketizerList::VLIWPacketizerList(MachineFunction &mf,
|
|
|
|
MachineLoopInfo &mli, AliasAnalysis *aa)
|
|
|
|
: MF(mf), TII(mf.getSubtarget().getInstrInfo()), AA(aa) {
|
2014-10-09 01:59:35 +00:00
|
|
|
ResourceTracker = TII->CreateTargetScheduleState(MF.getSubtarget());
|
2016-01-14 21:17:04 +00:00
|
|
|
VLIWScheduler = new DefaultVLIWScheduler(MF, mli, AA);
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
2012-02-15 18:55:14 +00:00
|
|
|
VLIWPacketizerList::~VLIWPacketizerList() {
|
2017-05-01 16:18:42 +00:00
|
|
|
delete VLIWScheduler;
|
|
|
|
delete ResourceTracker;
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// End the current packet, bundle packet instructions and reset DFA state.
|
2016-02-27 19:09:00 +00:00
|
|
|
void VLIWPacketizerList::endPacket(MachineBasicBlock *MBB,
|
|
|
|
MachineBasicBlock::iterator MI) {
|
2016-08-19 21:12:52 +00:00
|
|
|
DEBUG({
|
|
|
|
if (!CurrentPacketMIs.empty()) {
|
|
|
|
dbgs() << "Finalizing packet:\n";
|
|
|
|
for (MachineInstr *MI : CurrentPacketMIs)
|
|
|
|
dbgs() << " * " << *MI;
|
|
|
|
}
|
|
|
|
});
|
2012-02-15 18:55:14 +00:00
|
|
|
if (CurrentPacketMIs.size() > 1) {
|
2016-02-27 19:09:00 +00:00
|
|
|
MachineInstr &MIFirst = *CurrentPacketMIs.front();
|
|
|
|
finalizeBundle(*MBB, MIFirst.getIterator(), MI.getInstrIterator());
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
CurrentPacketMIs.clear();
|
|
|
|
ResourceTracker->clearResources();
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << "End packet\n");
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2016-01-14 21:17:04 +00:00
|
|
|
|
|
|
|
// Bundle machine instructions into packets.
|
2012-02-15 18:55:14 +00:00
|
|
|
void VLIWPacketizerList::PacketizeMIs(MachineBasicBlock *MBB,
|
|
|
|
MachineBasicBlock::iterator BeginItr,
|
|
|
|
MachineBasicBlock::iterator EndItr) {
|
2012-05-01 21:28:30 +00:00
|
|
|
assert(VLIWScheduler && "VLIW Scheduler is not initialized!");
|
|
|
|
VLIWScheduler->startBlock(MBB);
|
2013-08-23 17:48:33 +00:00
|
|
|
VLIWScheduler->enterRegion(MBB, BeginItr, EndItr,
|
|
|
|
std::distance(BeginItr, EndItr));
|
2012-05-01 21:28:30 +00:00
|
|
|
VLIWScheduler->schedule();
|
|
|
|
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG({
|
|
|
|
dbgs() << "Scheduling DAG of the packetize region\n";
|
|
|
|
for (SUnit &SU : VLIWScheduler->SUnits)
|
|
|
|
SU.dumpAll(VLIWScheduler);
|
|
|
|
});
|
|
|
|
|
2012-05-01 21:28:30 +00:00
|
|
|
// Generate MI -> SU map.
|
|
|
|
MIToSUnit.clear();
|
2016-01-14 21:17:04 +00:00
|
|
|
for (SUnit &SU : VLIWScheduler->SUnits)
|
|
|
|
MIToSUnit[SU.getInstr()] = &SU;
|
2012-02-15 18:55:14 +00:00
|
|
|
|
2016-08-19 21:12:52 +00:00
|
|
|
bool LimitPresent = InstrLimit.getPosition();
|
|
|
|
|
2012-02-15 18:55:14 +00:00
|
|
|
// The main packetizer loop.
|
|
|
|
for (; BeginItr != EndItr; ++BeginItr) {
|
2016-08-19 21:12:52 +00:00
|
|
|
if (LimitPresent) {
|
|
|
|
if (InstrCount >= InstrLimit) {
|
|
|
|
EndItr = BeginItr;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
InstrCount++;
|
|
|
|
}
|
2016-02-27 19:09:00 +00:00
|
|
|
MachineInstr &MI = *BeginItr;
|
2016-01-14 21:17:04 +00:00
|
|
|
initPacketizerState();
|
2012-02-15 18:55:14 +00:00
|
|
|
|
|
|
|
// End the current packet if needed.
|
2016-01-14 21:17:04 +00:00
|
|
|
if (isSoloInstruction(MI)) {
|
2012-02-15 18:55:14 +00:00
|
|
|
endPacket(MBB, MI);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2012-05-01 21:28:30 +00:00
|
|
|
// Ignore pseudo instructions.
|
2016-01-14 21:17:04 +00:00
|
|
|
if (ignorePseudoInstruction(MI, MBB))
|
2012-05-01 21:28:30 +00:00
|
|
|
continue;
|
|
|
|
|
2016-02-27 19:09:00 +00:00
|
|
|
SUnit *SUI = MIToSUnit[&MI];
|
2012-02-15 18:55:14 +00:00
|
|
|
assert(SUI && "Missing SUnit Info!");
|
|
|
|
|
|
|
|
// Ask DFA if machine resource is available for MI.
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << "Checking resources for adding MI to packet " << MI);
|
|
|
|
|
2012-02-15 18:55:14 +00:00
|
|
|
bool ResourceAvail = ResourceTracker->canReserveResources(MI);
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG({
|
|
|
|
if (ResourceAvail)
|
|
|
|
dbgs() << " Resources are available for adding MI to packet\n";
|
|
|
|
else
|
|
|
|
dbgs() << " Resources NOT available\n";
|
|
|
|
});
|
2015-12-16 16:38:16 +00:00
|
|
|
if (ResourceAvail && shouldAddToPacket(MI)) {
|
2012-02-15 18:55:14 +00:00
|
|
|
// Dependency check for MI with instructions in CurrentPacketMIs.
|
2016-01-14 21:17:04 +00:00
|
|
|
for (auto MJ : CurrentPacketMIs) {
|
2012-05-01 21:28:30 +00:00
|
|
|
SUnit *SUJ = MIToSUnit[MJ];
|
2012-02-15 18:55:14 +00:00
|
|
|
assert(SUJ && "Missing SUnit Info!");
|
|
|
|
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << " Checking against MJ " << *MJ);
|
2012-02-15 18:55:14 +00:00
|
|
|
// Is it legal to packetize SUI and SUJ together.
|
2016-01-14 21:17:04 +00:00
|
|
|
if (!isLegalToPacketizeTogether(SUI, SUJ)) {
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << " Not legal to add MI, try to prune\n");
|
2012-02-15 18:55:14 +00:00
|
|
|
// Allow packetization if dependency can be pruned.
|
2016-01-14 21:17:04 +00:00
|
|
|
if (!isLegalToPruneDependencies(SUI, SUJ)) {
|
2012-02-15 18:55:14 +00:00
|
|
|
// End the packet if dependency cannot be pruned.
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << " Could not prune dependencies for adding MI\n");
|
2012-02-15 18:55:14 +00:00
|
|
|
endPacket(MBB, MI);
|
|
|
|
break;
|
2016-01-14 21:17:04 +00:00
|
|
|
}
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << " Pruned dependence for adding MI\n");
|
2016-01-14 21:17:04 +00:00
|
|
|
}
|
|
|
|
}
|
2012-02-15 18:55:14 +00:00
|
|
|
} else {
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(if (ResourceAvail)
|
|
|
|
dbgs() << "Resources are available, but instruction should not be "
|
|
|
|
"added to packet\n " << MI);
|
2015-12-16 16:38:16 +00:00
|
|
|
// End the packet if resource is not available, or if the instruction
|
|
|
|
// shoud not be added to the current packet.
|
2012-02-15 18:55:14 +00:00
|
|
|
endPacket(MBB, MI);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add MI to the current packet.
|
2016-07-14 19:04:26 +00:00
|
|
|
DEBUG(dbgs() << "* Adding MI to packet " << MI << '\n');
|
2016-01-14 21:17:04 +00:00
|
|
|
BeginItr = addToPacket(MI);
|
|
|
|
} // For all instructions in the packetization range.
|
2012-02-15 18:55:14 +00:00
|
|
|
|
|
|
|
// End any packet left behind.
|
|
|
|
endPacket(MBB, EndItr);
|
2012-05-01 21:28:30 +00:00
|
|
|
VLIWScheduler->exitRegion();
|
|
|
|
VLIWScheduler->finishBlock();
|
2012-02-15 18:55:14 +00:00
|
|
|
}
|
2016-03-08 15:33:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Add a DAG mutation object to the ordered list.
|
|
|
|
void VLIWPacketizerList::addMutation(
|
|
|
|
std::unique_ptr<ScheduleDAGMutation> Mutation) {
|
|
|
|
VLIWScheduler->addMutation(std::move(Mutation));
|
|
|
|
}
|