OpenASIP  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BFRemoveLoopChecksAndJump Class Reference

#include <BFRemoveLoopChecks.hh>

Inheritance diagram for BFRemoveLoopChecksAndJump:
Inheritance graph
Collaboration diagram for BFRemoveLoopChecksAndJump:
Collaboration graph

Public Member Functions

 BFRemoveLoopChecksAndJump (BF2Scheduler &sched)
 
bool operator() ()
 
void undoOnlyMe ()
 
- Public Member Functions inherited from BFOptimization
 BFOptimization (BF2Scheduler &sched)
 
virtual bool isFinishFront ()
 
virtual void mightBeReady (MoveNode &mn)
 
- Public Member Functions inherited from Reversible
virtual void undo ()
 
virtual ~Reversible ()
 
void deleteChildren (std::stack< Reversible * > &children)
 
int id ()
 
 Reversible ()
 

Private Types

typedef std::set< ProgramOperationPtr, ProgramOperationPtrComparatorPOSet
 

Private Member Functions

void removePoFromQueue (POSet &queuedToRemovePo, POSet &maybeRemovePo, DataDependenceGraph::NodeSet &queuedToRemoveMove, DataDependenceGraph::NodeSet &maybeRemoveMove)
 
void checkMaybePos (POSet &maybeRemove, POSet &queuedToRemove, POSet &finishedAlivePo)
 
void removeMoveFromQueue (DataDependenceGraph::NodeSet &queuedToRemoveMove, DataDependenceGraph::NodeSet &maybeRemoveMove, POSet &queuedToRemovePo, POSet &maybeRemovePo)
 
void checkMaybeMoves (DataDependenceGraph::NodeSet &maybeRemove, DataDependenceGraph::NodeSet &queuedToRemove, DataDependenceGraph::NodeSet &aliveNodes)
 
void checkAlivePO (POSet &queuedAlivePo, POSet &finishedAlivePo, DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves)
 
void checkAliveMove (DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves, POSet &queuedAlivePo, POSet &finishedAlivePo)
 
void queueAliveMove (MoveNode &mn, POSet &queuedAlivePo, POSet &finishedAlivePo, DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves)
 

Private Attributes

DataDependenceGraph::NodeSet removedMoves_
 
std::set< ProgramOperationPtr, ProgramOperationPtrComparatorremovedPOs_
 

Additional Inherited Members

- Static Public Member Functions inherited from BFOptimization
static void clearPrologMoves ()
 
static MoveNodegetSisterTrigger (const MoveNode &mn, const TTAMachine::Machine &mach)
 
- Protected Member Functions inherited from BFOptimization
DataDependenceGraphddg ()
 
DataDependenceGraphrootDDG ()
 
const DataDependenceGraphddg () const
 
DataDependenceGraphprologDDG ()
 
SimpleResourceManagerrm () const
 
SimpleResourceManagerprologRM () const
 
BUMoveNodeSelectorselector ()
 
const TTAMachine::MachinetargetMachine () const
 
unsigned int ii () const
 
MoveNodeDuplicatorduplicator () 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::RegisterFileRFReadPortCountPreventsScheduling (const MoveNode &mn)
 
bool immCountPreventsScheduling (const MoveNode &mn)
 
- Protected Member Functions inherited from Reversible
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)
 
- Protected Attributes inherited from BFOptimization
BF2Schedulersched_
 
- Protected Attributes inherited from Reversible
std::stack< Reversible * > preChildren_
 
std::stack< Reversible * > postChildren_
 
- Static Protected Attributes inherited from BFOptimization
static std::map< MoveNode *, MoveNode *, MoveNode::ComparatorprologMoves_
 

Detailed Description

Definition at line 4 of file BFRemoveLoopChecks.hh.

Member Typedef Documentation

◆ POSet

Definition at line 13 of file BFRemoveLoopChecks.hh.

Constructor & Destructor Documentation

◆ BFRemoveLoopChecksAndJump()

BFRemoveLoopChecksAndJump::BFRemoveLoopChecksAndJump ( BF2Scheduler sched)
inline

Definition at line 6 of file BFRemoveLoopChecks.hh.

6  :
7  BFOptimization(sched) {}

Member Function Documentation

◆ checkAliveMove()

