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