OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BFShareOperandWithScheduled Class Reference

#include <BFShareOperandWithScheduled.hh>

Inheritance diagram for BFShareOperandWithScheduled:
Inheritance graph
Collaboration diagram for BFShareOperandWithScheduled:
Collaboration graph

Public Member Functions

 BFShareOperandWithScheduled (BF2Scheduler &sched, MoveNode &removed, MoveNode &scheduled)
 
virtual bool operator() ()
 
virtual ~BFShareOperandWithScheduled ()
 
- Public Member Functions inherited from BFShareOperand
 BFShareOperand (BF2Scheduler &sched, MoveNode &removed, MoveNode &shared)
 
virtual ~BFShareOperand ()
 
- 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

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

int originalCycle_
 
const TTAMachine::BusoriginalRemovedBus_
 
const TTAMachine::BusprologBus_
 
int oldImmWriteCycle_
 
int prologImmWriteCycle_
 
const TTAMachine::ImmediateUnitimmu_
 
int immRegIndex_
 
- Protected Attributes inherited from BFShareOperand
MoveNoderemoved_
 
MoveNodeshared_
 
std::vector< ProgramOperationPtrops_
 
std::set< ProgramOperationPtrcreatedPrologPOs_
 
- 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)
 
- Static Protected Attributes inherited from BFOptimization
static std::map< MoveNode *, MoveNode *, MoveNode::ComparatorprologMoves_
 

Detailed Description

Definition at line 44 of file BFShareOperandWithScheduled.hh.

Constructor & Destructor Documentation

◆ BFShareOperandWithScheduled()

BFShareOperandWithScheduled::BFShareOperandWithScheduled ( BF2Scheduler sched,
MoveNode removed,
MoveNode scheduled 
)
inline

◆ ~BFShareOperandWithScheduled()

virtual BFShareOperandWithScheduled::~BFShareOperandWithScheduled ( )
inlinevirtual

Definition at line 53 of file BFShareOperandWithScheduled.hh.

53{}

Member Function Documentation

◆ operator()()

bool BFShareOperandWithScheduled::operator() ( )
virtual

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

Reimplemented from BFShareOperand.

Definition at line 48 of file BFShareOperandWithScheduled.cc.

48 {
51#ifdef DEBUG_BUBBLEFISH_SCHEDULER
52 std::cerr << "\t\t\t\t\tDestination operand index mismatch"
53 << std::endl;
54#endif
55 return false;
56 }
57
60
65 }
66
67 MoveNode* removedPrologMN = ii() ?
69 NULL;
70 if (removedPrologMN != NULL) {
71 prologBus_ = &removedPrologMN->move().bus();
72
73 if (removedPrologMN->move().source().isImmediateRegister()) {
75 prologRM()->immediateWriteCycle(*removedPrologMN);
76 }
77
78#ifdef DEBUG_BUBBLEFISH_SCHEDULER
79 std::cerr << "\t\t\t\tShareOpWithSched Saving prolog bus: "
80 << prologBus_->name() << std::endl;
81 std::cerr << "\t\t\t\t\tProlog move: " << removedPrologMN->toString()
82 << std::endl;
83#endif
84 }
85
86 unassign(removed_, false);
87 if (BFShareOperand::operator()()) {
90#ifdef DEBUG_BUBBLEFISH_SCHEDULER
91 std::cerr << "\t\t\t\t\tShared operand ok!" << std::endl;
92#endif
93 return true;
94 } else {
98#ifdef DEBUG_BUBBLEFISH_SCHEDULER
99 std::cerr << "\t\t\t\t\tShare operand failed!" << std::endl;
100#endif
101 return false;
102 }
103}
void nodeResurrected(MoveNode &mn)
void nodeAndCopyKilled(MoveNode &mn)
unsigned int ii() const
BF2Scheduler & sched_
SimpleResourceManager * prologRM() const
DataDependenceGraph & ddg()
virtual void unassign(MoveNode &mn, bool disposePrologCopy=true)
MoveNodeDuplicator & duplicator() const
SimpleResourceManager & rm() 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)
MoveNode & removed_
MoveNode & shared_
void restoreNodeFromParent(GraphNode &node)
virtual void dropNode(Node &node)
MoveNode * getMoveNode(MoveNode &mn)
int cycle() const
Definition MoveNode.cc:421
std::string toString() const
Definition MoveNode.cc:576
TTAProgram::Move & move()
virtual int immediateWriteCycle(const MoveNode &) const
virtual TCEString name() const
Terminal & source() const
Definition Move.cc:302
Terminal & destination() const
Definition Move.cc:323
const TTAMachine::Bus & bus() const
Definition Move.cc:373
virtual int index() const
Definition Terminal.cc:274
virtual int operationIndex() const
Definition Terminal.cc:364
virtual bool isImmediateRegister() const
Definition Terminal.cc:97
virtual const TTAMachine::ImmediateUnit & immediateUnit() const
Definition Terminal.cc:240