void BFRemoveLoopChecksAndJump::checkAliveMove ( DataDependenceGraph::NodeSet queuedAliveMoves,
DataDependenceGraph::NodeSet finishedAliveMoves,
POSet queuedAlivePo,
POSet finishedAlivePo 
)
private

Definition at line 157 of file BFRemoveLoopChecks.cc.

160  {
161  MoveNode* mn = *queuedAliveMoves.begin();
162  int ind = ddg().inDegree(*mn);
163  for (int j = 0; j < ind; j++) {
164  DataDependenceEdge& e = ddg().inEdge(*mn,j);
167  continue;
168  }
169  queueAliveMove(ddg().tailNode(e), queuedAlivePo, finishedAlivePo,
170  queuedAliveMoves, finishedAliveMoves);
171  }
172  queuedAliveMoves.erase(mn);
173  finishedAliveMoves.insert(mn);
174 }

References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), and queueAliveMove().

Referenced by operator()().

Here is the call graph for this function:

◆ checkAlivePO()

void BFRemoveLoopChecksAndJump::checkAlivePO ( POSet queuedAlivePo,
POSet finishedAlivePo,
DataDependenceGraph::NodeSet queuedAliveMoves,
DataDependenceGraph::NodeSet finishedAliveMoves 
)
private

Definition at line 105 of file BFRemoveLoopChecks.cc.

108  {
109  ProgramOperationPtr po = *queuedAlivePo.begin();
110  for (int i = 0; i < po->inputMoveCount(); i++) {
111  MoveNode& mn = po->inputMove(i);
112  int ind = ddg().inDegree(mn);
113  for (int j = 0; j < ind; j++) {
114  DataDependenceEdge& e = ddg().inEdge(mn,j);
117  continue;
118  }
119  queueAliveMove(ddg().tailNode(e), queuedAlivePo, finishedAlivePo,
120  queuedAliveMoves, finishedAliveMoves);
121  }
122  }
123  queuedAlivePo.erase(po);
124  finishedAlivePo.insert(po);
125 }

References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), and queueAliveMove().

Referenced by operator()().

Here is the call graph for this function:

◆ checkMaybeMoves()

void BFRemoveLoopChecksAndJump::checkMaybeMoves ( DataDependenceGraph::NodeSet maybeRemove,
DataDependenceGraph::NodeSet queuedToRemove,
DataDependenceGraph::NodeSet aliveNodes 
)
private

Definition at line 289 of file BFRemoveLoopChecks.cc.

292  {
293  MoveNode* mn = *maybeRemove.begin();
294  if (aliveNodes.find(mn) == aliveNodes.end()) {
295  queuedToRemove.insert(mn);
296  }
297  maybeRemove.erase(mn);
298 }

Referenced by operator()().

◆ checkMaybePos()

void BFRemoveLoopChecksAndJump::checkMaybePos ( POSet maybeRemove,
POSet queuedToRemove,
POSet finishedAlivePo 
)
private

Definition at line 281 of file BFRemoveLoopChecks.cc.

281  {
282  ProgramOperationPtr po = *maybeRemove.begin();
283  if (alivePos.find(po) == alivePos.end()) {
284  queuedToRemove.insert(po);
285  }
286  maybeRemove.erase(maybeRemove.begin());
287 }

Referenced by operator()().

◆ operator()()

bool BFRemoveLoopChecksAndJump::operator() ( )
virtual

This performs the operation. Returns true if success, false if fail.

Implements Reversible.

Definition at line 7 of file BFRemoveLoopChecks.cc.

