Otawa
0.10
|
A block access represents a data memory access of an instruction. More...
#include <otawa/dcache/features.h>
Public Types | |
enum | action_t { NONE = 0, LOAD = 1, STORE = 2, PURGE = 3 } |
enum | kind_t { ANY = 0, BLOCK = 1, RANGE = 2 } |
typedef enum otawa::dcache::BlockAccess::action_t | action_t |
typedef enum otawa::dcache::BlockAccess::kind_t | kind_t |
Public Member Functions | |
BlockAccess (void) | |
Build a null block access. More... | |
BlockAccess (Inst *instruction, action_t action) | |
Build a block access of type ANY. More... | |
BlockAccess (Inst *instruction, action_t action, const Block &block) | |
BlockAccess (Inst *instruction, action_t action, Address::offset_t first, Address::offset_t last) | |
Build a block access of type range. More... | |
BlockAccess (const BlockAccess &acc) | |
Construction by cloning. More... | |
BlockAccess & | operator= (const BlockAccess &acc) |
Inst * | instruction (void) const |
Get the instruction performing the access. More... | |
kind_t | kind (void) const |
Get the kind of the access. More... | |
bool | isAny (void) const |
action_t | action (void) const |
Get the performed action. More... | |
const Block & | block (void) const |
Only for kind BLOCK, get the accessed block. More... | |
int | first (void) const |
int | last (void) const |
bool | inRange (int block) const |
Test if the given block is the range of the given access. More... | |
bool | inSet (int set, const hard::Cache *cache) const |
Test if the given set concerns the range access. More... | |
bool | in (const Block &block) const |
Test if the given block may be concerned by the current access. More... | |
void | print (io::Output &out) const |
Property * | getProp (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) |
Property * | extractProp (const AbstractIdentifier *id) |
Remove a property matching the given identifier and return it. More... | |
Property * | extractProp (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... | |
Static Public Attributes | |
static const PropList | EMPTY |
This is an empty proplist for convenience. More... | |
Private Attributes | |
Inst * | inst |
t::uint8 | _kind |
t::uint8 | _action |
union { | |
const Block * blk | |
struct { | |
hard::Cache::block_t first | |
hard::Cache::block_t last | |
} range | |
} | data |
A block access represents a data memory access of an instruction.
The action is defined by BlockAccess::action_t that may be:
Possible kinds of data accesses include:
|
inline |
Build a null block access.
Build a block access of type ANY.
instruction | Instruction performing the access. |
action | Type of action. |
|
inline |
Build a block access of type range.
Notice the address of first block may be greater than the address of the second block, meaning that the accessed addresses ranges across the address modulo by 0.
instruction | Instruction performing the access. |
action | Type of action. |
first | First accessed block (must a cache block boundary address). |
last | Last access block (must a cache block boundary address). |
|
inline |
|
inline |
Get the performed action.
References _action.
Referenced by otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::dcache::MUSTProblem::purge(), otawa::dcache::PERSProblem::purge(), otawa::dcache::MUSTPERS::update(), otawa::dcache::MUSTProblem::update(), and otawa::dcache::DirtyManager::update().
|
inherited |
Add property to the list without checking of duplication.
prop | Property to add. |
References otawa::Property::_next.
Referenced by otawa::Identifier< T >::add(), otawa::ast::ASTInfo::ASTInfo(), otawa::Identifier< otawa::arm::Info * >::copy(), otawa::AbstractIdentifier::initProps(), otawa::ContextualProperty::make(), otawa::script::Script::makeConfig(), otawa::ccg::Builder::processLBlockSet(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::Identifier< T >::ref(), otawa::ContextualProperty::ref(), and otawa::ContextualProperty::refProps().
|
inherited |
Add all properties from the given property list, in a reverse order.
props | Property list to clone. |
References copy(), otawa::PropList::head, and otawa::Property::next().
Referenced by otawa::display::CFGDrawer::CFGDrawer(), otawa::display::GraphVizGraph::GraphVizGraph(), otawa::ParamFeature::instantiate(), otawa::Manager::loadXML(), otawa::display::GraphVizGraph::newEdge(), otawa::display::GraphVizGraph::newNode(), otawa::PropList::operator=(), otawa::Process::Process(), otawa::PropList::PropList(), otawa::display::GraphVizItem::setProps(), otawa::VirtualBasicBlock::VirtualBasicBlock(), and otawa::VirtualCFG::VirtualCFG().
|
inline |
Only for kind BLOCK, get the accessed block.
References _kind, BLOCK, and data.
Referenced by BlockAccess(), inRange(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::dcache::MUSTProblem::purge(), otawa::dcache::PERSProblem::purge(), otawa::dcache::MUSTPERS::update(), otawa::dcache::MUSTProblem::update(), otawa::dcache::MAYProblem::update(), and otawa::dcache::DirtyManager::update().
|
inherited |
Remove all properties from the list.
References otawa::Property::next().
Referenced by otawa::PSTBuilder::getVCFG(), otawa::PropList::operator=(), otawa::display::GraphVizItem::setProps(), otawa::PropList::~PropList(), and otawa::WorkSpace::~WorkSpace().
|
inherited |
Remove a property matching the given identifier and return it.
Caller is responsible of the management of the obtained property.
id | Identifier of the property to extract. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::script::Script::makeConfig().
|
inlineinherited |
Remove a property matching the given identifier and return it.
Caller is responsible of the management of the obtained property.
id | Identifier of the property to extract. |
References otawa::PropList::extractProp().
Referenced by otawa::PropList::extractProp().
|
inline |
References _kind, data, and RANGE.
Referenced by BlockAccess(), and inRange().
|
inherited |
Find a property by its identifier.
id | Identifier of the property to find. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::Identifier< otawa::arm::Info * >::exists(), otawa::ContextualProperty::exists(), otawa::ContextualProperty::find(), otawa::Identifier< T >::get(), otawa::PropList::hasProp(), otawa::ContextualProperty::make(), otawa::ParamFeature::matches(), otawa::ImmutableRef< T, I >::print(), otawa::ContextualProperty::print(), otawa::Identifier< T >::ref(), otawa::ContextualProperty::ref(), otawa::ContextualProperty::refProps(), otawa::Identifier< T >::set(), otawa::Identifier< T >::use(), and otawa::Identifier< T >::value().
|
inlineinherited |
Test if the property list contains a property matching the given identifier.
id | Property identifier to look for. |
References otawa::PropList::getProp().
Referenced by otawa::ipet::BasicConstraintsBuilder::addEntryConstraint(), otawa::Monitor::configure(), otawa::ImmutableRef< T, I >::exists(), and otawa::Manager::setVerbosity().
bool otawa::dcache::BlockAccess::in | ( | const Block & | block | ) | const |
Test if the given block may be concerned by the current access.
block | Block to test. |
References otawa::dcache::Block::address(), otawa::etime::BLOCK, otawa::dcache::Block::index(), and kind.
|
inline |
Test if the given block is the range of the given access.
block | Address of the cache block. |
References block(), first(), and last().
Referenced by otawa::dcache::MUSTProblem::purge(), otawa::dcache::PERSProblem::purge(), and otawa::dcache::DirtyManager::update().
bool otawa::dcache::BlockAccess::inSet | ( | int | set, |
const hard::Cache * | cache | ||
) | const |
Test if the given set concerns the range access.
set | Set to test for. |
cache | Current cache (to get set information). |
References otawa::hard::Cache::set(), otawa::hard::Cache::setCount(), and otawa::hard::Cache::tag().
|
inline |
Get the instruction performing the access.
References inst.
Referenced by otawa::etime::StandardEventBuilder::processBB(), and otawa::dcache::CatConstraintBuilder::processWorkSpace().
|
inline |
Get the kind of the access.
References _kind.
Referenced by otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::dcache::MUSTProblem::purge(), otawa::dcache::PERSProblem::purge(), otawa::dcache::MUSTPERS::update(), otawa::dcache::MUSTProblem::update(), otawa::dcache::MAYProblem::update(), and otawa::dcache::DirtyManager::update().
|
inline |
References _kind, data, and RANGE.
Referenced by BlockAccess(), and inRange().
|
inline |
void otawa::dcache::BlockAccess::print | ( | io::Output & | out | ) | const |
References _action, _kind, otawa::ProgItem::address(), ANY, BLOCK, data, inst, PURGE, and RANGE.
Referenced by otawa::dcache::operator<<().
|
inherited |
Remove all the properties matching the given identifier.
id | Identifier of properties to remove. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::LoopUnroller::unroll().
|
inherited |
Remove a property matching the given identifier.
id | Identifier of the property to remove. |
References otawa::Property::_next, and otawa::Property::next().
Referenced by otawa::PSTBuilder::buildTree(), otawa::BBRemover< T >::clean(), otawa::display::CFGOutput::processCFG(), otawa::SubCFGBuilder::processWorkSpace(), otawa::Ref< T, I >::remove(), and otawa::ContextualPath::Ref< T >::remove().
|
inlineinherited |
References otawa::PropList::removeProp().
Referenced by otawa::PropList::removeProp().
|
inherited |
Set the property in the property list removing any double.
prop | Property to set. |
References otawa::Property::_next, otawa::Property::id(), and otawa::Property::next().
|
inlineinherited |
References otawa::PropList::setProp().
Referenced by otawa::PropList::setProp().
|
private |
Referenced by action(), operator=(), and print().
|
private |
const Block* otawa::dcache::BlockAccess::blk |
union { ... } otawa::dcache::BlockAccess::data |
Referenced by block(), BlockAccess(), first(), last(), operator=(), and print().
|
staticinherited |
This is an empty proplist for convenience.
Address::offset_t otawa::dcache::BlockAccess::first |
Only for the RANGE kind, get the first accessed block.
Referenced by otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::MUSTPERS::update(), and otawa::dcache::MUSTProblem::update().
|
private |
Referenced by instruction(), operator=(), and print().
Address::offset_t otawa::dcache::BlockAccess::last |
Only for the RANGE kind, get the last accessed block.
Referenced by otawa::dcache::MUSTPERS::update(), and otawa::dcache::MUSTProblem::update().
struct { ... } otawa::dcache::BlockAccess::range |