References BFOptimization::assign(), TTAProgram::Move::bus(), MoveNode::cycle(), BFOptimization::ddg(), TTAProgram::Move::destination(), BoostGraph< GraphNode, GraphEdge >::dropNode(), BFOptimization::duplicator(), MoveNodeDuplicator::getMoveNode(), BFOptimization::ii(), TTAProgram::Terminal::immediateUnit(), SimpleResourceManager::immediateWriteCycle(), immRegIndex_, immu_, TTAProgram::Terminal::index(), TTAProgram::Terminal::isImmediateRegister(), MoveNode::move(), TTAMachine::Component::name(), BF2Scheduler::nodeAndCopyKilled(), BF2Scheduler::nodeResurrected(), oldImmWriteCycle_, TTAProgram::Terminal::operationIndex(), originalCycle_, originalRemovedBus_, prologBus_, prologImmWriteCycle_, BFOptimization::prologRM(), BFShareOperand::removed_, BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent(), BFOptimization::rm(), BFOptimization::sched_, BFShareOperand::shared_, TTAProgram::Move::source(), MoveNode::toString(), and BFOptimization::unassign().

Here is the call graph for this function:

◆ undoOnlyMe()

void BFShareOperandWithScheduled::undoOnlyMe ( )
protectedvirtual

Undoes the operations done by this class but not children. This method should be overloaded by most derived classes.

Reimplemented from BFShareOperand.

Definition at line 105 of file BFShareOperandWithScheduled.cc.

105 {
106#ifdef DEBUG_BUBBLEFISH_SCHEDULER
107 std::cerr << "\t\t\t\t\tUndoing operandshare: " << shared_.toString()
108 << std::endl;
109#endif
116}
virtual void undoOnlyMe()

References BFOptimization::assign(), BFOptimization::ddg(), immRegIndex_, immu_, BF2Scheduler::nodeResurrected(), oldImmWriteCycle_, originalCycle_, originalRemovedBus_, prologBus_, prologImmWriteCycle_, BFShareOperand::removed_, BoostGraph< GraphNode, GraphEdge >::restoreNodeFromParent(), BFOptimization::sched_, BFShareOperand::shared_, MoveNode::toString(), and BFShareOperand::undoOnlyMe().

Here is the call graph for this function:

Member Data Documentation

◆ immRegIndex_

int BFShareOperandWithScheduled::immRegIndex_
protected

Definition at line 63 of file BFShareOperandWithScheduled.hh.

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

◆ immu_

const TTAMachine::ImmediateUnit* BFShareOperandWithScheduled::immu_
protected

Definition at line 62 of file BFShareOperandWithScheduled.hh.

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

◆ oldImmWriteCycle_

int BFShareOperandWithScheduled::oldImmWriteCycle_
protected

Definition at line 60 of file BFShareOperandWithScheduled.hh.

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

◆ originalCycle_

int BFShareOperandWithScheduled::originalCycle_
protected

Definition at line 56 of file BFShareOperandWithScheduled.hh.

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

◆ originalRemovedBus_

const TTAMachine::Bus* BFShareOperandWithScheduled::originalRemovedBus_
protected

Definition at line 57 of file BFShareOperandWithScheduled.hh.

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

◆ prologBus_

const TTAMachine::Bus* BFShareOperandWithScheduled::prologBus_
protected

Definition at line 58 of file BFShareOperandWithScheduled.hh.

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

◆ prologImmWriteCycle_

int BFShareOperandWithScheduled::prologImmWriteCycle_
protected

Definition at line 61 of file BFShareOperandWithScheduled.hh.

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


The documentation for this class was generated from the following files: