Otawa  0.10
BasicConstraintsBuilder.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * BasicConstraintsBuilder class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2005-07, 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 OTAWA_IPET_BASIC_CONSTRAINTS_BUILDER_H
23 #define OTAWA_IPET_BASIC_CONSTRAINTS_BUILDER_H
24 
25 #include <elm/assert.h>
26 #include <otawa/proc/BBProcessor.h>
27 #include <otawa/ipet/features.h>
28 #include <otawa/ilp/Constraint.h>
29 namespace otawa {
30 
31 // External classes
32 class BasicBlock;
33 namespace ilp {
34  class System;
35  class Var;
36 } //ilp
37 
38 namespace ipet {
39 
40 // BasicConstraintsBuilder class
42 public:
44 
45 protected:
46  virtual void processWorkSpace(WorkSpace *fw);
47  virtual void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb);
48  virtual void configure(const PropList &props);
49 
50 private:
51  bool _explicit;
52  void addEntryConstraint(ilp::System *system, CFG *caller, BasicBlock *bb, CFG *callee, ilp::Var *var);
53 };
54 
55 } } // otawa::ipet
56 
57 #endif // OTAWA_IPET_BASIC_CONSTRAINTS_BUILDER_H
virtual void configure(const PropList &props)
Configure the current processor.
Definition: ipet_BasicConstraintsBuilder.cpp:223
This processor is dedicated to the basic block process thru proccessBB() method.
Definition: BBProcessor.h:72
CFG * cfg(void) const
Get the current CFG.
Definition: CFGProcessor.h:56
BasicConstraintsBuilder(void)
Build basic constraint builder processor.
Definition: ipet_BasicConstraintsBuilder.cpp:215
virtual void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb)
Perform the work of the given basic block.
Definition: ipet_BasicConstraintsBuilder.cpp:128
bool _explicit
Definition: BasicConstraintsBuilder.h:51
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
virtual void processWorkSpace(WorkSpace *fw)
Process the given framework.
Definition: ipet_BasicConstraintsBuilder.cpp:193
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
void addEntryConstraint(ilp::System *system, CFG *caller, BasicBlock *bb, CFG *callee, ilp::Var *var)
Add the given variable to the entry constraint of the given CFG.
Definition: ipet_BasicConstraintsBuilder.cpp:109
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
Definition: BasicConstraintsBuilder.h:41
This a list of properties.
Definition: PropList.h:63
A variable is an identifier used for performing ILP computation.
Definition: Var.h:36
An ILP system is a colletion of ILP constraint that may maximize or minimize some object function...
Definition: System.h:42
Encapsulation for ilp::Var pointers for {ilp} expr user-fiendly interface.
Definition: expr.h:29