Otawa
0.10
|
Collects variables linking events with blocks in ILP. More...
#include <otawa/etime/EventCollector.h>
Public Types | |
enum | case_t { PREFIX_OFF = 0, PREFIX_ON = 1, BLOCK_OFF = 2, BLOCK_ON = 3, SIZE = 4 } |
Public Member Functions | |
EventCollector (Event *event) | |
Event * | event (void) const |
void | contribute (case_t c, ilp::Var *var) |
Add a variable contribution. More... | |
void | make (ilp::System *sys) |
Make the variable and constraint for the current event. More... | |
Private Member Functions | |
bool | isOn (case_t c) |
Test if the event is on or off. More... | |
Private Attributes | |
t::uint32 | imprec |
Event * | evt |
genstruct::SLList< ilp::Var * > | vars [SIZE] |
Collects variables linking events with blocks in ILP.
|
inline |
Add a variable contribution.
c | Case of contribution. |
var | Variable of contribution (null for blurred contribution driving to estimation). |
References elm::genstruct::SLList< T, E >::add(), imprec, and vars.
|
inlineprivate |
void otawa::etime::EventCollector::make | ( | ilp::System * | sys | ) |
Make the variable and constraint for the current event.
According to the variable list and the provided overestimation, may generate zero, one or several constraints.
sys | System to create constraints in. |
References otawa::ilp::Constraint::addRight(), BLOCK_OFF, otawa::etime::EDGE, otawa::etime::Event::estimate(), evt, otawa::ilp::Constraint::GE, otawa::etime::Event::isEstimating(), isOn(), otawa::etime::Event::name(), otawa::ilp::System::newConstraint(), PREFIX_OFF, SIZE, otawa::etime::Event::type(), and vars.
|
private |
Referenced by contribute().
|
private |
Referenced by contribute(), and make().