Otawa  0.10
otawa::dcache::PERSProblem::Domain Class Reference

#include <otawa/dcache/PERSProblem.h>

Public Member Functions

 Domain (const int _size, const int _A)
 
 Domain (const Domain &source)
 
 ~Domain (void)
 
Domainoperator= (const Domain &src)
 Assignement of persistence analysis ACS. More...
 
void lub (const Domain &dom)
 Compute the join of the current value with the given one and the result is left in the current ACS. More...
 
void lub (const Item &item)
 Special LUB: do the lub of each Item in current domain with item passed as parameter. More...
 
bool equals (const Domain &dom) const
 Test if two ACS are equals. More...
 
void empty (void)
 Empty the domain. More...
 
void setToBottom (void)
 Set the bottom value in the ACS. More...
 
ItemgetWhole (void)
 
bool contains (const int id, const int index)
 
void inject (MUSTProblem::Domain *must, const int id)
 Consider that the designed block is accessed. More...
 
bool isWiped (const int id, const int index)
 
int getAge (const int id, const int index) const
 
bool isPersistent (const int id, const int index)
 
void addDamage (const int id, const int index, int damage)
 
void addDamage (const int id, int damage)
 In partial analysis, add age damage to the given block. More...
 
void refresh (const int id, const int index, int newage)
 
void refresh (const int id, int newage)
 Refresh a block to the given age (if required). More...
 
void print (elm::io::Output &output) const
 Display the ACS. More...
 
void enterContext (void)
 Called when a loop context is entered to add a level. More...
 
void leaveContext (void)
 Called when a loop context is left to remove the top-level. More...
 
int length (void) const
 
ItemgetItem (const int idx) const
 
void ageAll (void)
 Consider that an unknown access is performed and, therefore, all blocks must be aged. More...
 
void setNotBottom (void)
 
void set (const ACS &w, const genstruct::Table< ACS * > &d)
 

Private Attributes

Item whole
 
genstruct::Vector< Item * > data
 
bool isBottom
 

Constructor & Destructor Documentation

otawa::dcache::PERSProblem::Domain::Domain ( const int  _size,
const int  _A 
)
inline
otawa::dcache::PERSProblem::Domain::Domain ( const Domain source)
inline

References data.

otawa::dcache::PERSProblem::Domain::~Domain ( void  )
inline

References data.

Member Function Documentation

void otawa::dcache::PERSProblem::Domain::addDamage ( const int  id,
const int  index,
int  damage 
)
inline

References data, and isBottom.

void otawa::dcache::PERSProblem::Domain::addDamage ( const int  id,
int  damage 
)

In partial analysis, add age damage to the given block.

Parameters
idIdentity of the aged block.
damageDamage value.
void otawa::dcache::PERSProblem::Domain::ageAll ( void  )

Consider that an unknown access is performed and, therefore, all blocks must be aged.

Referenced by otawa::dcache::MUSTPERS::ageAll().

bool otawa::dcache::PERSProblem::Domain::contains ( const int  id,
const int  index 
)
inline

References contains(), data, and isBottom.

Referenced by contains().

void otawa::dcache::PERSProblem::Domain::empty ( void  )
void otawa::dcache::PERSProblem::Domain::enterContext ( void  )

Called when a loop context is entered to add a level.

References otawa::dcache::ACS::empty().

Referenced by otawa::dcache::PERSProblem::enterContext(), and otawa::dcache::PERSProblem::PERSProblem().

bool otawa::dcache::PERSProblem::Domain::equals ( const Domain dom) const

Test if two ACS are equals.

Parameters
domACS to compare with.
Returns
True if they are equal, false else.

References data, otawa::dcache::PERSProblem::equals(), isBottom, and whole.

Referenced by otawa::dcache::PERSProblem::equals().

int otawa::dcache::PERSProblem::Domain::getAge ( const int  id,
const int  index 
) const
inline

References data, getAge(), and isBottom.

Referenced by getAge().

Item& otawa::dcache::PERSProblem::Domain::getItem ( const int  idx) const
inline
Item& otawa::dcache::PERSProblem::Domain::getWhole ( void  )
inline
void otawa::dcache::PERSProblem::Domain::inject ( MUSTProblem::Domain must,
const int  id 
)

Consider that the designed block is accessed.

Parameters
mustMust ACS (useful to work-around a bug in the original persistence analysis).
idIdentity of the accessed block.

Referenced by otawa::dcache::MUSTPERS::inject().

bool otawa::dcache::PERSProblem::Domain::isPersistent ( const int  id,
const int  index 
)
inline
bool otawa::dcache::PERSProblem::Domain::isWiped ( const int  id,
const int  index 
)
inline

References data, isBottom, and isWiped().

Referenced by isWiped().

void otawa::dcache::PERSProblem::Domain::leaveContext ( void  )

Called when a loop context is left to remove the top-level.

Referenced by otawa::dcache::PERSProblem::leaveContext().

int otawa::dcache::PERSProblem::Domain::length ( void  ) const
inline
void otawa::dcache::PERSProblem::Domain::lub ( const Domain dom)

Compute the join of the current value with the given one and the result is left in the current ACS.

Parameters
domACS to join with.

References data, isBottom, otawa::dcache::PERSProblem::lub(), and whole.

Referenced by otawa::dcache::PERSProblem::lub().

void otawa::dcache::PERSProblem::Domain::lub ( const Item item)

Special LUB: do the lub of each Item in current domain with item passed as parameter.

Used for the partial analysis

References otawa::dcache::PERSProblem::lub().

PERSProblem::Domain & otawa::dcache::PERSProblem::Domain::operator= ( const Domain src)

Assignement of persistence analysis ACS.

Parameters
srcAssigning domain.
Returns
Assigned domain.

References data, isBottom, and whole.

void otawa::dcache::PERSProblem::Domain::print ( elm::io::Output output) const

Display the ACS.

Parameters
outputStream to output to.

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

void otawa::dcache::PERSProblem::Domain::refresh ( const int  id,
const int  index,
int  newage 
)
inline

References data, and isBottom.

void otawa::dcache::PERSProblem::Domain::refresh ( const int  id,
int  newage 
)

Refresh a block to the given age (if required).

Parameters
idRefreshed block.
newageMaximal new age of the block.
void otawa::dcache::PERSProblem::Domain::set ( const ACS w,
const genstruct::Table< ACS * > &  d 
)
inline
void otawa::dcache::PERSProblem::Domain::setNotBottom ( void  )
inline

References isBottom.

void otawa::dcache::PERSProblem::Domain::setToBottom ( void  )

Set the bottom value in the ACS.

Referenced by otawa::dcache::PERSProblem::PERSProblem().

Member Data Documentation

genstruct::Vector<Item*> otawa::dcache::PERSProblem::Domain::data
private
bool otawa::dcache::PERSProblem::Domain::isBottom
private
Item otawa::dcache::PERSProblem::Domain::whole
private

Referenced by equals(), getWhole(), lub(), operator=(), and set().


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