Otawa  0.10
LiExeGraphBBTime.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * exegraph module interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2007, 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 02110-1301 USA
21  */
22 #ifndef LI_EXECUTIONGRAPH_BBTIME_H
23 #define LI_EXECUTIONGRAPH_BBTIME_H
24 
25 #include "ExeGraphBBTime.h"
26 #include "LiExeGraph.h"
27 #include <otawa/ipet.h>
28 
29 
30 
31 /*#define DO_LOG
32 #if defined(NDEBUG) || !defined(DO_LOG)
33 # define LOG(c)
34 #else
35 # define LOG(c) c
36 # define OUT elm::cerr
37 #endif*/
38 
39 
40 namespace otawa {
41 
42 using namespace elm::genstruct;
43 
44 class LiExeGraphBBTime: public ExeGraphBBTime<LiExeGraph> {
45  private:
46  public:
48 
49  void buildPrologueList( BasicBlock * bb,
50  ExeSequence<ExeNode> * prologue,
51  int capacity,
52  elm::genstruct::DLList<ExeSequence<ExeNode> *> * prologue_list);
53  void buildEpilogueList( BasicBlock * bb,
54  ExeSequence<ExeNode> * epilogue,
55  int capacity,
57  int start_index);
58  void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb);
59  int processSequence(WorkSpace *fw,
60  ExeSequence<ExeNode> * prologue,
61  ExeSequence<ExeNode> * body,
62  ExeSequence<ExeNode> * epilogue,
63  int capacity ) ;
64  class InstIterator : public LiExeGraph::InstIterator {
65  public:
66  inline InstIterator(const ExeSequence<ExeNode> * sequence)
67  : LiExeGraph::InstIterator(sequence) {}
68  };
69  class SeqIterator : public elm::genstruct::DLList<ExeSequence<ExeNode> *>::Iterator {
70  public:
72  : elm::genstruct::DLList<ExeSequence<ExeNode> *>::Iterator(list) {}
73  };
74 
75 };
76 
77 
78 
79 } //otawa
80 
81 #endif // LiExeGraphBBTime_H
LiExeGraph::Node ExeNode
Definition: ExeGraphBBTime.h:42
Definition: LiExeGraphBBTime.h:69
Definition: ExeGraphBBTime.h:40
static const PropList EMPTY
This is an empty proplist for convenience.
Definition: PropList.h:66
Definition: LiExeGraphBBTime.h:64
A sequence of instructions (ExeInst)
Definition: ExeGraph.h:91
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
SeqIterator(const elm::genstruct::DLList< ExeSequence< ExeNode > * > &list)
Definition: LiExeGraphBBTime.h:71
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
InstIterator(const ExeSequence< ExeNode > *sequence)
Definition: LiExeGraphBBTime.h:66
dtd::Element cfg(dtd::make("cfg", _CFG).attr(id).content((entry,*bb, exit,*edge)))
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
This a list of properties.
Definition: PropList.h:63
Definition: LiExeGraph.h:49
Definition: LiExeGraphBBTime.h:44