OpenASIP  2.0
MoveNodeGroup.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2011 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file MoveNodeGroup.hh
26  *
27  * Declaration of MoveNodeGroup class
28  *
29  * @author Heikki Kultala 2006 (heikki.kultala-no.spam-tut.fi)
30  * @author Pekka Jääskeläinen 2011
31  * @note rating: red
32  */
33 
34 #ifndef TTA_MOVE_NODE_GROUP_HH
35 #define TTA_MOVE_NODE_GROUP_HH
36 
37 #include <vector>
38 
39 #include "Exception.hh"
40 #include "ProgramOperation.hh"
41 
43 class MoveNode;
44 
45 /**
46  * Class which contains group of moves which are to be scheduled.
47  */
49 public:
50  MoveNodeGroup();
52 
53  virtual ~MoveNodeGroup();
54 
55  void addNode(MoveNode& node);
56 
57  int earliestCycle(bool assumeBypassing = false) const;
58  int latestCycle() const;
59 
60  int maxSinkDistance() const;
61  int maxSourceDistance() const;
62 
63  int nodeCount() const;
64  MoveNode& node(int index) const;
65 
66  bool isPlaced() const;
67  bool isScheduled() const;
68  std::string toString() const;
69  bool isAlive() const;
70 
71  /// in case this MNG contains strictly the nodes of a single operation,
72  /// it can be set and queried with these methods
74  bool isOperation() const { return operation_ != NULL; }
76 
77  bool writesJumpGuard() const;
78 private:
79  std::vector<MoveNode*> nodes_;
80  /// The data dependence graph the moves in this group belong to
81  /// (optional).
83  /// in case this MNG contains strictly the nodes of a single operation
84  /// this can be set to point to it (optional)
86 };
87 
88 #endif
MoveNodeGroup::isAlive
bool isAlive() const
Definition: MoveNodeGroup.cc:190
MoveNodeGroup::ddg_
const DataDependenceGraph * ddg_
The data dependence graph the moves in this group belong to (optional).
Definition: MoveNodeGroup.hh:82
MoveNodeGroup::node
MoveNode & node(int index) const
Definition: MoveNodeGroup.cc:152
Exception.hh
MoveNodeGroup::nodes_
std::vector< MoveNode * > nodes_
Definition: MoveNodeGroup.hh:79
MoveNode
Definition: MoveNode.hh:65
MoveNodeGroup::setProgramOperationPtr
void setProgramOperationPtr(ProgramOperationPtr op)
in case this MNG contains strictly the nodes of a single operation, it can be set and queried with th...
Definition: MoveNodeGroup.hh:73
MoveNodeGroup::maxSinkDistance
int maxSinkDistance() const
Definition: MoveNodeGroup.cc:209
MoveNodeGroup::nodeCount
int nodeCount() const
Definition: MoveNodeGroup.cc:140
ProgramOperationPtr
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition: MoveNode.hh:52
MoveNodeGroup::programOperationPtr
ProgramOperationPtr programOperationPtr() const
Definition: MoveNodeGroup.hh:75
MoveNodeGroup::operation_
ProgramOperationPtr operation_
in case this MNG contains strictly the nodes of a single operation this can be set to point to it (op...
Definition: MoveNodeGroup.hh:85
MoveNodeGroup::maxSourceDistance
int maxSourceDistance() const
Definition: MoveNodeGroup.cc:230
MoveNodeGroup::isOperation
bool isOperation() const
Definition: MoveNodeGroup.hh:74
MoveNodeGroup::MoveNodeGroup
MoveNodeGroup()
Definition: MoveNodeGroup.cc:45
MoveNodeGroup::writesJumpGuard
bool writesJumpGuard() const
Definition: MoveNodeGroup.cc:260
MoveNodeGroup::toString
std::string toString() const
Definition: MoveNodeGroup.cc:248
ProgramOperation.hh
MoveNodeGroup::addNode
void addNode(MoveNode &node)
Definition: MoveNodeGroup.cc:70
MoveNodeGroup::latestCycle
int latestCycle() const
Definition: MoveNodeGroup.cc:81
DataDependenceGraph
Definition: DataDependenceGraph.hh:67
MoveNodeGroup::isPlaced
bool isPlaced() const
Definition: MoveNodeGroup.cc:173
MoveNodeGroup::isScheduled
bool isScheduled() const
Definition: MoveNodeGroup.cc:164
MoveNodeGroup
Definition: MoveNodeGroup.hh:48
MoveNodeGroup::earliestCycle
int earliestCycle(bool assumeBypassing=false) const
Definition: MoveNodeGroup.cc:103
MoveNodeGroup::~MoveNodeGroup
virtual ~MoveNodeGroup()
Definition: MoveNodeGroup.cc:61