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

#include <BFConnectNodes.hh>

Inheritance diagram for BFConnectNodes:
Inheritance graph
Collaboration diagram for BFConnectNodes:
Collaboration graph

Public Member Functions

 BFConnectNodes (BF2Scheduler &sched, const MoveNode &tail, const MoveNode &head, DataDependenceEdge *e, bool copyEdge=false)
 
bool operator() () override
 
void undoOnlyMe () override
 
virtual ~BFConnectNodes ()
 
- 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 Attributes

const MoveNodetail_
 
const MoveNodehead_
 
DataDependenceEdgeedge_
 
bool copyEdge_
 

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 38 of file BFConnectNodes.hh.

Constructor & Destructor Documentation

◆ BFConnectNodes()

BFConnectNodes::BFConnectNodes ( BF2Scheduler sched,
const MoveNode tail,
const MoveNode head,
DataDependenceEdge e,
bool  copyEdge = false 
)

Definition at line 36 of file BFConnectNodes.cc.

40  :
41  BFOptimization(sched),
42  tail_(tail),
43  head_(head),
44  edge_(e),
45  copyEdge_(copyEdge) {}

◆ ~BFConnectNodes()

virtual BFConnectNodes::~BFConnectNodes ( )
inlinevirtual

Definition at line 51 of file BFConnectNodes.hh.

51 {}

Member Function Documentation

◆ operator()()

bool BFConnectNodes::operator() ( )
overridevirtual

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

Implements Reversible.

Definition at line 47 of file BFConnectNodes.cc.

47  {
48 
49 
50  if (copyEdge_) {
52  }
53 
55  return true;
56 }

References BoostGraph< GraphNode, GraphEdge >::connectNodes(), copyEdge_, BFOptimization::ddg(), edge_, head_, BoostGraph< GraphNode, GraphEdge >::rootGraph(), and tail_.

Here is the call graph for this function:

◆ undoOnlyMe()

void BFConnectNodes::undoOnlyMe ( )
overridevirtual

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 58 of file BFConnectNodes.cc.

58  {
59 
61 }

References BFOptimization::ddg(), edge_, BoostGraph< GraphNode, GraphEdge >::removeEdge(), and BoostGraph< GraphNode, GraphEdge >::rootGraph().

Here is the call graph for this function:

Member Data Documentation

◆ copyEdge_

bool BFConnectNodes::copyEdge_
private

Definition at line 56 of file BFConnectNodes.hh.

Referenced by operator()().

◆ edge_

DataDependenceEdge* BFConnectNodes::edge_
private

Definition at line 55 of file BFConnectNodes.hh.

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

◆ head_

const MoveNode& BFConnectNodes::head_
private

Definition at line 54 of file BFConnectNodes.hh.

Referenced by operator()().

◆ tail_

const MoveNode& BFConnectNodes::tail_
private

Definition at line 53 of file BFConnectNodes.hh.

Referenced by operator()().


The documentation for this class was generated from the following files:
BoostGraph::connectNodes
virtual void connectNodes(const Node &nTail, const Node &nHead, Edge &e)
BoostGraph::removeEdge
virtual void removeEdge(Edge &e)
BFConnectNodes::tail_
const MoveNode & tail_
Definition: BFConnectNodes.hh:53
BFConnectNodes::head_
const MoveNode & head_
Definition: BFConnectNodes.hh:54
BFConnectNodes::edge_
DataDependenceEdge * edge_
Definition: BFConnectNodes.hh:55
BoostGraph::rootGraph
BoostGraph * rootGraph()
BFOptimization::ddg
DataDependenceGraph & ddg()
Definition: BFOptimization.cc:70
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75
BFConnectNodes::copyEdge_
bool copyEdge_
Definition: BFConnectNodes.hh:56
DataDependenceEdge
Definition: DataDependenceEdge.hh:43