OpenASIP  2.0
Public Member Functions | Protected Attributes | List of all members
SoftwareBypasser Class Referenceabstract

#include <SoftwareBypasser.hh>

Inheritance diagram for SoftwareBypasser:
Inheritance graph
Collaboration diagram for SoftwareBypasser:
Collaboration graph

Public Member Functions

 SoftwareBypasser ()
 
virtual ~SoftwareBypasser ()
 
virtual int bypass (MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, bool bypassTrigger)=0
 
virtual int bypassNode (MoveNode &moveNode, int &lastOperandCycle, DataDependenceGraph &ddg, ResourceManager &rm)=0
 
virtual void removeBypass (MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm)=0
 
virtual void removeBypass (MoveNode &moveNode, DataDependenceGraph &ddg, ResourceManager &rm, bool restoreSource=true)=0
 
virtual int removeDeadResults (MoveNodeGroup &candidates, DataDependenceGraph &ddg, ResourceManager &rm, std::set< std::pair< TTAProgram::Move *, int > > &removedMoves)=0
 
virtual void setSelector (MoveNodeSelector *selector)
 
virtual void clearCaches (DataDependenceGraph &ddg, bool removeDeadResults)=0
 
int bypassCount ()
 
int deadResultCount ()
 

Protected Attributes

int bypassCount_
 
int deadResultCount_
 

Detailed Description

Classes that implement this interface are able to software bypass moves.

Definition at line 52 of file SoftwareBypasser.hh.

Constructor & Destructor Documentation

◆ SoftwareBypasser()

SoftwareBypasser::SoftwareBypasser ( )

Empty constructor.

Definition at line 42 of file SoftwareBypasser.cc.

43 }

◆ ~SoftwareBypasser()

SoftwareBypasser::~SoftwareBypasser ( )
virtual

Empty destructor.

Definition at line 48 of file SoftwareBypasser.cc.

48  {
49 }

Member Function Documentation

◆ bypass()

int SoftwareBypasser::bypass ( MoveNodeGroup candidates,
DataDependenceGraph ddg,
ResourceManager rm,
bool  bypassTrigger 
)
pure virtual

Apply software bypassing to as many moves in the given MoveNodeGroup as possible.

The given DDG can be used to inspect whether software bypassing is possible.

Parameters
candidatesThe moves to which apply software bypassing, if possible.
ddgThe data dependence grap in which the movenodes belong to.
rmThe resource manager which is used to check for resource availability.
bypassTriggerwhether to bypass the trigger or not.
Returns
The count of bypassed moves.

Implemented in CycleLookBackSoftwareBypasser.

Definition at line 65 of file SoftwareBypasser.cc.

69  {
70 
71  // use the arguments just to avoid compiler warnings with strict flags
72  candidates.nodeCount();
73  ddg.nodeCount();
74  rm.machine();
75  return 0;
76 }

References ResourceManager::machine(), MoveNodeGroup::nodeCount(), and BoostGraph< GraphNode, GraphEdge >::nodeCount().

Referenced by BasicBlockScheduler::scheduleOperation().

Here is the call graph for this function:

◆ bypassCount()

int SoftwareBypasser::bypassCount ( )
inline

Definition at line 89 of file SoftwareBypasser.hh.

89 { return bypassCount_; }

References bypassCount_.

◆ bypassNode()

virtual int SoftwareBypasser::bypassNode ( MoveNode moveNode,
int &  lastOperandCycle,
DataDependenceGraph ddg,
ResourceManager rm 
)
pure virtual

◆ clearCaches()

virtual void SoftwareBypasser::clearCaches ( DataDependenceGraph ddg,
bool  removeDeadResults 
)
pure virtual

◆ deadResultCount()

int SoftwareBypasser::deadResultCount ( )
inline

Definition at line 90 of file SoftwareBypasser.hh.

90 { return deadResultCount_; }

References deadResultCount_.

◆ removeBypass() [1/2]

