OpenASIP
2.0
|
#include <BF2ScheduleFront.hh>
Public Types | |
typedef BF2Scheduler::MoveNodeMap | MoveNodeMap |
Public Member Functions | |
BF2ScheduleFront (BF2Scheduler &sched, MoveNode &mn, int lc) | |
virtual bool | operator() () override |
void | undoOnlyMe () override |
MoveNode * | findInducingBypassSource (MoveNode &mn) |
void | bypassed (MoveNode &src, MoveNode &dst) |
void | undidBypass (MoveNode &, MoveNode &dst) |
void | mightBeReady (MoveNode &n) override |
void | deletingNode (MoveNode *deletedNode) |
void | appendBypassSources (MoveNodeMap &map) |
![]() | |
BFOptimization (BF2Scheduler &sched) | |
virtual bool | isFinishFront () |
![]() | |
virtual void | undo () |
virtual | ~Reversible () |
void | deleteChildren (std::stack< Reversible * > &children) |
int | id () |
Reversible () | |
Static Public Member Functions | |
static int | prefResultCycle (const MoveNode &mn) |
![]() | |
static void | clearPrologMoves () |
static MoveNode * | getSisterTrigger (const MoveNode &mn, const TTAMachine::Machine &mach) |
Public Attributes | |
DataDependenceGraph::NodeSet | illegalBypassSources_ |
DataDependenceGraph::NodeSet | illegalOperandShares_ |
Protected Member Functions | |
DataDependenceGraph::NodeSet | allNodesOfSameOperation (MoveNode &mn) |
int | scheduleMove (MoveNode &move, BF2Scheduler::SchedulingLimits limits, bool allowEarlyBypass=true, bool allowLateBypass=true, bool allowEarlySharing=true) |
bool | scheduleFrontFromMove (MoveNode &mn) |
void | requeueOtherMovesOfSameOp (MoveNode &mn) |
bool | tryToScheduleMoveOuter (MoveNode &mn, int &latestCycle) |
BF2Scheduler::SchedulingLimits | getPreferredLimits (const MoveNode &mn) |
MoveNode * | getMoveNodeFromFrontBU () |
void | printFront (const TCEString &prefix) |
void | clearSchedulingFront () |
int | latestScheduledOfFrontCycle () |
![]() | |
DataDependenceGraph & | ddg () |
DataDependenceGraph * | rootDDG () |
const DataDependenceGraph & | ddg () const |
DataDependenceGraph * | prologDDG () |
SimpleResourceManager & | rm () const |
SimpleResourceManager * | prologRM () const |
BUMoveNodeSelector & | selector () |
const TTAMachine::Machine & | targetMachine () const |
unsigned int | ii () const |
MoveNodeDuplicator & | duplicator () const |
virtual bool | assign (int cycle, MoveNode &, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU_=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1, bool ignoreGuardWriteCycle=false) |
virtual void | unassign (MoveNode &mn, bool disposePrologCopy=true) |
virtual int | rmEC (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) |
virtual int | rmLC (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) |
virtual bool | canAssign (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1, bool ignoreGWN=false) |
bool | putAlsoToPrologEpilog (int cycle, MoveNode &mn) |
void | setPrologSrcFUAnno (MoveNode &prologMN, MoveNode &loopMN) |
void | setPrologDstFUAnno (MoveNode &prologMN, MoveNode &loopMN) |
void | setJumpGuard (MoveNode &mn) |
void | unsetJumpGuard (MoveNode &mn) |
bool | needJumpGuard (const MoveNode &mn, int cycle) |
int | jumpGuardAvailableCycle (const MoveNode &mn) |
bool | canBeSpeculated (const Operation &op) |
bool | canBeSpeculated (const MoveNode &mn) |
bool | usePrologMove (const MoveNode &mn) |
bool | canBeScheduled (const MoveNode &mn) |
const TTAMachine::RegisterFile * | RFReadPortCountPreventsScheduling (const MoveNode &mn) |
bool | immCountPreventsScheduling (const MoveNode &mn) |
![]() | |
bool | runPreChild (Reversible *preChild) |
bool | runPostChild (Reversible *preChild) |
bool | runChild (std::stack< Reversible * > &children, Reversible *child) |
bool | runChild (Reversible *child, bool pre) |
void | undoAndRemovePreChildren () |
void | undoAndRemovePostChildren () |
void | undoAndRemoveChildren (std::stack< Reversible * > &children) |
Private Types | |
typedef std::map< MoveNode *, int, MoveNode::Comparator > | PathLengthCache |
Private Member Functions | |
bool | tryRevertEarlierBypass (MoveNode &mn) |
MoveNode * | findInducingBypassSourceFromOperation (ProgramOperation &po, const DataDependenceGraph::NodeSet &processedNodes, DataDependenceGraph::NodeSet &queue) |
Private Attributes | |
MoveNodeMap | bypassSources_ |
DataDependenceGraph::NodeSet | schedulingFront_ |
DataDependenceGraph::NodeSet | nodesToNotify_ |
MoveNode & | mn_ |
int | lc_ |
PathLengthCache | pathLengthCache_ |
Additional Inherited Members | |
![]() | |
BF2Scheduler & | sched_ |
![]() | |
std::stack< Reversible * > | preChildren_ |
std::stack< Reversible * > | postChildren_ |
![]() | |
static std::map< MoveNode *, MoveNode *, MoveNode::Comparator > | prologMoves_ |
Definition at line 50 of file BF2ScheduleFront.hh.
Definition at line 82 of file BF2ScheduleFront.hh.
|
private |
Definition at line 132 of file BF2ScheduleFront.hh.
|
inline |
Definition at line 53 of file BF2ScheduleFront.hh.
|
protected |
Definition at line 514 of file BF2ScheduleFront.cc.
References BFOptimization::ddg(), MoveNode::destinationOperation(), MoveNode::destinationOperationCount(), MoveNode::guardOperation(), BF2Scheduler::isDestinationUniversalReg(), MoveNode::isGuardOperation(), MoveNode::isSourceOperation(), BF2Scheduler::isSourceUniversalReg(), DataDependenceGraph::onlyRegisterRawDestinations(), DataDependenceGraph::onlyRegisterRawSource(), BUMoveNodeSelector::queueOperation(), and MoveNode::sourceOperation().
Referenced by requeueOtherMovesOfSameOp().
void BF2ScheduleFront::appendBypassSources | ( | MoveNodeMap & | map | ) |
Definition at line 705 of file BF2ScheduleFront.cc.
References AssocTools::append(), and bypassSources_.
Referenced by BF2Scheduler::bypassNodes().
Definition at line 63 of file BF2ScheduleFront.hh.
References bypassSources_.
Referenced by BFEarlyBypass::operator()().
|
protected |
Definition at line 595 of file BF2ScheduleFront.cc.
References schedulingFront_.
Referenced by scheduleFrontFromMove(), and undoOnlyMe().
|
inline |
Definition at line 78 of file BF2ScheduleFront.hh.
References nodesToNotify_.
Referenced by BF2Scheduler::deletingNode().
Definition at line 603 of file BF2ScheduleFront.cc.
References bypassSources_, MoveNode::destinationOperation(), MoveNode::destinationOperationCount(), findInducingBypassSourceFromOperation(), BF2Scheduler::isDestinationUniversalReg(), MoveNode::isSourceOperation(), BFOptimization::sched_, and MoveNode::sourceOperation().
Referenced by tryRevertEarlierBypass().
|
private |
Definition at line 642 of file BF2ScheduleFront.cc.
References bypassSources_, ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), BF2Scheduler::isDestinationUniversalReg(), ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), and BFOptimization::sched_.
Referenced by findInducingBypassSource().
|
protected |
Definition at line 339 of file BF2ScheduleFront.cc.
References BFOptimization::ddg(), BFOptimization::getSisterTrigger(), BF2Scheduler::hasUnscheduledSuccessors(), BF2Scheduler::isDeadResult(), BF2Scheduler::isPreLoopSharedOperand(), MoveNode::isScheduled(), BoostGraph< GraphNode, GraphEdge >::maxSourceDistance(), pathLengthCache_, Reversible::runPreChild(), BFOptimization::sched_, schedulingFront_, BFSwapOperands::switchedMNs(), BFOptimization::targetMachine(), and MoveNode::toString().
Referenced by operator()(), and scheduleFrontFromMove().
|
protected |
Definition at line 441 of file BF2ScheduleFront.cc.
References TTAMachine::Machine::controlUnit(), TTAMachine::ControlUnit::delaySlots(), BF2Scheduler::SchedulingLimits::direction, BF2Scheduler::SchedulingLimits::earliestCycle, BF2Scheduler::EXACTCYCLE, BFOptimization::getSisterTrigger(), TTAProgram::Move::isControlFlowMove(), BF2Scheduler::SchedulingLimits::latestCycle, lc_, MoveNode::move(), prefResultCycle(), BFOptimization::targetMachine(), BF2Scheduler::TOPDOWN, and MoveNode::toString().
Referenced by tryToScheduleMoveOuter().
|
protected |
Definition at line 327 of file BF2ScheduleFront.cc.
References schedulingFront_.
Referenced by tryToScheduleMoveOuter().
|
overridevirtual |
Reimplemented from BFOptimization.
Definition at line 701 of file BF2ScheduleFront.cc.
References nodesToNotify_.
Referenced by BFOptimization::mightBeReady(), and BFRenameLiveRange::notifySelector().
|
overridevirtual |
This performs the operation. Returns true if success, false if fail.
Implements Reversible.
Definition at line 61 of file BF2ScheduleFront.cc.
References assert, getMoveNodeFromFrontBU(), mn_, pathLengthCache_, requeueOtherMovesOfSameOp(), scheduleFrontFromMove(), and MoveNode::toString().
|
static |
Definition at line 406 of file BF2ScheduleFront.cc.
References MoveNode::cycle(), ProgramOperation::hwopFromOutMove(), MoveNode::isDestinationOperation(), MoveNode::isScheduled(), MoveNode::isSourceOperation(), TTAMachine::HWOperation::latency(), MoveNode::move(), TTAProgram::Terminal::operationIndex(), ProgramOperation::outputIndexOfMove(), ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), TTAProgram::Move::source(), MoveNode::sourceOperation(), and MoveNode::toString().
Referenced by getPreferredLimits(), and BFScheduleBU::operator()().
|
protected |
Definition at line 572 of file BF2ScheduleFront.cc.
References BF2Scheduler::isDeadResult(), BFOptimization::sched_, and schedulingFront_.
Referenced by scheduleFrontFromMove(), and undoOnlyMe().
|
protected |
Definition at line 502 of file BF2ScheduleFront.cc.
References allNodesOfSameOperation(), MoveNode::isFinalized(), schedulingFront_, and MoveNode::setIsInFrontier().
Referenced by operator()(), and scheduleFrontFromMove().
|
protected |
Definition at line 81 of file BF2ScheduleFront.cc.
References assert, clearSchedulingFront(), BFOptimization::ddg(), getMoveNodeFromFrontBU(), TTAProgram::Move::isControlFlowMove(), BF2Scheduler::isDeadResult(), BF2Scheduler::isPreLoopSharedOperand(), lc_, TTAMachine::Machine::maximumLatency(), BUMoveNodeSelector::mightBeReady(), MoveNode::move(), nodesToNotify_, BUMoveNodeSelector::notifyScheduled(), printFront(), requeueOtherMovesOfSameOp(), BFOptimization::rm(), BFOptimization::sched_, schedulingFront_, BFOptimization::selector(), SimpleResourceManager::smallestCycle(), BFOptimization::targetMachine(), MoveNode::toString(), tryToScheduleMoveOuter(), Reversible::undo(), Application::verboseLevel(), and GraphBase< GraphNode, GraphEdge >::writeToDotFile().
Referenced by operator()().
|
protected |
Definition at line 468 of file BF2ScheduleFront.cc.
References assert, BF2Scheduler::BOTTOMUP, BF2Scheduler::SchedulingLimits::direction, BF2Scheduler::SchedulingLimits::earliestCycle, BF2Scheduler::EXACTCYCLE, BF2Scheduler::isPreLoopSharedOperand(), BF2Scheduler::SchedulingLimits::latestCycle, Reversible::runPreChild(), BFOptimization::sched_, BF2Scheduler::TOPDOWN, and MoveNode::toString().
Referenced by tryToScheduleMoveOuter().
|
private |
Definition at line 671 of file BF2ScheduleFront.cc.
References bypassSources_, findInducingBypassSource(), illegalBypassSources_, BF2Scheduler::isDestinationUniversalReg(), BFOptimization::sched_, and MoveNode::toString().
Referenced by tryToScheduleMoveOuter().
|
protected |
Definition at line 170 of file BF2ScheduleFront.cc.
References assert, BF2Scheduler::BOTTOMUP, MoveNode::destinationOperationCount(), BF2Scheduler::SchedulingLimits::direction, BF2Scheduler::SchedulingLimits::earliestCycle, BF2Scheduler::EXACTCYCLE, getPreferredLimits(), illegalOperandShares_, MoveNode::isDestinationVariable(), BF2Scheduler::isPreLoopSharedOperand(), BF2Scheduler::SchedulingLimits::latestCycle, latestScheduledOfFrontCycle(), BFOptimization::prologRM(), Reversible::runPreChild(), BFOptimization::sched_, scheduleMove(), BF2Scheduler::TOPDOWN, MoveNode::toString(), and tryRevertEarlierBypass().
Referenced by scheduleFrontFromMove().
Definition at line 67 of file BF2ScheduleFront.hh.
References bypassSources_.
Referenced by BFEarlyBypass::undoOnlyMe().
|
overridevirtual |
Undoes the operations done by this class but not children. This method should be overloaded by most derived classes.
Reimplemented from Reversible.
Definition at line 582 of file BF2ScheduleFront.cc.
References clearSchedulingFront(), and printFront().
|
private |
Definition at line 118 of file BF2ScheduleFront.hh.
Referenced by appendBypassSources(), bypassed(), findInducingBypassSource(), findInducingBypassSourceFromOperation(), tryRevertEarlierBypass(), and undidBypass().
DataDependenceGraph::NodeSet BF2ScheduleFront::illegalBypassSources_ |
Definition at line 71 of file BF2ScheduleFront.hh.
Referenced by BFEarlyBypasser::operator()(), and tryRevertEarlierBypass().
DataDependenceGraph::NodeSet BF2ScheduleFront::illegalOperandShares_ |
Definition at line 72 of file BF2ScheduleFront.hh.
Referenced by BFShareOperands::operator()(), and tryToScheduleMoveOuter().
|
private |
Definition at line 130 of file BF2ScheduleFront.hh.
Referenced by getPreferredLimits(), and scheduleFrontFromMove().
|
private |
Definition at line 129 of file BF2ScheduleFront.hh.
Referenced by operator()().
|
private |
Definition at line 127 of file BF2ScheduleFront.hh.
Referenced by deletingNode(), mightBeReady(), and scheduleFrontFromMove().
|
private |
Definition at line 133 of file BF2ScheduleFront.hh.
Referenced by getMoveNodeFromFrontBU(), and operator()().
|
private |
Definition at line 125 of file BF2ScheduleFront.hh.
Referenced by clearSchedulingFront(), getMoveNodeFromFrontBU(), latestScheduledOfFrontCycle(), printFront(), requeueOtherMovesOfSameOp(), and scheduleFrontFromMove().