OTAWA
2.0
Framework to perform machine analysis and compute WCET.
ConsBuilder.h
Go to the documentation of this file.
1
/*
2
* ConsBuilder processor interface
3
* Copyright (c) 2011, IRIT UPS.
4
*
5
* This file is part of OTAWA
6
*
7
* OTAWA is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* OTAWA is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with OTAWA; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
#ifndef BRANCH_CONSBUILDER_H_
22
#define BRANCH_CONSBUILDER_H_
23
24
#include <
otawa/cfg/BasicBlock.h
>
25
#include <
otawa/cfg/features.h
>
26
#include <
otawa/hard/BHT.h
>
27
#include <
otawa/ilp/expr.h
>
28
#include <
otawa/proc/BBProcessor.h
>
29
#include <
otawa/prog/WorkSpace.h
>
30
31
#include "
features.h
"
32
#include "
BranchBuilder.h
"
33
34
namespace
otawa
{
namespace
branch
{
35
36
using namespace
elm
;
37
38
// OnlyConsBuilder processor
39
class
OnlyConsBuilder
:
public
BBProcessor
{
40
public
:
41
static
p::declare
reg
;
42
OnlyConsBuilder
(
p::declare
& r = reg);
43
virtual
void
configure(
const
PropList
&props);
44
protected
:
45
virtual
void
setup(
WorkSpace
*ws);
46
virtual
void
processBB(
otawa::WorkSpace
*,
CFG
*cfg,
Block
*bb);
47
private
:
48
void
genAlwaysDefault(
ilp::model
&
model
,
ilp::var
x_mp,
BasicBlock
*bb);
49
void
genAlwaysHit(
ilp::model
&
model
,
ilp::var
x_mp,
BasicBlock
*bb);
50
void
genFirstUnknown(
ilp::model
&
model
,
ilp::var
x_mp,
BasicBlock
*bb);
51
void
genNotClassified(
ilp::model
&
model
,
ilp::var
x_mp,
BasicBlock
*bb);
52
53
bool
_explicit
;
54
hard::BHT
*
bht
;
55
};
56
57
// ConsBuilder processor
58
class
ConsBuilder
:
public
BBProcessor
{
59
public
:
60
static
p::declare
reg
;
61
ConsBuilder
(
p::declare
& r = reg);
62
virtual
void
processBB(
otawa::WorkSpace
*,
CFG
*cfg,
Block
*bb);
63
};
64
65
} }
// otawa::branch
66
67
#endif
WorkSpace.h
otawa::branch::ConsBuilder
Definition:
ConsBuilder.h:58
otawa::WorkSpace
Definition:
WorkSpace.h:71
otawa::branch::OnlyConsBuilder::reg
static p::declare reg
Definition:
ConsBuilder.h:41
otawa::ilp::var
Definition:
expr.h:29
otawa::branch::OnlyConsBuilder
Definition:
ConsBuilder.h:39
expr.h
features.h
otawa::branch::ConsBuilder::reg
static p::declare reg
Definition:
ConsBuilder.h:60
BasicBlock.h
features.h
elm
otawa::BBProcessor
Definition:
BBProcessor.h:72
otawa::sem::branch
inst branch(uint_t to)
Definition:
inst.h:162
otawa::Block
Definition:
CFG.h:68
otawa::CFG
Definition:
CFG.h:196
otawa::ilp::model
Definition:
expr.h:94
otawa::BasicBlock
Definition:
CFG.h:137
otawa::hard::BHT
Definition:
BHT.h:48
otawa::p::declare
Definition:
Registration.h:188
otawa::branch::OnlyConsBuilder::bht
hard::BHT * bht
Definition:
ConsBuilder.h:54
otawa::PropList
Definition:
PropList.h:67
BranchBuilder.h
BBProcessor.h
otawa
Development Note Letting the ToDo / ToDoList class visible in the header is clumsy.
Definition:
ArrayStore.h:25
BHT.h
otawa::branch::OnlyConsBuilder::_explicit
bool _explicit
Definition:
ConsBuilder.h:53
include
otawa
branch
ConsBuilder.h
Generated on Fri Jul 23 2021 10:50:29 for OTAWA by
1.8.17