OpenASIP 2.2
Loading...
Searching...
No Matches
ProgramGraph.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 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 ProgramGraph.hh
26 *
27 * Declaration of ProgramGraph class.
28 *
29 * ProgramGraph represents a program in PDG form.
30 *
31 * @author Vladimir Guzma 2006 (vladimir.guzma-no.spam-tut.fi)
32 * @note rating: red
33 */
34
35#ifndef TTA_PROGRAM_GRAPH_HH
36#define TTA_PROGRAM_GRAPH_HH
37
38#include <string>
39#include <vector>
40#include "Exception.hh"
41#include "MoveNode.hh"
44
46class ControleFlowGraph;
47
48namespace TTAMachine {
49 class Machine;
50}
51
52namespace TTAProgram{
53 class Move;
54 class Program;
55}
56
57/*
58 * ProgramGraph represents program
59 */
61public:
62
64 virtual ~ProgramGraph();
65
67 MoveNode& nodeOf(const TTAProgram::Move&) const;
68 int graphCount() const;
70 ProgramDependenceGraph* graph(const std::string);
71
72private:
73 void clear();
74
75 /// Copying forbidden
77 /// Assignment forbidden
79
80 /// Original program
82
83 /// Vector of CFG's for each procedure
84 std::vector<ControlFlowGraph*> cfgs_;
85 /// Vector of CDG's for each procedure
86 std::vector<ControlDependenceGraph*> cdgs_;
87 /// Vector of DDG's for each procedure
88 std::vector<DataDependenceGraph*> ddgs_;
89 /// Vector of PDG's for each procedure
90 std::vector<ProgramDependenceGraph*> pdgs_;
91};
92
93#endif
find Finds info of the inner loops in the program
TTAProgram::Program & program_
Original program.
int graphCount() const
MoveNode & nodeOf(const TTAProgram::Move &) const
ProgramGraph(const ProgramGraph &)
Copying forbidden.
std::vector< ControlFlowGraph * > cfgs_
Vector of CFG's for each procedure.
ProgramDependenceGraph * graph(const std::string)
ProgramGraph & operator=(const ProgramGraph &)
Assignment forbidden.
std::vector< ControlDependenceGraph * > cdgs_
Vector of CDG's for each procedure.
std::vector< ProgramDependenceGraph * > pdgs_
Vector of PDG's for each procedure.
TTAProgram::Program & generateProgram() const
ProgramDependenceGraph * graphAt(int)
virtual ~ProgramGraph()
std::vector< DataDependenceGraph * > ddgs_
Vector of DDG's for each procedure.