Otawa  0.10
FlowFactLoader.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Copyright (c) 2005-06, IRIT-UPS <casse@irit.fr>
4  *
5  * otawa/ipet/IPETFlowFactLoader.h -- IPETFlowFactLoader class interface.
6  */
7 #ifndef OTAWA_IPET_IPET_FLOW_FACT_LOADER_H
8 #define OTAWA_IPET_IPET_FLOW_FACT_LOADER_H
9 
10 #include <otawa/proc/BBProcessor.h>
11 #include <otawa/proc/Feature.h>
14 
15 namespace otawa {
16 
17 using namespace elm;
18 
19 // Externals
20 namespace ilp {
21  class System;
22 } // ilp
23 
24 namespace ipet {
25 
26 // FlowFactLoader class
28 public:
29  static p::declare reg;
30  FlowFactLoader(p::declare& r = reg);
31 
32 protected:
33  virtual void setup(WorkSpace *ws);
34  virtual void cleanup (WorkSpace *fw);
35  virtual void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb);
36  virtual void enteringCall (WorkSpace *ws, CFG *cfg, BasicBlock *caller, BasicBlock *callee);
37  virtual void leavingCall (WorkSpace *ws, CFG *cfg, BasicBlock *to);
38 
39 private:
41  int total_loop, found_loop, line_loop;
42  int max, total, min;
44 
45  bool transfer(Inst *source, BasicBlock *bb);
46  bool lookLineAt(Inst *source, BasicBlock *bb);
47 };
48 
49 } } // otawa::ipet
50 
51 #endif // OTAWA_IPET_IPET_FLOW_FACT_LOADER_H
dtd::RefAttr< BasicBlock * > source("source", dtd::STRICT|dtd::REQUIRED)
int total_loop
Definition: FlowFactLoader.h:41
Definition: ContextualProperty.h:105
intn_t min(intn_t a, intn_t b)
Return the min with a signed comparison.
Definition: clp_analysis.cpp:171
Class to declare simple a processor.
Definition: Registration.h:213
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
ContextualPath path
Definition: FlowFactLoader.h:43
A contextual processor allows to process basic block in a call-aware way even with a virtual CFG (whe...
Definition: ContextualProcessor.h:32
This processor allows using extern flow facts in an IPET system.
Definition: FlowFactLoader.h:27
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
bool lines_available
Definition: FlowFactLoader.h:40
static p::declare reg
Definition: FlowFactLoader.h:29
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 class represents assembly instruction of a piece of code.
Definition: Inst.h:62
int total
Definition: FlowFactLoader.h:42
intn_t max(intn_t a, intn_t b)
Return the max with a signed comparison.
Definition: clp_analysis.cpp:180