OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SequentialMoveNodeSelector Class Reference

#include <SequentialMoveNodeSelector.hh>

Inheritance diagram for SequentialMoveNodeSelector:
Inheritance graph
Collaboration diagram for SequentialMoveNodeSelector:
Collaboration graph

Public Member Functions

 SequentialMoveNodeSelector (TTAProgram::BasicBlock &bb)
 
virtual ~SequentialMoveNodeSelector ()
 
virtual MoveNodeGroup candidates ()
 
virtual void notifyScheduled (MoveNode &node)
 
void mightBeReady (MoveNode &node)
 
- Public Member Functions inherited from MoveNodeSelector
 MoveNodeSelector ()
 
virtual ~MoveNodeSelector ()
 

Private Types

typedef std::list< ProgramOperation * > ProgramOperationList
 
typedef std::list< MoveNodeGroup * > MNGList
 

Private Member Functions

void createMoveNodes (TTAProgram::BasicBlock &bb)
 

Private Attributes

MNGListmngs_
 
MNGList::iterator mngIter_
 

Detailed Description

Selects move nodes from a basic block in their sequential input order.

Definition at line 47 of file SequentialMoveNodeSelector.hh.

Member Typedef Documentation

◆ MNGList

Definition at line 61 of file SequentialMoveNodeSelector.hh.

◆ ProgramOperationList

Definition at line 60 of file SequentialMoveNodeSelector.hh.

Constructor & Destructor Documentation

◆ SequentialMoveNodeSelector()

SequentialMoveNodeSelector::SequentialMoveNodeSelector ( TTAProgram::BasicBlock bb)

Constructor.

Parameters
bbBasic block containing moves to be selected.

Definition at line 58 of file SequentialMoveNodeSelector.cc.

59 {
61 mngs_ = builder.build(bb);
62 mngIter_ = mngs_->begin();
63}
MoveNodeGroupList * build(TTAProgram::BasicBlock &bb)

References MoveNodeGroupBuilder::build(), mngIter_, and mngs_.

Here is the call graph for this function:

◆ ~SequentialMoveNodeSelector()

SequentialMoveNodeSelector::~SequentialMoveNodeSelector ( )
virtual

Definition at line 65 of file SequentialMoveNodeSelector.cc.

65 {
66 while(!mngs_->empty()) {
67 std::list<MoveNodeGroup*>::iterator iter = mngs_->begin();
68 MoveNodeGroup* mng = *iter;
69 for (int i = 0; i < mng->nodeCount(); i++) {
70 delete &mng->node(i);
71 }
72 delete mng;
73 mngs_->erase(iter);
74 }
75 delete mngs_;
76}
int nodeCount() const
MoveNode & node(int index) const

References mngs_, MoveNodeGroup::node(), and MoveNodeGroup::nodeCount().

Here is the call graph for this function:

Member Function Documentation

◆ candidates()

MoveNodeGroup SequentialMoveNodeSelector::candidates ( )
virtual

Gives a group of unselected movenodes to schedules.

This always returns them in order; and every one just once. Returns an empty MNG when there's no more MNGS to return.

Implements MoveNodeSelector.

Definition at line 85 of file SequentialMoveNodeSelector.cc.

85 {
86 // are there any unselected movenodegroups left?
87 if (mngIter_ != mngs_->end()) {
88 return **mngIter_++;
89 } else {
90 // return empty mng
91 return MoveNodeGroup();
92 }
93}

References mngIter_, and mngs_.

Referenced by SequentialScheduler::handleBasicBlock().

◆ createMoveNodes()

void SequentialMoveNodeSelector::createMoveNodes ( TTAProgram::BasicBlock bb)
private

◆ mightBeReady()

void SequentialMoveNodeSelector::mightBeReady ( MoveNode node)
virtual

This should be called by the client when some incoming dependence to a moveNode is removed.

Parameters
nodeNode which has lost some incoming dependence

Implements MoveNodeSelector.

Definition at line 96 of file SequentialMoveNodeSelector.cc.

96 {
97}

◆ notifyScheduled()

void SequentialMoveNodeSelector::notifyScheduled ( MoveNode node)
virtual

This should be called by the client as soon as a MoveNode is scheduled in order to update the internal state of the selector.

Parameters
nodeThe scheduled MoveNode.

Implements MoveNodeSelector.

Definition at line 100 of file SequentialMoveNodeSelector.cc.

100 {
101}

Referenced by SequentialScheduler::handleBasicBlock().

Member Data Documentation

◆ mngIter_

MNGList::iterator SequentialMoveNodeSelector::mngIter_
private

Definition at line 66 of file SequentialMoveNodeSelector.hh.

Referenced by candidates(), and SequentialMoveNodeSelector().

◆ mngs_

MNGList* SequentialMoveNodeSelector::mngs_
private

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