Otawa  0.10
CondNumber.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * CondNumber processor interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2011, 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 BRANCH_CONDNUMBER_H_
23 #define BRANCH_CONDNUMBER_H_
24 
25 #include <otawa/cfg/features.h>
26 #include <otawa/prog/WorkSpace.h>
27 #include <otawa/proc/BBProcessor.h>
28 #include <otawa/cfg/BasicBlock.h>
29 
30 #include "features.h"
31 
32 namespace otawa { namespace branch {
33 
34 using namespace elm;
35 
36 // processor
38 public:
39  static p::declare reg;
40  CondNumber(void);
41 protected:
42  virtual void processBB(otawa::WorkSpace*, CFG *cfg, BasicBlock *bb);
43  virtual void setup(WorkSpace *ws);
44  virtual void cleanup(WorkSpace *ws);
45 private:
47 };
48 
49 } } // otawa::branch
50 
51 #endif
This processor is dedicated to the basic block process thru proccessBB() method.
Definition: BBProcessor.h:72
Associate numbers to each branch relatively to their BHT set.
Definition: CondNumber.h:37
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
int * current_index
Definition: CondNumber.h:46
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
static p::declare reg
Definition: CondNumber.h:39
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
inst branch(int to)
Definition: inst.h:149