7  {
8 
9  POSet queuedToRemovePo;
10  POSet maybeRemovePo;
11  POSet queuedAlivePo;
12  POSet finishedAlivePo;
13 
14  DataDependenceGraph::NodeSet queuedToRemoveMove;
15  DataDependenceGraph::NodeSet maybeRemoveMove;
16  DataDependenceGraph::NodeSet queuedAliveMoves;
17  DataDependenceGraph::NodeSet finishedAliveMoves;
18 
19  DataDependenceGraph& rootddg = static_cast<DataDependenceGraph&>
20  (*ddg().rootGraph());
21 
22  int count = 0;
23  for (int i = 0; i < ddg().nodeCount(); i++) {
24  MoveNode& mn = ddg().node(i);
25  if (mn.move().isJump()) {
27  queuedToRemovePo.insert(mn.destinationOperationPtr());
28  continue;
29  }
30 
31  // Mark other nodes alive
32  if (mn.isDestinationOperation()) {
34  const Operation& op = po.operation();
35  if (op.hasSideEffects() || op.writesMemory() ||
37  queueAliveMove(mn, queuedAlivePo, finishedAlivePo,
38  queuedAliveMoves, finishedAliveMoves);
39  continue;
40  }
41  }
42 
43  int outd = rootddg.outDegree(mn);
44  for (int j = 0; j < outd; j++) {
45  DataDependenceEdge& e = rootddg.outEdge(mn,j);
48  continue;
49  }
50 
51  // edges out from this BB are considered alive
52  MoveNode& head = rootddg.headNode(e);
53  if (!ddg().hasNode(head)) {
54  queueAliveMove(mn, queuedAlivePo, finishedAlivePo,
55  queuedAliveMoves, finishedAliveMoves);
56  }
57  }
58  }
59 
60  // propagate alive status
61  while (!queuedAlivePo.empty() || !queuedAliveMoves.empty()) {
62  if (!queuedAlivePo.empty()) {
63  checkAlivePO(queuedAlivePo, finishedAlivePo, queuedAliveMoves, finishedAliveMoves);
64  }
65  if (!queuedAliveMoves.empty()) {
66  checkAliveMove(queuedAliveMoves, finishedAliveMoves, queuedAlivePo, finishedAlivePo);
67  }
68  }
69 
70  // then remove POs and movenodes that are not alive
71  while (!queuedToRemovePo.empty() || !maybeRemovePo.empty() ||
72  !queuedToRemoveMove.empty() || !maybeRemoveMove.empty()) {
73  if (!queuedToRemovePo.empty()) {
74  removePoFromQueue(queuedToRemovePo, maybeRemovePo,
75  queuedToRemoveMove, maybeRemoveMove);
76  count++;
77  continue;
78  }
79 
80  if (!queuedToRemoveMove.empty()) {
81  removeMoveFromQueue(queuedToRemoveMove, maybeRemoveMove,
82  queuedToRemovePo, maybeRemovePo);
83  count++;
84  continue;
85  }
86 
87  if (!maybeRemovePo.empty()) {
88  checkMaybePos(maybeRemovePo, queuedToRemovePo, finishedAlivePo);
89  }
90 
91  if (!maybeRemoveMove.empty()) {
92  checkMaybeMoves(maybeRemoveMove, queuedToRemoveMove, finishedAliveMoves);
93  }
94  }
95  for (auto i: removedPOs_) {
97  }
98 
99 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
100  std::cerr << "count of removed POs: " << count << std::endl;
101 #endif
102  return count!=0;
103 }

References assert, checkAliveMove(), checkAlivePO(), checkMaybeMoves(), checkMaybePos(), BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), MoveNode::destinationOperation(), MoveNode::destinationOperationCount(), MoveNode::destinationOperationPtr(), DataDependenceGraph::dropProgramOperation(), Operation::hasSideEffects(), BoostGraph< GraphNode, GraphEdge >::headNode(), Operation::isControlFlowOperation(), MoveNode::isDestinationOperation(), TTAProgram::Move::isJump(), MoveNode::move(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), ProgramOperation::operation(), BoostGraph< GraphNode, GraphEdge >::outDegree(), BoostGraph< GraphNode, GraphEdge >::outEdge(), queueAliveMove(), removedPOs_, removeMoveFromQueue(), removePoFromQueue(), BoostGraph< GraphNode, GraphEdge >::rootGraph(), and Operation::writesMemory().

Here is the call graph for this function:

◆ queueAliveMove()

void BFRemoveLoopChecksAndJump::queueAliveMove ( MoveNode mn,
POSet queuedAlivePo,
POSet finishedAlivePo,
DataDependenceGraph::NodeSet queuedAliveMoves,
DataDependenceGraph::NodeSet finishedAliveMoves 
)
private

Definition at line 127 of file BFRemoveLoopChecks.cc.

