OpenASIP  2.0
Public Member Functions | Protected Attributes | List of all members
BFKillNode Class Reference

#include <BFKillNode.hh>

Inheritance diagram for BFKillNode:
Inheritance graph
Collaboration diagram for BFKillNode:
Collaboration graph

Public Member Functions

 BFKillNode (BF2Scheduler &sched, MoveNode &mn)
 
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 ()
 

Protected Attributes

DataDependenceGraph::EdgeSet createdEdges_
 
MoveNodemn_
 
- Protected Attributes inherited from BFOptimization
BF2Schedulersched_
 
- Protected Attributes inherited from Reversible
std::stack< Reversible * > preChildren_
 
std::stack< Reversible * > postChildren_
 

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)
 
- Static Protected Attributes inherited from BFOptimization
static std::map< MoveNode *, MoveNode *, MoveNode::ComparatorprologMoves_
 

Detailed Description

Definition at line 44 of file BFKillNode.hh.

Constructor & Destructor Documentation

◆ BFKillNode()

BFKillNode::BFKillNode ( BF2Scheduler sched,
MoveNode mn 
)
inline

Definition at line 46 of file BFKillNode.hh.

46  :
47  BFOptimization(sched), mn_(mn) {}

Member Function Documentation

◆ operator()()

bool BFKillNode::operator() ( )
virtual

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

Implements Reversible.

Reimplemented in BFPostpassDRE.

Definition at line 42 of file BFKillNode.cc.

42  {
43  ddg().dropNode(mn_);
45  return true;
46 }

References BFOptimization::ddg(), BoostGraph< GraphNode, GraphEdge >::dropNode(), mn_, BF2Scheduler::nodeKilled(), and BFOptimization::sched_.

Here is the call graph for this function:

◆ undoOnlyMe()

void BFKillNode::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 49 of file BFKillNode.cc.

49  {
50 
51  for (auto e: createdEdges_) {
52  ddg().removeEdge(*e);
53  }
54 
57 }

References createdEdges_, BFOptimization::ddg(), mn_, BF2Scheduler::nodeResurrected(), BoostGraph< GraphNode, GraphEdge >::removeEdge(), BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent(), and BFOptimization::sched_.

Referenced by BFDRELoop::undoOnlyMe().

Here is the call graph for this function:

Member Data Documentation

◆ createdEdges_

DataDependenceGraph::EdgeSet BFKillNode::createdEdges_
protected

◆ mn_

MoveNode& BFKillNode::mn_
protected

The documentation for this class was generated from the following files:
BoostGraph::removeEdge
virtual void removeEdge(Edge &e)
BFKillNode::createdEdges_
DataDependenceGraph::EdgeSet createdEdges_
Definition: BFKillNode.hh:51
BoostGraph::dropNode
virtual void dropNode(Node &node)
BFOptimization::sched_
BF2Scheduler & sched_
Definition: BFOptimization.hh:103
BFOptimization::ddg
DataDependenceGraph & ddg()
Definition: BFOptimization.cc:70
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75
BF2Scheduler::nodeResurrected
void nodeResurrected(MoveNode &mn)
Definition: BF2Scheduler.cc:811
BFKillNode::mn_
MoveNode & mn_
Definition: BFKillNode.hh:52
BF2Scheduler::nodeKilled
void nodeKilled(MoveNode &mn)
Definition: BF2Scheduler.cc:807
BoostGraph::restoreNodeFromParent
void restoreNodeFromParent(GraphNode &node)