OpenASIP 2.2
Loading...
Searching...
No Matches
TerminalProgramOperation.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 TerminalProgramOperation.hh
26 *
27 * Declaration of TerminalProgramOperation class.
28 *
29 * @author Pekka Jääskeläinen 2011
30 * @note rating: red
31 */
32
33#ifndef TTA_TERMINAL_PROGRAM_OPERATION_HH
34#define TTA_TERMINAL_PROGRAM_OPERATION_HH
35
37#include "ProgramOperation.hh"
38
39namespace TTAProgram {
40
41/**
42 * Represents an inline immediate that refers to a program operation (a
43 * set of moves constituting a single execution of an operation in the
44 * program).
45 *
46 * The returned instruction address is the one of the trigger move of the
47 * tracked ProgramOperation. This class is used to refer to the location of
48 * an another ProgramOperation strictly (not wanting to refer to the
49 * beginning of a BB).
50 */
52public:
53 TerminalProgramOperation(TCEString instructionLabel);
56
58 return po_;
59 }
60
64
66 return po_.get() != NULL;
67 }
68
69 bool isProgramOperationReference() const { return true; }
70 bool isAddressKnown() const;
71
72 virtual Address address() const;
73
74 virtual Terminal* copy() const;
75 virtual bool equals(const Terminal& other) const;
76
77 TCEString label() const { return label_; }
78
79private:
80 /// Assignment not allowed.
82 /// The referred PO. The pointer can be copied, e.g. to DDG.
85};
86
87}
88
89#endif
std::shared_ptr< ProgramOperation > ProgramOperationPtr
Definition MoveNode.hh:53
ProgramOperationPtr po_
The referred PO. The pointer can be copied, e.g. to DDG.
void setProgramOperation(ProgramOperationPtr po)
TerminalProgramOperation & operator=(const TerminalProgramOperation &)
Assignment not allowed.
virtual bool equals(const Terminal &other) const