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

#include <BFRemoveEdge.hh>

Inheritance diagram for BFRemoveEdge:
Inheritance graph
Collaboration diagram for BFRemoveEdge:
Collaboration graph

Public Member Functions

 BFRemoveEdge (BF2Scheduler &sched, MoveNode &nTail, MoveNode &nHead, DataDependenceEdge &e)
 
bool operator() () override
 
void undoOnlyMe () override
 
virtual ~BFRemoveEdge ()
 
- 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

DataDependenceEdgee_
 
MoveNodenTail_
 
MoveNodenHead_
 

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 40 of file BFRemoveEdge.hh.

Constructor & Destructor Documentation

◆ BFRemoveEdge()

BFRemoveEdge::BFRemoveEdge ( BF2Scheduler sched,
MoveNode nTail,
MoveNode nHead,
DataDependenceEdge e 
)

Definition at line 36 of file BFRemoveEdge.cc.

39  :
40  BFOptimization(sched), e_(e), nTail_(nTail), nHead_(nHead) {}

◆ ~BFRemoveEdge()

BFRemoveEdge::~BFRemoveEdge ( )
virtual

Definition at line 65 of file BFRemoveEdge.cc.

65 {}

Member Function Documentation

◆ operator()()

bool BFRemoveEdge::operator() ( )
overridevirtual

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

Implements Reversible.

Definition at line 42 of file BFRemoveEdge.cc.

42  {
43 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
44  std::cerr << "\t\t\t\tRemoving edge: " << e_.toString()
45  << " from: "<< nTail_.toString()
46  << " to: " << nHead_.toString() << std::endl;
47 #endif
48  ddg().rootGraph()->removeEdge(e_);
49  return true;
50 }

References BFOptimization::ddg(), e_, nHead_, nTail_, BoostGraph< GraphNode, GraphEdge >::removeEdge(), BoostGraph< GraphNode, GraphEdge >::rootGraph(), DataDependenceEdge::toString(), and MoveNode::toString().

Here is the call graph for this function:

◆ undoOnlyMe()

void BFRemoveEdge::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 52 of file BFRemoveEdge.cc.

52  {
53 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
54  std::cerr << "\t\t\t\tRestoring edge: " << e_.toString()
55  << " from: " << nTail_.toString()
56  << " to: " << nHead_.toString() << std::endl;
57 #endif
58 
60 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
61  std::cerr << "\t\t\t\tRestored edge." << std::endl;
62 #endif
63 }

References BoostGraph< GraphNode, GraphEdge >::connectNodes(), BFOptimization::ddg(), e_, nHead_, nTail_, BoostGraph< GraphNode, GraphEdge >::rootGraph(), DataDependenceEdge::toString(), and MoveNode::toString().

Here is the call graph for this function:

Member Data Documentation

◆ e_

DataDependenceEdge& BFRemoveEdge::e_
private

Definition at line 53 of file BFRemoveEdge.hh.

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

◆ nHead_

MoveNode& BFRemoveEdge::nHead_
private

Definition at line 55 of file BFRemoveEdge.hh.

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

◆ nTail_

MoveNode& BFRemoveEdge::nTail_
private

Definition at line 54 of file BFRemoveEdge.hh.

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


The documentation for this class was generated from the following files:
BFRemoveEdge::nHead_
MoveNode & nHead_
Definition: BFRemoveEdge.hh:55
BoostGraph::connectNodes
virtual void connectNodes(const Node &nTail, const Node &nHead, Edge &e)
BoostGraph::removeEdge
virtual void removeEdge(Edge &e)
MoveNode::toString
std::string toString() const
Definition: MoveNode.cc:576
BFRemoveEdge::nTail_
MoveNode & nTail_
Definition: BFRemoveEdge.hh:54
BFRemoveEdge::e_
DataDependenceEdge & e_
Definition: BFRemoveEdge.hh:53
BoostGraph::rootGraph
BoostGraph * rootGraph()
DataDependenceEdge::toString
TCEString toString() const
Definition: DataDependenceEdge.cc:201
BFOptimization::ddg
DataDependenceGraph & ddg()
Definition: BFOptimization.cc:70
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75