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

#include <BFRescheduleMove.hh>

Inheritance diagram for BFRescheduleMove:
Inheritance graph
Collaboration diagram for BFRescheduleMove:
Collaboration graph

Public Member Functions

 BFRescheduleMove (BF2Scheduler &sched, MoveNode &mn)
 
void undoOnlyMe ()
 
- Public Member Functions inherited from BFUnscheduleMove
 BFUnscheduleMove (BF2Scheduler &sched, MoveNode &mn)
 
void unscheduleOriginal ()
 
void undoOnlyMe ()
 
bool operator() ()
 
- 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 Attributes

std::stack< Reversible * > midChildren_
 
- Protected Attributes inherited from BFUnscheduleMove
MoveNodemn_
 
int oldCycle_
 
const TTAMachine::BusoldBus_
 
const TTAMachine::BusprologBus_
 
int oldImmWriteCycle_
 
int prologImmWriteCycle_
 
const TTAMachine::FunctionUnitdstFU_
 
const TTAMachine::FunctionUnitsrcFU_
 
const TTAMachine::ImmediateUnitimmu_
 
int immRegIndex_
 
- 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)
 
- Protected Member Functions inherited from BFUnscheduleMove
void returnOriginal ()
 
- 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)
 
- Static Protected Attributes inherited from BFUnscheduleMove
static int recurseCounter_ = 0
 
- Static Protected Attributes inherited from BFOptimization
static std::map< MoveNode *, MoveNode *, MoveNode::ComparatorprologMoves_
 

Detailed Description

Definition at line 47 of file BFRescheduleMove.hh.

Constructor & Destructor Documentation

◆ BFRescheduleMove()

BFRescheduleMove::BFRescheduleMove ( BF2Scheduler sched,
MoveNode mn 
)
inline

Definition at line 50 of file BFRescheduleMove.hh.

51  :
52  BFUnscheduleMove(sched, mn) {}

Member Function Documentation

◆ undoOnlyMe()

void BFRescheduleMove::undoOnlyMe ( )
virtual

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 42 of file BFRescheduleMove.cc.

42  {
43 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
44  for (int i = 0; i < recurseCounter_*2; i++)
45  std::cerr << "\t";
46 
47  std::cerr << "\t\tUndoing rechedule: " << mn_.toString()
48  << " setting bus to: " << oldBus_->name()
49  << std::endl;
50 #endif
51  if (!mn_.isScheduled()) {
52  for (int i = 0; i < recurseCounter_*2; i++)
53  std::cerr << "\t";
54 
55  std::cerr << "\t\tCannot unschedule on undo of reschedule,"
56  << " mn not sched: " << mn_.toString() << std::endl;
57  for (int i = 0; i < recurseCounter_*2; i++)
58  std::cerr << "\t";
59 
60  std::cerr << "\t\tShould return it to cycle" << oldCycle_ << std::endl;
61  assert(false);
62  }
63  unassign(mn_, false);
64 
66 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
68  std::cerr << "\t\t\tWARNING: bus not universalbus: "
69  << mn_.move().bus().name() << std::endl;
70  std::cerr << "\tOld bus: " << oldBus_->name() << std::endl;
71  }
72 #endif
74 #ifdef DEBUG_BUBBLEFISH_SCHEDULER
75  std::cerr << "\t\tundid reschedule, move now: " << mn_.move().toString()
76  << std::endl;
77 #endif
78 }

References assert, TTAProgram::Move::bus(), UniversalMachine::instance(), MoveNode::isScheduled(), midChildren_, BFUnscheduleMove::mn_, MoveNode::move(), TTAMachine::Component::name(), BFUnscheduleMove::oldBus_, BFUnscheduleMove::oldCycle_, BFUnscheduleMove::recurseCounter_, BFUnscheduleMove::returnOriginal(), TTAProgram::Move::toString(), MoveNode::toString(), BFOptimization::unassign(), Reversible::undoAndRemoveChildren(), and UniversalMachine::universalBus().

Here is the call graph for this function:

Member Data Documentation

◆ midChildren_

std::stack<Reversible*> BFRescheduleMove::midChildren_
protected

Definition at line 55 of file BFRescheduleMove.hh.

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


The documentation for this class was generated from the following files:
BFOptimization::unassign
virtual void unassign(MoveNode &mn, bool disposePrologCopy=true)
Definition: BFOptimization.cc:196
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
MoveNode::toString
std::string toString() const
Definition: MoveNode.cc:576
BFUnscheduleMove::oldBus_
const TTAMachine::Bus * oldBus_
Definition: BFUnscheduleMove.hh:63
Reversible::undoAndRemoveChildren
void undoAndRemoveChildren(std::stack< Reversible * > &children)
Definition: Reversible.cc:55
UniversalMachine::universalBus
TTAMachine::Bus & universalBus() const
Definition: UniversalMachine.cc:306
BFUnscheduleMove::returnOriginal
void returnOriginal()
Definition: BFUnscheduleMove.cc:107
UniversalMachine::instance
static UniversalMachine & instance()
Definition: UniversalMachine.cc:73
TTAProgram::Move::bus
const TTAMachine::Bus & bus() const
Definition: Move.cc:373
TTAProgram::Move::toString
std::string toString() const
Definition: Move.cc:436
BFUnscheduleMove::oldCycle_
int oldCycle_
Definition: BFUnscheduleMove.hh:62
BFUnscheduleMove::mn_
MoveNode & mn_
Definition: BFUnscheduleMove.hh:61
assert
#define assert(condition)
Definition: Application.hh:86
BFUnscheduleMove::recurseCounter_
static int recurseCounter_
Definition: BFUnscheduleMove.hh:71
BFRescheduleMove::midChildren_
std::stack< Reversible * > midChildren_
Definition: BFRescheduleMove.hh:55
BFUnscheduleMove::BFUnscheduleMove
BFUnscheduleMove(BF2Scheduler &sched, MoveNode &mn)
Definition: BFUnscheduleMove.hh:51
MoveNode::move
TTAProgram::Move & move()
MoveNode::isScheduled
bool isScheduled() const
Definition: MoveNode.cc:409