Go to the documentation of this file.
49 #ifdef ABORT_ORPHAN_NODES
50 #define WARN_ORPHAN_NODES
62 for (DataDependenceGraph::NodeSet::iterator i = sinks.begin();
71 std::cerr <<
"termimal not fuport even though dest op!: " << node.
toString();
97 __FILE__,__LINE__,
__func__,
"Creation of subgraph failed");
131 ddg_(&ddg), ddgOwned_(
false) {
172 for (DataDependenceGraph::NodeSet::iterator i = unscheduled.begin();
173 i != unscheduled.end();
176 #ifdef WARN_ORPHAN_NODES
177 std::cerr <<
"Found orphan node: " << node.
toString() <<
" max src dist: "
181 #ifdef ABORT_ORPHAN_NODES
213 for (DataDependenceGraph::NodeSet::iterator i = pred.begin();
214 i != pred.end(); ++i) {
247 while (!queue.empty()) {
263 if (bypassSrc != NULL) {
264 if (nodes.find(bypassSrc) == nodes.end()) {
265 queue.insert(bypassSrc);
268 std::cerr <<
"Warning: Cannot find source for forced bypass. "
269 <<
" Instruction scheduler may fail/deadlock" << std::endl;
277 for (DataDependenceGraph::NodeSet::iterator j =
278 rrDestinations.begin(); j != rrDestinations.end(); j++) {
280 if (nodes.find(n) == nodes.end()) {
293 if (!nodes.empty()) {
295 for (DataDependenceGraph::NodeSet::iterator i = nodes.begin(); i != nodes.end(); i++) {
296 if (!((**i).isScheduled())) {
322 if (nodes.find(&inputMove) == nodes.end()) {
323 queue.insert(&inputMove);
330 if (nodes.find(&outputMove) == nodes.end()) {
331 queue.insert(&outputMove);
352 for (DataDependenceGraph::NodeSet::iterator i = nodes.begin(); i != nodes.end(); i++) {
374 for (
int i = 0; i < nodes.
nodeCount(); i++) {
virtual bool isFUPort() const
virtual NodeSet predecessors(const Node &node, bool ignoreBackEdges=false, bool ignoreForwardEdges=false) const
int scheduledNodeCount() const
std::string toString() const
MoveNode & node(int index) const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
virtual DataDependenceGraph & dataDependenceGraph()
int maxSourceDistance(const GraphNode &node) const
bool isDestinationOperation() const
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
Terminal & destination() const
virtual MoveNodeGroup candidates()
void setCause(const Exception &cause)
void setMachine(const TTAMachine::Machine &machine)
virtual void mightBeReady(MoveNode &node)
MoveNode * onlyRegisterRawSource(const MoveNode &mn, int allowGuardEdges=2, int backEdges=0) const
NodeSet onlyRegisterRawDestinations(const MoveNode &mn, bool allowGuardEdges=false, bool allowBackEdges=false) const
virtual void setCycleGrouping(bool flag)
virtual bool isUniversalMachineRegister() const
ProgramOperation & sourceOperation() const
#define assert(condition)
DataDependenceGraph * createSubgraph(NodeSet &nodes, bool includeLoops=false)
virtual int operationIndex() const
#define abortWithError(message)
ReadyMoveNodeGroupListBU readyList_
The prioritized ready list.
bool otherSuccessorsScheduled(MoveNode &node, const NodeSet &ignoredNodes) const
int maxSinkDistance(const GraphNode &node) const
bool isSourceOperation() const
virtual NodeSet sinkNodes() const
DataDependenceGraph * ddg_
The data dependence graph built from the basic block.
unsigned int destinationOperationCount() const
int inputMoveCount() const
bool hasNode(const Node &) const
virtual void writeToDotFile(const TCEString &fileName) const
int outputMoveCount() const
void addNode(MoveNode &node)
ProgramOperation & destinationOperation(unsigned int index=0) const
TTAProgram::Move & move()
static void queueOperation(ProgramOperation &po, const DataDependenceGraph::NodeSet &nodes, DataDependenceGraph::NodeSet &queue)
find Finds info of the inner loops in the false
bool inSameOperation(const MoveNode &other) const
virtual void notifyScheduled(MoveNode &node)
virtual DataDependenceGraph * build(ControlFlowGraph &cGraph, DataDependenceGraph::AntidependenceLevel antidependenceLevel, const TTAMachine::Machine &mach, const UniversalMachine *um=NULL, bool createMemAndFUDeps=true, bool createDeathInformation=true, llvm::AliasAnalysis *AA=NULL)
virtual ~BUMoveNodeSelector()
Terminal & source() const
bool isReadyToBeScheduled(DataDependenceGraph::NodeSet &nodes) const
MoveNode & outputMove(int index) const
virtual void initializeReadylist()
Initializes ready list from nodes that are ready.
NodeSet unscheduledMoves() const
MoveNode & inputMove(int index) const
BUMoveNodeSelector(TTAProgram::BasicBlock &bb, const TTAMachine::Machine &machine)