131  {
132 
133  if (mn.isSourceOperation()) {
134  if (finishedAlivePo.find(mn.sourceOperationPtr()) == finishedAlivePo.end()) {
135 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
136  std::cerr << "alive PO: " << mn.toString() << std::endl;
137 #endif
138  queuedAlivePo.insert(mn.sourceOperationPtr());
139  }
140  } else if (mn.isDestinationOperation()) {
141  if (finishedAlivePo.find(mn.destinationOperationPtr()) == finishedAlivePo.end()) {
142 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
143  std::cerr << "alive PO: " << mn.toString() << std::endl;
144 #endif
145  queuedAlivePo.insert(mn.destinationOperationPtr());
146  }
147  } else {
148  if (finishedAliveMoves.find(&mn) == finishedAliveMoves.end()) {
149 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
150  std::cerr << "alive MN: " << mn.toString() << std::endl;
151 #endif
152  queuedAliveMoves.insert(&mn);
153  }
154  }
155 }

References MoveNode::destinationOperationPtr(), MoveNode::isDestinationOperation(), MoveNode::isSourceOperation(), MoveNode::sourceOperationPtr(), and MoveNode::toString().

Referenced by checkAliveMove(), checkAlivePO(), and operator()().

Here is the call graph for this function:

◆ removeMoveFromQueue()

void BFRemoveLoopChecksAndJump::removeMoveFromQueue ( DataDependenceGraph::NodeSet queuedToRemoveMove,
DataDependenceGraph::NodeSet maybeRemoveMove,
POSet queuedToRemovePo,
POSet maybeRemovePo 
)
private

Definition at line 234 of file BFRemoveLoopChecks.cc.

237  {
238  MoveNode* mn = *queuedToRemoveMove.begin();
239 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
240  std::cerr << "\tRemoving move: " << mn->toString()
241  << std::endl;
242 #endif
243  int ind = ddg().inDegree(*mn);
244  for (int j = 0; j < ind; j++) {
245  DataDependenceEdge& e = ddg().inEdge(*mn,j);
248  continue;
249  }
250  MoveNode& tail = ddg().tailNode(e);
251  if (!tail.isSourceOperation()) {
252  if (tail.isDestinationOperation()) {
254  // if already is to be remoed, no need to put tho
255  // checking queue again
256  if (queuedToRemovePo.find(tailOp) == queuedToRemovePo.end()) {
257  maybeRemovePo.insert(tailOp);
258  }
259  } else {
260  if (queuedToRemoveMove.find(&tail) == queuedToRemoveMove.end()) {
261  maybeRemoveMove.insert(&tail);
262  }
263  }
264  } else {
265  ProgramOperationPtr tailOp = tail.sourceOperationPtr();
266  // if already is to be remoed, no need to put tho
267  // checking queue again
268  if (queuedToRemovePo.find(tailOp) == queuedToRemovePo.end()) {
269  maybeRemovePo.insert(tailOp);
270  }
271  }
272  }
273  ddg().dropNode(*mn);
274  removedMoves_.insert(mn);
275 
276  // TODO: remove the PO from the ddg!
277  removedMoves_.insert(mn);
278  queuedToRemoveMove.erase(queuedToRemoveMove.begin());
279 }

References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), MoveNode::destinationOperationPtr(), BoostGraph< GraphNode, GraphEdge >::dropNode(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), MoveNode::isDestinationOperation(), MoveNode::isSourceOperation(), removedMoves_, MoveNode::sourceOperationPtr(), BoostGraph< GraphNode, GraphEdge >::tailNode(), and MoveNode::toString().

Referenced by operator()().

Here is the call graph for this function:

◆ removePoFromQueue()

void BFRemoveLoopChecksAndJump::removePoFromQueue ( POSet queuedToRemovePo,
POSet maybeRemovePo,
DataDependenceGraph::NodeSet queuedToRemoveMove,
DataDependenceGraph::NodeSet maybeRemoveMove 
)
private

Definition at line 180 of file BFRemoveLoopChecks.cc.