virtual void SoftwareBypasser::removeBypass ( MoveNode moveNode,
DataDependenceGraph ddg,
ResourceManager rm,
bool  restoreSource = true 
)
pure virtual

◆ removeBypass() [2/2]

void SoftwareBypasser::removeBypass ( MoveNodeGroup candidates,
DataDependenceGraph ddg,
ResourceManager rm 
)
pure virtual

Remove software bypassing from as many moves in the given MoveNodeGroup as possible.

Parameters
candidatesThe moves from which to remove software bypassing, if possible.
ddgThe data dependence grap in which the movenodes belong to.
rmThe resource manager which is used to check for resource availability.

Implemented in CycleLookBackSoftwareBypasser.

Definition at line 89 of file SoftwareBypasser.cc.

92  {
93 
94  // use the arguments just to avoid compiler warnings with strict flags
95  candidates.nodeCount();
96  ddg.nodeCount();
97  rm.machine();
98  return;
99 }

References ResourceManager::machine(), MoveNodeGroup::nodeCount(), and BoostGraph< GraphNode, GraphEdge >::nodeCount().

Referenced by BasicBlockScheduler::handleDDG(), BasicBlockScheduler::scheduleOperation(), and BasicBlockScheduler::unscheduleAllNodes().

Here is the call graph for this function:

◆ removeDeadResults()

int SoftwareBypasser::removeDeadResults ( MoveNodeGroup candidates,
DataDependenceGraph ddg,
ResourceManager rm,
std::set< std::pair< TTAProgram::Move *, int > > &  removedMoves 
)
pure virtual

Remove dead result moves for each bypassed move of given MoveNodeGroup if possible. That is, no other result reads of result exists. This assumes that result moves in MoveNodeGroup are also scheduled.

Parameters
candidatesThe moves for which remove dead result writes
ddgThe data dependence grap in which the movenodes belong to.
rmThe resource manager which is used to check for resource availability.
removedMovesThe dead result eliminated moves and their original cycles, to allow rescheduling of moves that were previously resource (RF write port usually) constrained by the removed moves.
Returns
number of dead results killed

Implemented in CycleLookBackSoftwareBypasser.

Definition at line 116 of file SoftwareBypasser.cc.

120  {
121 
122  // use the arguments just to avoid compiler warnings with strict flags
123  candidates.nodeCount();
124  ddg.nodeCount();
125  rm.machine();
126  removedMoves.begin();
127  return 0;
128 }

References ResourceManager::machine(), MoveNodeGroup::nodeCount(), and BoostGraph< GraphNode, GraphEdge >::nodeCount().

Referenced by BasicBlockScheduler::handleDDG(), and BasicBlockScheduler::scheduleOperation().

Here is the call graph for this function:

◆ setSelector()

void SoftwareBypasser::setSelector ( MoveNodeSelector selector)
virtual

Reimplemented in CycleLookBackSoftwareBypasser.

Definition at line 143 of file SoftwareBypasser.cc.

143  {
144 }

Referenced by BasicBlockScheduler::handleDDG(), and BasicBlockScheduler::handleLoopDDG().

Member Data Documentation

◆ bypassCount_

int SoftwareBypasser::bypassCount_
protected

Definition at line 92 of file SoftwareBypasser.hh.

Referenced by bypassCount().

◆ deadResultCount_

int SoftwareBypasser::deadResultCount_
protected

Definition at line 93 of file SoftwareBypasser.hh.

Referenced by deadResultCount().


The documentation for this class was generated from the following files:
SoftwareBypasser::deadResultCount_
int deadResultCount_
Definition: SoftwareBypasser.hh:93
MoveNodeGroup::nodeCount
int nodeCount() const
Definition: MoveNodeGroup.cc:140
SoftwareBypasser::bypassCount_
int bypassCount_
Definition: SoftwareBypasser.hh:92
ResourceManager::machine
const TTAMachine::Machine & machine() const
Definition: ResourceManager.cc:56
BoostGraph::nodeCount
int nodeCount() const