24 #ifndef OTAWA_DFA_HAI_UNROLLINGLISTENER_H_
25 #define OTAWA_DFA_HAI_UNROLLINGLISTENER_H_
34 #include <elm/genstruct/Vector.h>
36 namespace otawa {
namespace dfa {
namespace hai {
54 for (
int i = 0; i < col->
count(); i++) {
57 for (
int j = 0; j < cfg->
countBB(); j++)
58 results[i][j] =
new typename Problem::Domain(
prob.bottom());
64 for (
int i = 0; i < col->
count(); i++) {
66 for (
int j = 0; j < cfg->
countBB(); j++)
93 template <
class Problem >
96 template <
class Problem >
99 int bbnumber = bb->
number() ;
100 int cfgnumber = cur_cfg->
number();
102 prob.lub(*results[cfgnumber][bbnumber], in);
104 if (BB_OUT_STATE(bb) != 0)
105 prob.lub(**BB_OUT_STATE(bb), out);
108 cout <<
"[TRACE] CFG " << cur_cfg->
label() <<
" BB " << bbnumber <<
": IN=" << in <<
" OUT=" << out <<
"\n";
109 cout <<
"[TRACE] result: " << *results[cfgnumber][bbnumber] <<
"\n";
113 template <
class Problem >
119 #endif // OTAWA_DFA_HAI
void fixPointReached(const FirstUnrollingFixPoint< UnrollingListener > *fp, BasicBlock *bb)
This is called whenever a loop's fixpoint is reached.
Definition: UnrollingListener.h:114
P Problem
Definition: UnrollingListener.h:43
Problem::Domain *** results
Definition: UnrollingListener.h:47
This listener gathers in an array the LUB of the in-states for all analyzed basic blocks...
Definition: UnrollingListener.h:40
Problem & prob
Definition: UnrollingListener.h:83
int number(void)
Definition: CFG.h:111
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
CFG * get(int index) const
Get a CFG from the collection using its index.
Definition: features.h:51
static Identifier< typename Problem::Domain * > BB_OUT_STATE
Definition: UnrollingListener.h:45
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
FixPoint class for HalfAbsInt The DefaultFixPoint manages loops in a simple way.
Definition: FirstUnrollingFixPoint.h:38
Contains a collection of CFGs (used with INVOLVED_CFGS property).
Definition: features.h:45
int number(void) const
Get the number hooked on this basic block, that is, value of ID_Index property.
Definition: BasicBlock.h:146
UnrollingListener(WorkSpace *_fw, Problem &_prob)
Definition: UnrollingListener.h:49
sys::SystemOutStream & out
Identifier< const CFGCollection * > INVOLVED_CFGS
This property is used to link the current computation involved CFG on the framework.
WorkSpace * fw
Definition: UnrollingListener.h:82
~UnrollingListener()
Definition: UnrollingListener.h:62
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
string label(void)
Get some label to identify the CFG.
Definition: CFG.cpp:368
int count(void) const
Get the count of CFG in the collection.
Definition: features.h:50
void blockInterpreted(const FirstUnrollingFixPoint< UnrollingListener > *fp, BasicBlock *bb, const typename Problem::Domain &in, const typename Problem::Domain &out, CFG *cur_cfg, elm::genstruct::Vector< Edge * > *callStack) const
Definition: UnrollingListener.h:97
Problem & getProb()
Definition: UnrollingListener.h:77
int countBB(void)
Definition: CFG.h:105