Otawa  0.10
EventCollector.h
Go to the documentation of this file.
1 /*
2  * EventCollector class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2014, IRIT UPS.
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 OTAWA_ETIME_EVENTCOLLECTOR_H_
22 #define OTAWA_ETIME_EVENTCOLLECTOR_H_
23 
24 #include <otawa/etime/features.h>
25 
26 namespace otawa { namespace etime {
27 
32 public:
33 
34  EventCollector(Event *event): imprec(0), evt(event) { }
35  typedef enum {
37  PREFIX_ON = 1,
38  BLOCK_OFF = 2,
39  BLOCK_ON = 3,
40  SIZE = 4
41  } case_t;
42 
43  inline Event *event(void) const { return evt; }
44 
45  void contribute(case_t c, ilp::Var *var);
46  void make(ilp::System *sys);
47 
48 private:
49  inline bool isOn(case_t c);
50 
54 };
55 
56 } } // otawa::etime
57 
58 #endif /* OTAWA_ETIME_EVENTCOLLECTOR_H_ */
void contribute(case_t c, ilp::Var *var)
Add a variable contribution.
Definition: EdgeTimeBuilder.cpp:204
EventCollector(Event *event)
Definition: EventCollector.h:34
Definition: EventCollector.h:36
Definition: EventCollector.h:39
Collects variables linking events with blocks in ILP.
Definition: EventCollector.h:31
Definition: EventCollector.h:38
Definition: EventCollector.h:37
genstruct::SLList< ilp::Var * > vars[SIZE]
Definition: EventCollector.h:53
Event * evt
Definition: EventCollector.h:52
bool isOn(case_t c)
Test if the event is on or off.
Definition: EdgeTimeBuilder.cpp:241
An event represents a time variation in the execution of an instruction.
Definition: features.h:64
void make(ilp::System *sys)
Make the variable and constraint for the current event.
Definition: EdgeTimeBuilder.cpp:218
t::uint32 imprec
Definition: EventCollector.h:51
case_t
Definition: EventCollector.h:35
A variable is an identifier used for performing ILP computation.
Definition: Var.h:36
Event * event(void) const
Definition: EventCollector.h:43
An ILP system is a colletion of ILP constraint that may maximize or minimize some object function...
Definition: System.h:42
Definition: EventCollector.h:40
uint32_t uint32