Otawa  0.10
CallAST.h
Go to the documentation of this file.
1 /*
2  * CallAST class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2003, IRIT UPS.
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef OTAWA_AST_CALL_AST_H
22 #define OTAWA_AST_CALL_AST_H
23 
24 #include <otawa/ast/BlockAST.h>
25 #include <otawa/ast/FunAST.h>
26 
27 namespace otawa { namespace ast {
28 
29 // CallAST Class
30 class CallAST: public BlockAST {
32 public:
35  inline FunAST *function(void) const { return fun; };
36 
37  // AST overload
38  virtual ast_kind_t kind(void) const { return AST_Call; };
39  virtual CallAST *toCall(void) { return this; };
40 };
41 
42 } } // otawa::ast
43 
44 #endif // OTAWA_AST_CALL_AST_H
This class represents functions in the AST representation.
Definition: FunAST.h:32
Definition: AST.h:44
This class is a specialized block AST ended by a function call.
Definition: CallAST.h:30
uint32 size
dtd::RefAttr< CFG * > called("called", dtd::STRICT)
t::uint32 size
Definition: base.h:46
Inst * block(void) const
Get the entry basic block of the AST block.
Definition: BlockAST.h:38
FunAST * fun
Definition: CallAST.h:31
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
CallAST(Inst *block, ot::size size, FunAST *fun)
Build a new AST call calling the given function.
Definition: CallAST.cpp:41
This class represents the leafs of the AST.
Definition: BlockAST.h:30
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
virtual CallAST * toCall(void)
Get the call AST if this AST is a call, null else.
Definition: CallAST.h:39
virtual ast_kind_t kind(void) const
Get the kind of the AST.
Definition: CallAST.h:38
ast_kind_t
Definition: AST.h:40