Go to the documentation of this file.
37 #ifndef TTA_BF2_SCHEDULER_HH
38 #define TTA_BF2_SCHEDULER_HH
58 class BFScheduleLoopBufferInit;
86 bool testOnly =
false);
176 typedef std::map<MoveNode*, MoveNode*, MoveNode::Comparator>
291 bool onlySharedWithAnother);
324 std::map<MoveNode*, TTAMachine::FUPort*, MoveNode::Comparator>
MoveNode * loopLimitNode()
void deletingNode(MoveNode *deletedNode)
TTAMachine::Unit * getDstUnit(MoveNode &mn)
SchedulingDirection direction
PreLoopShareInfo(PreLoopOperandEnum state)
bool isRegCopyAfter(MoveNode &mn)
RegisterRenamer * renamer()
const DataDependenceGraph & ddg() const
std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > possibleTempRegRFs(const MoveNode &mn, bool tempRegAfter, const TTAMachine::RegisterFile *forbiddenRF=nullptr)
bool hasUnscheduledSuccessors(MoveNode &mn) const
BF2Scheduler(InterPassData &ipd, RegisterRenamer *renamer)
static bool isDestinationUniversalReg(const MoveNode &mn)
bool killDeadResults() const
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
MoveNode * selectMoveToSchedule()
const TTAMachine::Machine & targetMachine() const
void preAllocateFunctionUnits(ProgramOperationPtr po)
DataDependenceGraph & ddg()
DataDependenceGraph * prologDDG()
bool isDeadResult(MoveNode &mn) const
MoveNodeMap operandShareRemovedMoves_
PreLoopShareInfo(MoveNode &mn, TTAMachine::FUPort &port)
SimpleResourceManager * prologRM_
std::map< MoveNode *, MoveNode *, MoveNode::Comparator > MoveNodeMap
MoveNodeDuplicator * duplicator_
std::map< TCEString, MoveNodeUseSet > MoveNodeUseMapSet
virtual std::string shortDescription() const override
std::list< ProgramOperation * > loopBufOps()
DataDependenceGraph::NodeSet pendingMoves_
MoveNodeDuplicator & duplicator()
bool isTrigger(const TTAMachine::Unit &unit, MoveNode &mn)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
static void writeDotWithNameAndNodeID(DataDependenceGraph &ddg, const TCEString &namePrefix, const MoveNode &mn)
void allocateFunctionUnits()
DataDependenceEdge * findBypassEdge(const MoveNode &mn)
#define assert(condition)
void releasePortForOp(const Operation &op)
std::multimap< TTAMachine::FUPort *, MoveNode * > preSharedOperandPorts_
void countLoopInvariantValueUsages()
PreLoopOperandEnum state_
TTAMachine::FUPort * isPreLoopSharedOperand(MoveNode &mn) const
std::multimap< int, TCEString > invariantsOfCount_
DataDependenceGraph::NodeSet removedMoves_
MoveNode * counterValueNode
const TTAMachine::Machine * targetMachine_
LoopAnalyzer::LoopAnalysisResult * getLoopAnalysis()
void setLoopLimits(LoopAnalyzer::LoopAnalysisResult *llResult)
static bool isSourceUniversalReg(const MoveNode &mn)
void nodeAndCopyKilled(MoveNode &mn)
std::map< MoveNode *, TTAMachine::FUPort *, MoveNode::Comparator > preLoopSharedOperands_
MoveNode * jumpGuardWrite_
void unreservePreallocatedFUs()
LLVMTCECmdLineOptions * options_
TTAProgram::MoveGuard * jumpGuard()
virtual int handleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine, int minCycle=0, bool testOnly=false)
DataDependenceGraph * prologDDG_
BUMoveNodeSelector & selector()
bool mustBeTrigger(const MoveNode &mn, const ProgramOperation &po)
MoveNodeMap sharedOperands_
void reservePreallocatedFUs()
DataDependenceGraph::NodeSet dreRemovedMoves_
BUMoveNodeSelector * selector_
DataDependenceGraph::NodeSet bypassPredecessors_
Nodes that may become ready due bypass removing antideps.
SimpleResourceManager * rm_
SimpleResourceManager * prologRM()
static const int PROLOG_CYCLE_BIAS
SimpleResourceManager & rm()
BF2ScheduleFront * currentFront()
void undoPushAntideps(MoveNode &aDepSource)
BF2ScheduleFront * currentFront_
void nodeResurrected(MoveNode &mn)
RegisterRenamer * renamer_
int scheduleFrontFromMove(MoveNode &mn)
std::list< ProgramOperation * > loopBufOps_
void revertBBLiveRangeBookkeepingForSource(MoveNode *mn)
std::multimap< TCEString, MoveNode * > invariants_
std::vector< BFOptimization * > scheduledStack_
bool pushAntidepDestsDown(MoveNode &mn, int oldLC, int maxLC)
int swapToUntrigger(ProgramOperationPtr po, const Operation &op, int operandIndex, MoveNode &trig)
MoveNodeSet findSiblings(MoveNode &mn)
LoopAnalyzer::LoopAnalysisResult * llResult_
void nodeKilled(MoveNode &mn)
MoveNode * guardWriteNode()
MoveNodeMap bypassNodes()
void eraseFromMoveNodeUseSet(LiveRangeData::MoveNodeUseMapSet &mnuMap, const TCEString ®, MoveNode *mn)
int maximumAllowedCycle() const
virtual int handleLoopDDG(DataDependenceGraph &, SimpleResourceManager &, const TTAMachine::Machine &, int tripCount, SimpleResourceManager *, bool testOnly) override
void revertBBLiveRangeBookkeepingForDestination(MoveNode *mn)
PreLoopShareInfo preAllocateFunctionUnitsInner(ProgramOperationPtr po, const Operation &op, bool onlySharedWithAnother)
DataDependenceGraph * ddg_
void scheduleDDG(DataDependenceGraph &ddg, SimpleResourceManager &rm, const TTAMachine::Machine &targetMachine)
TTAMachine::FUPort * sharedPort_
bool isRegCopyBefore(MoveNode &mn)