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

#include <BFUpdateMoveOnBypass.hh>

Inheritance diagram for BFUpdateMoveOnBypass:
Inheritance graph
Collaboration diagram for BFUpdateMoveOnBypass:
Collaboration graph

Public Member Functions

 BFUpdateMoveOnBypass (BF2Scheduler &sched, MoveNode &src, MoveNode &mn)
 
bool operator() () override
 
virtual ~BFUpdateMoveOnBypass ()
 
TCEString reg ()
 
- 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 Member Functions

void undoOnlyMe () override
 
- 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)
 

Private Attributes

MoveNodesrc_
 
MoveNodedst_
 
bool force_
 
TCEString reg_
 

Additional Inherited Members

- Static Public Member Functions inherited from BFOptimization
static void clearPrologMoves ()
 
static MoveNodegetSisterTrigger (const MoveNode &mn, const TTAMachine::Machine &mach)
 
- 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 41 of file BFUpdateMoveOnBypass.hh.

Constructor & Destructor Documentation

◆ BFUpdateMoveOnBypass()

BFUpdateMoveOnBypass::BFUpdateMoveOnBypass ( BF2Scheduler sched,
MoveNode src,
MoveNode mn 
)
inline

Definition at line 44 of file BFUpdateMoveOnBypass.hh.

46  :
47  BFOptimization(sched), src_(src), dst_(mn) {}

◆ ~BFUpdateMoveOnBypass()

virtual BFUpdateMoveOnBypass::~BFUpdateMoveOnBypass ( )
inlinevirtual

Definition at line 49 of file BFUpdateMoveOnBypass.hh.

49 {}

Member Function Documentation

◆ operator()()

bool BFUpdateMoveOnBypass::operator() ( )
overridevirtual

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

Implements Reversible.

Definition at line 41 of file BFUpdateMoveOnBypass.cc.

41  {
42 
43  auto& dm = dst_.move();
44  auto& sm = src_.move();
45 
46  // update the move
47  dm.setSource(sm.source().copy());
48 
49  if (!src_.isSourceOperation()) {
50  return true;
51  }
52 
54  srcOp->addOutputNode(dst_);
56 
57  // set fu annotations
58  for (int j = 0; j < sm.annotationCount(); j++) {
59  TTAProgram::ProgramAnnotation anno = sm.annotation(j);
60  if (anno.id() == ProgramAnnotation::ANN_ALLOWED_UNIT_SRC) {
61  dm.addAnnotation(
63  ProgramAnnotation::ANN_ALLOWED_UNIT_SRC,
64  anno.payload()));
65  }
66  if (anno.id() ==
67  ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC) {
68  dm.addAnnotation(
70  ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC,
71  anno.payload()));
72  }
73  if (anno.id() ==
74  ProgramAnnotation::ANN_REJECTED_UNIT_SRC) {
75  dm.addAnnotation(
77  ProgramAnnotation::ANN_REJECTED_UNIT_SRC,
78  anno.payload()));
79  }
80  }
81  return true;
82 }

References dst_, TTAProgram::ProgramAnnotation::id(), MoveNode::isSourceOperation(), MoveNode::move(), TTAProgram::ProgramAnnotation::payload(), TTAProgram::Move::setSource(), MoveNode::setSourceOperationPtr(), MoveNode::sourceOperationPtr(), and src_.

Here is the call graph for this function:

◆ reg()

TCEString BFUpdateMoveOnBypass::reg ( )
inline

Definition at line 50 of file BFUpdateMoveOnBypass.hh.

50 { return reg_; }

References reg_.

◆ undoOnlyMe()

void BFUpdateMoveOnBypass::undoOnlyMe ( )
overrideprotectedvirtual

Member Data Documentation

◆ dst_

MoveNode& BFUpdateMoveOnBypass::dst_
private

Definition at line 55 of file BFUpdateMoveOnBypass.hh.

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

◆ force_

bool BFUpdateMoveOnBypass::force_
private

Definition at line 56 of file BFUpdateMoveOnBypass.hh.

◆ reg_

TCEString BFUpdateMoveOnBypass::reg_
private

Definition at line 57 of file BFUpdateMoveOnBypass.hh.

Referenced by reg().

◆ src_

MoveNode& BFUpdateMoveOnBypass::src_
private

Definition at line 54 of file BFUpdateMoveOnBypass.hh.

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


The documentation for this class was generated from the following files:
TTAProgram::ProgramAnnotation::ANN_REJECTED_UNIT_SRC
@ ANN_REJECTED_UNIT_SRC
Src. unit rejected.
Definition: ProgramAnnotation.hh:118
TTAProgram::Move::destination
Terminal & destination() const
Definition: Move.cc:323
ProgramOperation
Definition: ProgramOperation.hh:70
BFUpdateMoveOnBypass::reg_
TCEString reg_
Definition: BFUpdateMoveOnBypass.hh:57
ProgramOperationPtr
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition: MoveNode.hh:52
MoveNode::setSourceOperationPtr
void setSourceOperationPtr(ProgramOperationPtr po)
Definition: MoveNode.cc:541
MoveNode::sourceOperation
ProgramOperation & sourceOperation() const
Definition: MoveNode.cc:453
TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_SRC
@ ANN_ALLOWED_UNIT_SRC
Candidate units can be passed for resource manager for choosing the source/destination unit of the mo...
Definition: ProgramAnnotation.hh:112
TTAProgram::ProgramAnnotation::id
ProgramAnnotation::Id id() const
Definition: ProgramAnnotation.cc:111
TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC
@ ANN_CONN_CANDIDATE_UNIT_SRC
Src. unit candidate.
Definition: ProgramAnnotation.hh:115
MoveNode::isSourceOperation
bool isSourceOperation() const
Definition: MoveNode.cc:168
MoveNode::unsetSourceOperation
void unsetSourceOperation()
Definition: MoveNode.cc:760
BFUpdateMoveOnBypass::src_
MoveNode & src_
Definition: BFUpdateMoveOnBypass.hh:54
BFOptimization::BFOptimization
BFOptimization(BF2Scheduler &sched)
Definition: BFOptimization.hh:75
MoveNode::move
TTAProgram::Move & move()
BFUpdateMoveOnBypass::dst_
MoveNode & dst_
Definition: BFUpdateMoveOnBypass.hh:55
TTAProgram::Terminal::copy
virtual Terminal * copy() const =0
MoveNode::sourceOperationPtr
ProgramOperationPtr sourceOperationPtr() const
Definition: MoveNode.cc:458
TTAProgram::ProgramAnnotation
Definition: ProgramAnnotation.hh:49
TTAProgram::AnnotatedInstructionElement::removeAnnotations
void removeAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
Definition: AnnotatedInstructionElement.cc:146
TTAProgram::ProgramAnnotation::payload
const std::vector< Byte > & payload() const
Definition: ProgramAnnotation.cc:121
TTAProgram::Move::setSource
void setSource(Terminal *src)
Definition: Move.cc:312
ProgramOperation::removeOutputNode
void removeOutputNode(MoveNode &node, int outputIndex)
Definition: ProgramOperation.cc:214