OpenASIP 2.2
Loading...
Searching...
No Matches
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
43class MoveNode;
44
45/**
46 * Class which contains group of moves which are to be scheduled.
47 */
49public:
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;
78private:
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
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition MoveNode.hh:53
int earliestCycle(bool assumeBypassing=false) const
ProgramOperationPtr programOperationPtr() const
int nodeCount() const
virtual ~MoveNodeGroup()
int maxSinkDistance() const
MoveNode & node(int index) const
void addNode(MoveNode &node)
void setProgramOperationPtr(ProgramOperationPtr op)
in case this MNG contains strictly the nodes of a single operation, it can be set and queried with th...
std::string toString() const
int maxSourceDistance() const
bool writesJumpGuard() const
std::vector< MoveNode * > nodes_
ProgramOperationPtr operation_
in case this MNG contains strictly the nodes of a single operation this can be set to point to it (op...
int latestCycle() const
const DataDependenceGraph * ddg_
The data dependence graph the moves in this group belong to (optional).
bool isOperation() const
bool isPlaced() const
bool isAlive() const
bool isScheduled() const