Otawa  0.10
PFGBuilder.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * PFGBuilder class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2008, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 #ifndef OTAWA_CFG_PFGBUILDER_H_
24 #define OTAWA_CFG_PFGBUILDER_H_
25 
26 #include <otawa/proc/Processor.h>
27 
28 namespace otawa {
29 
30 class File;
31 class Inst;
32 namespace pfg { class BB; class PFG; }
33 
34 // PFGBuilder class
35 class PFGBuilder: public Processor {
36 public:
37  PFGBuilder(void);
38 
39  // Processor overload
40  virtual void processWorkSpace(WorkSpace *ws);
41 
42 private:
43  void finalizeBB(pfg::BB *bb);
44  void addFunction(WorkSpace *ws, Inst *inst);
45  void addFile(WorkSpace *ws, File *file);
47 };
48 
49 } //otawa
50 
51 #endif /* OTAWA_CFG_PFGBUILDER_H_ */
struct otawa::sem::inst inst
Identifier< pfg::PFG * > PFG
PFG of the program.
void finalizeBB(pfg::BB *bb)
Finalize a basic block.
Definition: cfg_PFGBuilder.cpp:154
void addFile(WorkSpace *ws, File *file)
Add the given code file to the PFG.
Definition: cfg_PFGBuilder.cpp:84
WorkSpace * ws
Definition: Processor.h:185
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
pfg::PFG * pfg
Definition: PFGBuilder.h:46
This class represents a file involved in the building of a process.
Definition: File.h:43
Definition: PFGBuilder.h:35
The processor class is implemented by all code processor.
Definition: Processor.h:49
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
PFGBuilder(void)
Constructor of PFG builder.
Definition: cfg_PFGBuilder.cpp:44
A basic block in a otawa::pfg::PFG .
Definition: PFG.h:40
A PFG (Program Flow Graph) is built from the binary form of the program to represent all possible pat...
Definition: PFG.h:105
Definition: ipet_parser.cpp:125
This class represents assembly instruction of a piece of code.
Definition: Inst.h:62
void addFunction(WorkSpace *ws, Inst *inst)
Record basic block of a function.
Definition: cfg_PFGBuilder.cpp:101
virtual void processWorkSpace(WorkSpace *ws)
Process the given framework.
Definition: cfg_PFGBuilder.cpp:52