OpenASIP 2.2
Loading...
Searching...
No Matches
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.

◆ ~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}
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition MoveNode.hh:53
void setSourceOperationPtr(ProgramOperationPtr po)
Definition MoveNode.cc:541
ProgramOperationPtr sourceOperationPtr() const
Definition MoveNode.cc:458
TTAProgram::Move & move()
bool isSourceOperation() const
Definition MoveNode.cc:168
void setSource(Terminal *src)
Definition Move.cc:312
const std::vector< Byte > & payload() const
ProgramAnnotation::Id id() const

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

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 84 of file BFUpdateMoveOnBypass.cc.

84 {
85 // unset programoperation from bypassed
86 if (dst_.isSourceOperation()) {
90
91 // unset fu annotations
98 }
99 // do the actual unmerge by returning source to original register.
101}
void unsetSourceOperation()
Definition MoveNode.cc:760
ProgramOperation & sourceOperation() const
Definition MoveNode.cc:453
void removeOutputNode(MoveNode &node, int outputIndex)
void removeAnnotations(ProgramAnnotation::Id id=ProgramAnnotation::ANN_UNDEF_ID)
Terminal & destination() const
Definition Move.cc:323
@ ANN_REJECTED_UNIT_SRC
Src. unit rejected.
@ ANN_CONN_CANDIDATE_UNIT_SRC
Src. unit candidate.
@ ANN_ALLOWED_UNIT_SRC
Candidate units can be passed for resource manager for choosing the source/destination unit of the mo...
virtual Terminal * copy() const =0

References TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_SRC, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC, TTAProgram::ProgramAnnotation::ANN_REJECTED_UNIT_SRC, TTAProgram::Terminal::copy(), TTAProgram::Move::destination(), dst_, MoveNode::isSourceOperation(), MoveNode::move(), TTAProgram::AnnotatedInstructionElement::removeAnnotations(), ProgramOperation::removeOutputNode(), TTAProgram::Move::setSource(), MoveNode::sourceOperation(), src_, and MoveNode::unsetSourceOperation().

Here is the call graph for this function:

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: