Otawa
0.10
|
A dirty manager allows to exploit the results of the dirty analysis (DIRTY_FEATURE). More...
#include <otawa/dcache/features.h>
Classes | |
struct | t |
Public Types | |
typedef struct otawa::dcache::DirtyManager::t | t |
State for the dirty analysis. More... | |
Public Member Functions | |
DirtyManager (const BlockCollection &coll) | |
bool | mayBeDirty (const t &value, int block) const |
Test if the given block may be dirty. More... | |
bool | mustBeDirty (const t &value, int block) const |
Test if the given block must be dirty. More... | |
const t & | bottom (void) const |
Build a bottom dirty state. More... | |
const t & | top (void) const |
Build a top dirty state. More... | |
void | set (t &d, const t &s) const |
Copy a state in an existing one. More... | |
void | update (t &d, const BlockAccess &acc) |
Update the dirty state with the given block access. More... | |
void | join (t &d, const t &s) const |
Join two dirty states. More... | |
bool | equals (const t &s1, const t &s2) const |
Test if both dirty states are equals. More... | |
Private Attributes | |
t | bot |
t | _top |
const BlockCollection & | _coll |
A dirty manager allows to exploit the results of the dirty analysis (DIRTY_FEATURE).
The code below shows how to use it:
State for the dirty analysis.
otawa::dcache::DirtyManager::DirtyManager | ( | const BlockCollection & | coll | ) |
const DirtyManager::t & otawa::dcache::DirtyManager::bottom | ( | void | ) | const |
Build a bottom dirty state.
References bot.
Test if both dirty states are equals.
s1 | First state to compare. |
s2 | Second state to compare. |
References otawa::dfa::BitSet::equals(), otawa::dcache::DirtyManager::t::may(), and otawa::dcache::DirtyManager::t::must().
Join two dirty states.
d | First and target dirty state. |
s | Second dirty state. |
References otawa::dcache::DirtyManager::t::may(), and otawa::dcache::DirtyManager::t::must().
bool otawa::dcache::DirtyManager::mayBeDirty | ( | const t & | state, |
int | block | ||
) | const |
Test if the given block may be dirty.
state | Dirty state. |
block | Block to test. |
References otawa::dfa::BitSet::contains(), and otawa::dcache::DirtyManager::t::may().
bool otawa::dcache::DirtyManager::mustBeDirty | ( | const t & | state, |
int | block | ||
) | const |
Test if the given block must be dirty.
state | Dirty state. |
block | Block to test. |
References otawa::dfa::BitSet::contains(), and otawa::dcache::DirtyManager::t::must().
Copy a state in an existing one.
d | State to copy to. |
s | State to copy from. |
References otawa::dcache::DirtyManager::t::may(), and otawa::dcache::DirtyManager::t::must().
const DirtyManager::t & otawa::dcache::DirtyManager::top | ( | void | ) | const |
Build a top dirty state.
References _top.
void otawa::dcache::DirtyManager::update | ( | t & | d, |
const BlockAccess & | acc | ||
) |
Update the dirty state with the given block access.
d | Dirty state to change (input and output of the update). |
acc | Block access to update with. |
References _coll, otawa::dcache::BlockAccess::action(), otawa::dfa::BitSet::add(), otawa::dcache::BlockAccess::ANY, otawa::dcache::BlockAccess::BLOCK, otawa::dcache::BlockAccess::block(), otawa::dcache::BlockCollection::cacheSet(), otawa::dcache::BlockCollection::count(), otawa::dfa::BitSet::empty(), otawa::dfa::BitSet::fill(), otawa::dcache::Block::index(), otawa::dcache::BlockAccess::inRange(), otawa::dcache::BlockAccess::kind(), otawa::dcache::BlockAccess::LOAD, otawa::dcache::DirtyManager::t::may(), otawa::dcache::DirtyManager::t::must(), otawa::clp::NONE, otawa::dcache::BlockAccess::PURGE, otawa::dcache::BlockAccess::RANGE, otawa::dfa::BitSet::remove(), otawa::dcache::Block::set(), and otawa::dcache::BlockAccess::STORE.
|
private |
Referenced by update().
|
private |
Referenced by DirtyManager(), and top().
|
private |
Referenced by bottom(), and DirtyManager().