Otawa  0.10
otawa::etime::EventCollector Class Reference

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)
 
Eventevent (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
 
Eventevt
 
genstruct::SLList< ilp::Var * > vars [SIZE]
 

Detailed Description

Collects variables linking events with blocks in ILP.

Member Enumeration Documentation

Enumerator
PREFIX_OFF 
PREFIX_ON 
BLOCK_OFF 
BLOCK_ON 
SIZE 

Constructor & Destructor Documentation

otawa::etime::EventCollector::EventCollector ( Event event)
inline

Member Function Documentation

void otawa::etime::EventCollector::contribute ( case_t  c,
ilp::Var var 
)

Add a variable contribution.

Parameters
cCase of contribution.
varVariable of contribution (null for blurred contribution driving to estimation).

References elm::genstruct::SLList< T, E >::add(), imprec, and vars.

Event* otawa::etime::EventCollector::event ( void  ) const
inline

References evt.

bool otawa::etime::EventCollector::isOn ( case_t  c)
inlineprivate

Test if the event is on or off.

Parameters
cCase to test.
Returns
True if on, false if off.

References SIZE.

Referenced by make().

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.

Parameters
sysSystem 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.

Member Data Documentation

Event* otawa::etime::EventCollector::evt
private

Referenced by event(), and make().

t::uint32 otawa::etime::EventCollector::imprec
private

Referenced by contribute().

genstruct::SLList<ilp::Var *> otawa::etime::EventCollector::vars[SIZE]
private

Referenced by contribute(), and make().


The documentation for this class was generated from the following files: