Otawa  0.10
LoopReductor.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * LoopReductor processor interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2007-08, 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
21  * 02110-1301 USA
22  */
23 
24 #ifndef CFG_LOOPREDUCTOR_H_
25 #define CFG_LOOPREDUCTOR_H_
26 
27 #include <otawa/proc/Processor.h>
28 #include <otawa/cfg/VirtualCFG.h>
29 #include <otawa/cfg/CFGCollector.h>
31 #include <otawa/proc/Feature.h>
32 #include <otawa/dfa/BitSet.h>
33 
34 namespace otawa {
35 
36 
37 
38 class LoopReductor: public Processor {
39 
40  public:
41  LoopReductor(bool _reduce_loops = true);
42  virtual void processWorkSpace(WorkSpace*);
43 
44 
45  private:
46 
47  void reduce(otawa::VirtualCFG *vcfg, otawa::CFG *cfg);
51 
54  int idx;
56 ;
57 };
58 
59 }
60 
61 
62 #endif
void depthFirstSearch(otawa::BasicBlock *bb, Vector< BasicBlock * > *ancestors)
Definition: cfg_LoopReductor.cpp:147
static Identifier< dfa::BitSet * > IN_LOOPS
Definition: LoopReductor.h:53
static Identifier< BasicBlock * > DUPLICATE_OF
Definition: LoopReductor.h:52
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
Definition: LoopReductor.h:38
virtual void processWorkSpace(WorkSpace *)
Process the given framework.
Definition: cfg_LoopReductor.cpp:73
The processor class is implemented by all code processor.
Definition: Processor.h:49
bool reduce_loops
Definition: LoopReductor.h:55
Vector< VirtualCFG * > vcfgvec
Definition: LoopReductor.h:49
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
void reduce(otawa::VirtualCFG *vcfg, otawa::CFG *cfg)
Definition: cfg_LoopReductor.cpp:192
static Identifier< bool > MARK
Definition: LoopReductor.h:50
A virtual CFG is a CFG not-mapped to real code, that is, it may contains virtual nodes for inlining f...
Definition: VirtualCFG.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
int idx
Definition: LoopReductor.h:54
LoopReductor(bool _reduce_loops=true)
Definition: cfg_LoopReductor.cpp:59