OpenASIP
2.0
|
#include <BFRemoveLoopChecks.hh>
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, ProgramOperationPtrComparator > | POSet |
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, ProgramOperationPtrComparator > | removedPOs_ |
Additional Inherited Members | |
Static Public Member Functions inherited from BFOptimization | |
static void | clearPrologMoves () |
static MoveNode * | getSisterTrigger (const MoveNode &mn, const TTAMachine::Machine &mach) |
Protected Member Functions inherited from BFOptimization | |
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) |
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 | |
BF2Scheduler & | sched_ |
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::Comparator > | prologMoves_ |
Definition at line 4 of file BFRemoveLoopChecks.hh.
|
private |
Definition at line 13 of file BFRemoveLoopChecks.hh.
|
inline |
Definition at line 6 of file BFRemoveLoopChecks.hh.
|
private |
Definition at line 157 of file BFRemoveLoopChecks.cc.
References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), and queueAliveMove().
Referenced by operator()().
|
private |
Definition at line 105 of file BFRemoveLoopChecks.cc.
References BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), BoostGraph< GraphNode, GraphEdge >::inDegree(), BoostGraph< GraphNode, GraphEdge >::inEdge(), and queueAliveMove().
Referenced by operator()().
|
private |
|
private |
|
virtual |
This performs the operation. Returns true if success, false if fail.
Implements Reversible.
Definition at line 7 of file BFRemoveLoopChecks.cc.
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().
|
private |
Definition at line 127 of file BFRemoveLoopChecks.cc.
References MoveNode::destinationOperationPtr(), MoveNode::isDestinationOperation(), MoveNode::isSourceOperation(), MoveNode::sourceOperationPtr(), and MoveNode::toString().
Referenced by checkAliveMove(), checkAlivePO(), and operator()().
|
private |
Definition at line 234 of file BFRemoveLoopChecks.cc.
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()().
|
private |
Definition at line 180 of file BFRemoveLoopChecks.cc.
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()().
|
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.
References DataDependenceGraph::addProgramOperation(), BFOptimization::ddg(), removedMoves_, removedPOs_, and BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent().
|
private |
Definition at line 48 of file BFRemoveLoopChecks.hh.
Referenced by removeMoveFromQueue(), removePoFromQueue(), and undoOnlyMe().
|
private |
Definition at line 49 of file BFRemoveLoopChecks.hh.
Referenced by operator()(), removePoFromQueue(), and undoOnlyMe().