OpenASIP 2.2
Loading...
Searching...
No Matches
ProgramDependenceEdge.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 ProgramDependenceEdge.hh
26 *
27 * Declaration of prototype of graph-based program representation:
28 * declaration of the program dependence edge.
29 *
30 * @author Vladimir Guzma 2006 (vladimir.guzma-no.spam-tut.fi)
31 * @note rating: red
32 */
33
34#ifndef TTA_PROGRAM_DEPENDENCE_EDGE_HH
35#define TTA_PROGRAM_DEPENDENCE_EDGE_HH
36
37#include "GraphEdge.hh"
39#include "DataDependenceEdge.hh"
40
42public:
43 enum EdgeType {
44 PDG_EDGE_CONTROL, /// Indicates Control Dependence Edge from CDG
45 PDG_EDGE_DATA, /// Indicates Data Dependence Edge from DDG
46 PDG_EDGE_LOOP_CLOSE, /// Loop close edge from close node to loop entry
47 PDG_EDGE_CONTROL_ARTIFICIAL /// Indicates artificial control edge for
48 /// serialization
49 };
50
54
55 virtual ~ProgramDependenceEdge();
56
57 bool isControlDependence() const;
58 bool isDataDependence() const ;
60 bool isLoopCloseEdge() const;
63 TCEString toString() const;
64 TCEString dotString() const;
65 void setFixed() { fixed_ = true; }
66 bool fixed() { return fixed_; }
67private:
71 /// Set to fixed if edge is not to be moved any more while serializing
72 bool fixed_;
73};
74
75#endif
DataDependenceEdge & dataDependenceEdge()
bool fixed_
Set to fixed if edge is not to be moved any more while serializing.
@ PDG_EDGE_CONTROL_ARTIFICIAL
Loop close edge from close node to loop entry.
@ PDG_EDGE_DATA
Indicates Control Dependence Edge from CDG.
@ PDG_EDGE_LOOP_CLOSE
Indicates Data Dependence Edge from DDG.
ControlDependenceEdge & controlDependenceEdge()
ControlDependenceEdge * cEdge_
DataDependenceEdge * dEdge_