Otawa  0.10
otawa::LBlock Class Reference

The l-block is an abstraction allowing to split the basic block according to the bound of the cache block, that is, instructions composing a l-block are owned by the same basic block and same cache block. More...

#include <otawa/cache/LBlock.h>

Inheritance diagram for otawa::LBlock:
elm::inhstruct::DLNode otawa::PropList

Public Member Functions

 LBlock (LBlockSet *set, BasicBlock *bb, Inst *inst, t::uint32 size, int cache_index)
 Build a new LBlock. More...
 
int index (void) const
 
Address address (void) const
 
BasicBlockbb (void) const
 
ot::size size (void) const
 Get the size of the current l-block. More...
 
LBlockSetlblockset (void) const
 
int countInsts (void)
 Count the instructions in the l-block. More...
 
int cacheBlock (void) const
 Compute the cache block of this L-block. More...
 
Instinstruction (void) const
 
int number (void) const
 Get the number of the LBlock in its cache row. More...
 
int id (void)
 
int cacheblock (void) const
 
DLNode * next (void) const
 
DLNode * previous (void) const
 
bool atBegin (void) const
 
bool atEnd (void) const
 
void replace (DLNode *node)
 
void insertAfter (DLNode *node)
 
void insertBefore (DLNode *node)
 
void remove (void)
 
void removeNext (void)
 
void removePrevious (void)
 
PropertygetProp (const AbstractIdentifier *id) const
 Find a property by its identifier. More...
 
void setProp (Property *prop)
 Set the property in the property list removing any double. More...
 
void setProp (const AbstractIdentifier *id)
 
void removeProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier. More...
 
void removeProp (const AbstractIdentifier &id)
 
PropertyextractProp (const AbstractIdentifier *id)
 Remove a property matching the given identifier and return it. More...
 
PropertyextractProp (const AbstractIdentifier &id)
 Remove a property matching the given identifier and return it. More...
 
void addProp (Property *prop)
 Add property to the list without checking of duplication. More...
 
void removeAllProp (const AbstractIdentifier *id)
 Remove all the properties matching the given identifier. More...
 
bool hasProp (const AbstractIdentifier &id) const
 Test if the property list contains a property matching the given identifier. More...
 
void clearProps (void)
 Remove all properties from the list. More...
 
void addProps (const PropList &props)
 Add all properties from the given property list, in a reverse order. More...
 
void print (elm::io::Output &out) const
 Display the current property list. More...
 

Static Public Attributes

static const PropList EMPTY
 This is an empty proplist for convenience. More...
 

Private Member Functions

 ~LBlock (void)
 

Private Attributes

LBlockSetlbs
 
Inst_inst
 
t::uint32 _size
 
BasicBlock_bb
 
int idx
 
int cid
 

Friends

class LBlockSet
 

Detailed Description

The l-block is an abstraction allowing to split the basic block according to the bound of the cache block, that is, instructions composing a l-block are owned by the same basic block and same cache block.

Therefore, when the first one is load in the cache, the next instructions are also load.

Constructor & Destructor Documentation

otawa::LBlock::LBlock ( LBlockSet lbset,
BasicBlock bb,
Inst inst,
t::uint32  size,
int  cache_index 
)

Build a new LBlock.

Parameters
lbsetL-block set which owns this l-block.
instInstruction it starts with.
bbBasic block containing this l-block.
sizeSize of the l-block.
cache_indxCache index.

References idx.

otawa::LBlock::~LBlock ( void  )
private

Member Function Documentation

Address otawa::LBlock::address ( void  ) const
inline
BasicBlock* otawa::LBlock::bb ( void  ) const
inline

References _bb.

Referenced by otawa::cat::CATBuilder::worst().

int otawa::LBlock::cacheBlock ( void  ) const
inline

Compute the cache block of this L-block.

Returns
Cache block.

References cid.

Referenced by otawa::LBlockSet::add().

int otawa::LBlock::cacheblock ( void  ) const
inline
void otawa::PropList::clearProps ( void  )
inherited
int otawa::LBlock::countInsts ( void  )

Count the instructions in the l-block.

Returns
L-block instruction count.

References _bb, _inst, _size, and otawa::ProgItem::address().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::script::Script::makeConfig().

Property * otawa::PropList::extractProp ( const AbstractIdentifier id)
inlineinherited

Remove a property matching the given identifier and return it.

Caller is responsible of the management of the obtained property.

Parameters
idIdentifier of the property to extract.

References otawa::PropList::extractProp().

Referenced by otawa::PropList::extractProp().

bool otawa::PropList::hasProp ( const AbstractIdentifier id) const
inlineinherited

Test if the property list contains a property matching the given identifier.

Parameters
idProperty identifier to look for.
Returns
True if the list contains the matching property, false else.

References otawa::PropList::getProp().

Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().

int otawa::LBlock::id ( void  )
inline

References idx.

Referenced by otawa::cat::CATBuilder::worst().

int otawa::LBlock::index ( void  ) const
inline

References idx.

Inst* otawa::LBlock::instruction ( void  ) const
inline

References _inst.

LBlockSet* otawa::LBlock::lblockset ( void  ) const
inline

References lbs.

Referenced by otawa::operator<<().

int otawa::LBlock::number ( void  ) const
inline

Get the number of the LBlock in its cache row.

This numbers span from 0 to LBlockSet::count() - 1.

Returns
Number of the l-block.

References idx.

Referenced by otawa::operator<<().

void otawa::PropList::print ( elm::io::Output out) const
inherited

Display the current property list.

Parameters
outOutput to use.

Referenced by otawa::operator<<(), and otawa::ContextualProperty::print().

void otawa::PropList::removeAllProp ( const AbstractIdentifier id)
inherited

Remove all the properties matching the given identifier.

Parameters
idIdentifier of properties to remove.

References otawa::Property::_next, and otawa::Property::next().

Referenced by otawa::LoopUnroller::unroll().

void otawa::PropList::removeProp ( const AbstractIdentifier id)
inherited
void otawa::PropList::removeProp ( const AbstractIdentifier id)
inlineinherited
void otawa::PropList::setProp ( Property prop)
inherited

Set the property in the property list removing any double.

Parameters
propProperty to set.

References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().

void otawa::PropList::setProp ( const AbstractIdentifier id)
inlineinherited
size_t otawa::LBlock::size ( void  ) const
inline

Get the size of the current l-block.

Returns
L-block size.

References _size.

Friends And Related Function Documentation

friend class LBlockSet
friend

Member Data Documentation

BasicBlock* otawa::LBlock::_bb
private

Referenced by bb(), and countInsts().

Inst* otawa::LBlock::_inst
private

Referenced by address(), countInsts(), and instruction().

t::uint32 otawa::LBlock::_size
private

Referenced by countInsts(), and size().

int otawa::LBlock::cid
private

Referenced by cacheBlock(), and cacheblock().

const PropList otawa::PropList::EMPTY
staticinherited

This is an empty proplist for convenience.

int otawa::LBlock::idx
private

Referenced by id(), index(), LBlock(), and number().

LBlockSet* otawa::LBlock::lbs
private

Referenced by lblockset().


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