183  {
184  ProgramOperationPtr po = *queuedToRemovePo.begin();
185 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
186  std::cerr << "Removing programoperation: " << po->toString()
187  << std::endl;
188 #endif
189  for (int i = 0; i < po->inputMoveCount(); i++) {
190  MoveNode& mn = po->inputMove(i);
191  int ind = ddg().inDegree(mn);
192  for (int j = 0; j < ind; j++) {
193  DataDependenceEdge& e = ddg().inEdge(mn,j);
196  continue;
197  }
198  MoveNode& tail = ddg().tailNode(e);
199  if (!tail.isSourceOperation()) {
200  if (tail.isDestinationOperation()) {
202  if (queuedToRemovePo.find(tailOp) == queuedToRemovePo.end()) {
203  maybeRemovePo.insert(tailOp);
204  }
205  } else {
206  if (queuedToRemoveMove.find(&tail) == queuedToRemoveMove.end()) {
207  maybeRemoveMove.insert(&tail);
208  }
209  }
210  } else {
211  ProgramOperationPtr tailOp = tail.sourceOperationPtr();
212  // if already is to be remoed, no need to put tho
213  // checking queue again
214  if (queuedToRemovePo.find(tailOp) == queuedToRemovePo.end()) {
215  maybeRemovePo.insert(tailOp);
216  }
217  }
218  }
219  ddg().dropNode(mn);
220  removedMoves_.insert(&mn);
221  }
222 
223  for (int i = 0; i < po->outputMoveCount(); i++) {
224  MoveNode& mn = po->outputMove(i);
225  ddg().dropNode(mn);
226  removedMoves_.insert(&mn);
227  }
228 
229  // TODO: remove the PO from the ddg!
230  removedPOs_.insert(po);
231  queuedToRemovePo.erase(queuedToRemovePo.begin());
232 }

References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), MoveNode::destinationOperationPtr(), BoostGraph< GraphNode, GraphEdge >::dropNode(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), MoveNode::isDestinationOperation(), MoveNode::isSourceOperation(), removedMoves_, removedPOs_, MoveNode::sourceOperationPtr(), and BoostGraph< GraphNode, GraphEdge >::tailNode().

Referenced by operator()().

Here is the call graph for this function:

◆ undoOnlyMe()

void BFRemoveLoopChecksAndJump::undoOnlyMe ( )
virtual

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 301 of file BFRemoveLoopChecks.cc.

301  {
302  for (auto i: removedMoves_) {
303 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
304  std::cerr << "Restoring node: " << (*i).toString() << std::endl;
305 #endif
307  }
308  removedMoves_.clear();
309 
310  for (auto i: removedPOs_) {
312  }
313 }

References DataDependenceGraph::addProgramOperation(), BFOptimization::ddg(), removedMoves_, removedPOs_, and BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent().

Here is the call graph for this function:

Member Data Documentation

◆ removedMoves_

DataDependenceGraph::NodeSet BFRemoveLoopChecksAndJump::removedMoves_
private

Definition at line 48 of file BFRemoveLoopChecks.hh.

Referenced by removeMoveFromQueue(), removePoFromQueue(), and undoOnlyMe().

◆ removedPOs_

std::set<ProgramOperationPtr, ProgramOperationPtrComparator> BFRemoveLoopChecksAndJump::removedPOs_
private

Definition at line 49 of file BFRemoveLoopChecks.hh.

Referenced by operator()(), removePoFromQueue(), and undoOnlyMe().


The documentation for this class was generated from the following files:
ProgramOperation::operation
const Operation & operation() const
Definition: ProgramOperation.cc:590
BoostGraph::outEdge
virtual Edge & outEdge(const Node &node, const int index) const
Operation::writesMemory
virtual bool writesMemory() const
Definition: Operation.cc:252
BFRemoveLoopChecksAndJump::checkAliveMove
void checkAliveMove(DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves, POSet &queuedAlivePo, POSet &finishedAlivePo)
Definition: BFRemoveLoopChecks.cc:157
BoostGraph::tailNode
virtual Node & tailNode(const Edge &edge) const
MoveNode::toString
std::string toString() const
Definition: MoveNode.cc:576
Operation::hasSideEffects
virtual bool hasSideEffects() const
Definition: Operation.cc:272
BFRemoveLoopChecksAndJump::checkMaybePos
void checkMaybePos(POSet &maybeRemove, POSet &queuedToRemove, POSet &finishedAlivePo)
Definition: BFRemoveLoopChecks.cc:281
BoostGraph::headNode
virtual Node & headNode(const Edge &edge) const
BoostGraph::node
Node & node(const int index) const
MoveNode::isDestinationOperation
bool isDestinationOperation() const
BoostGraph< MoveNode, DataDependenceEdge >::NodeSet
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
Definition: BoostGraph.hh:86
BFRemoveLoopChecksAndJump::queueAliveMove
void queueAliveMove(MoveNode &mn, POSet &queuedAlivePo, POSet &finishedAlivePo, DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves)
Definition: BFRemoveLoopChecks.cc:127
DataDependenceGraph::addProgramOperation
void addProgramOperation(ProgramOperationPtr po)
Definition: DataDependenceGraph.cc:298
BFRemoveLoopChecksAndJump::removeMoveFromQueue
void removeMoveFromQueue(DataDependenceGraph::NodeSet &queuedToRemoveMove, DataDependenceGraph::NodeSet &maybeRemoveMove, POSet &queuedToRemovePo, POSet &maybeRemovePo)
Definition: BFRemoveLoopChecks.cc:234
ProgramOperation
Definition: ProgramOperation.hh:70
MoveNode
Definition: MoveNode.hh:65
BFRemoveLoopChecksAndJump::removePoFromQueue
void removePoFromQueue(POSet &queuedToRemovePo, POSet &maybeRemovePo, DataDependenceGraph::NodeSet &queuedToRemoveMove, DataDependenceGraph::NodeSet &maybeRemoveMove)
Definition: BFRemoveLoopChecks.cc:180
DataDependenceEdge::dependenceType
DependenceType dependenceType() const
Definition: DataDependenceEdge.hh:88
BFRemoveLoopChecksAndJump::removedPOs_
std::set< ProgramOperationPtr, ProgramOperationPtrComparator > removedPOs_
Definition: BFRemoveLoopChecks.hh:49
BoostGraph::dropNode
virtual void dropNode(Node &node)
ProgramOperationPtr
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition: MoveNode.hh:52
BoostGraph::outDegree
virtual int outDegree(const Node &node) const
assert
#define assert(condition)
Definition: Application.hh:86
BFRemoveLoopChecksAndJump::removedMoves_
DataDependenceGraph::NodeSet removedMoves_
Definition: BFRemoveLoopChecks.hh:48
BoostGraph::rootGraph
BoostGraph * rootGraph()
BoostGraph::inEdge
virtual Edge & inEdge(const Node &node, const int index) const
MoveNode::isSourceOperation
bool isSourceOperation() const
Definition: MoveNode.cc:168
BFOptimization::ddg
DataDependenceGraph & ddg()
Definition: BFOptimization.cc:70
MoveNode::destinationOperationCount
unsigned int destinationOperationCount() const
BoostGraph::inDegree
virtual int inDegree(const Node &node) const
DataDependenceEdge::DEP_WAW
@ DEP_WAW
Definition: DataDependenceEdge.hh:49
Operation
Definition: Operation.hh:59
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75
BFRemoveLoopChecksAndJump::checkAlivePO
void checkAlivePO(POSet &queuedAlivePo, POSet &finishedAlivePo, DataDependenceGraph::NodeSet &queuedAliveMoves, DataDependenceGraph::NodeSet &finishedAliveMoves)
Definition: BFRemoveLoopChecks.cc:105
MoveNode::destinationOperation
ProgramOperation & destinationOperation(unsigned int index=0) const
MoveNode::destinationOperationPtr
ProgramOperationPtr destinationOperationPtr(unsigned int index=0) const
MoveNode::move
TTAProgram::Move & move()
DataDependenceGraph
Definition: DataDependenceGraph.hh:67
MoveNode::sourceOperationPtr
ProgramOperationPtr sourceOperationPtr() const
Definition: MoveNode.cc:458
DataDependenceEdge
Definition: DataDependenceEdge.hh:43
TTAProgram::Move::isJump
bool isJump() const
Definition: Move.cc:164
DataDependenceEdge::DEP_WAR
@ DEP_WAR
Definition: DataDependenceEdge.hh:48
BoostGraph::nodeCount
int nodeCount() const
BFRemoveLoopChecksAndJump::checkMaybeMoves
void checkMaybeMoves(DataDependenceGraph::NodeSet &maybeRemove, DataDependenceGraph::NodeSet &queuedToRemove, DataDependenceGraph::NodeSet &aliveNodes)
Definition: BFRemoveLoopChecks.cc:289
Operation::isControlFlowOperation
virtual bool isControlFlowOperation() const
Definition: Operation.cc:294
DataDependenceGraph::dropProgramOperation
void dropProgramOperation(ProgramOperationPtr po)
Definition: DataDependenceGraph.cc:361
BoostGraph::restoreNodeFromParent
void restoreNodeFromParent(GraphNode &node)
BFRemoveLoopChecksAndJump::POSet
std::set< ProgramOperationPtr, ProgramOperationPtrComparator > POSet
Definition: BFRemoveLoopChecks.hh:13