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

#include <BFAssignToBody.hh>

Inheritance diagram for BFAssignToBody:
Inheritance graph
Collaboration diagram for BFAssignToBody:
Collaboration graph

Public Member Functions

 BFAssignToBody (BF2Scheduler &sched, MoveNode &mn, int cycle, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU)
 
bool operator() () override
 
void undoOnlyMe () override
 
- 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

MoveNodemn_
 
int cycle_
 
const TTAMachine::FunctionUnitsrcFU_
 
const TTAMachine::FunctionUnitdstFU_
 

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 42 of file BFAssignToBody.hh.

Constructor & Destructor Documentation

◆ BFAssignToBody()

BFAssignToBody::BFAssignToBody ( BF2Scheduler sched,
MoveNode mn,
int  cycle,
const TTAMachine::FunctionUnit srcFU,
const TTAMachine::FunctionUnit dstFU 
)
inline

Definition at line 44 of file BFAssignToBody.hh.

46  :
47  BFOptimization(sched), mn_(mn), cycle_(cycle), srcFU_(srcFU),
48  dstFU_(dstFU) {}

Member Function Documentation

◆ operator()()

bool BFAssignToBody::operator() ( )
overridevirtual

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

Implements Reversible.

Definition at line 41 of file BFAssignToBody.cc.

41  {
42  if (!rm().canAssign(cycle_, mn_, nullptr, srcFU_, dstFU_)) {
43  return false;
44  }
45  rm().assign(cycle_, mn_, nullptr, srcFU_, dstFU_);
46  return true;
47 }

References SimpleResourceManager::assign(), BFOptimization::canAssign(), cycle_, dstFU_, mn_, BFOptimization::rm(), and srcFU_.

Here is the call graph for this function:

◆ undoOnlyMe()

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

49  {
50  rm().unassign(mn_);
51 }

References mn_, BFOptimization::rm(), and SimpleResourceManager::unassign().

Here is the call graph for this function:

Member Data Documentation

◆ cycle_

int BFAssignToBody::cycle_
private

Definition at line 53 of file BFAssignToBody.hh.

Referenced by operator()().

◆ dstFU_

const TTAMachine::FunctionUnit* BFAssignToBody::dstFU_
private

Definition at line 55 of file BFAssignToBody.hh.

Referenced by operator()().

◆ mn_

MoveNode& BFAssignToBody::mn_
private

Definition at line 52 of file BFAssignToBody.hh.

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

◆ srcFU_

const TTAMachine::FunctionUnit* BFAssignToBody::srcFU_
private

Definition at line 54 of file BFAssignToBody.hh.

Referenced by operator()().


The documentation for this class was generated from the following files:
BFAssignToBody::cycle_
int cycle_
Definition: BFAssignToBody.hh:53
SimpleResourceManager::assign
virtual void assign(int cycle, MoveNode &node, const TTAMachine::Bus *bus=NULL, const TTAMachine::FunctionUnit *srcFU=NULL, const TTAMachine::FunctionUnit *dstFU=NULL, int immWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) override
Definition: SimpleResourceManager.cc:221
BFAssignToBody::mn_
MoveNode & mn_
Definition: BFAssignToBody.hh:52
SimpleResourceManager::unassign
virtual void unassign(MoveNode &node) override
Definition: SimpleResourceManager.cc:252
BFAssignToBody::srcFU_
const TTAMachine::FunctionUnit * srcFU_
Definition: BFAssignToBody.hh:54
BFOptimization::rm
SimpleResourceManager & rm() const
Definition: BFOptimization.cc:76
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75
BFOptimization::canAssign
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)
Definition: BFOptimization.cc:495
BFAssignToBody::dstFU_
const TTAMachine::FunctionUnit * dstFU_
Definition: BFAssignToBody.hh:55