Otawa
0.10
|
A pack of CLP states inside a BasicBlock. More...
#include <otawa/data/clp/ClpPack.h>
Classes | |
class | Context |
A context allows to share a CLP problem through different constructions of ClpStatePack. More... | |
class | InstPack |
A pack of CLP states inside a machine instruction. More... | |
Public Types | |
typedef Vector< clp::State * > ::Iterator | StateIterator |
typedef Vector< InstPack * > ::Iterator | PackIterator |
Public Member Functions | |
ClpStatePack (BasicBlock *bb, Process *process) | |
Constructor of a new ClpStatePack. More... | |
ClpStatePack (BasicBlock *bb, const Context &context) | |
Build a CLP state pack from a context. More... | |
~ClpStatePack (void) | |
Destructor for ClpStatePack. More... | |
BasicBlock * | bb (void) |
PackIterator | getIterator (void) |
clp::State | state_after (address_t instruction) |
clp::State | state_after (address_t instruction, int sem) |
clp::State | state_before (address_t instruction) |
clp::State | state_before (address_t instruction, int sem) |
InstPack * | newPack (address_t inst) |
Add a new instruction pack inside the ClpStatePack. More... | |
Private Attributes | |
BasicBlock * | _bb |
Vector< InstPack * > | _packs |
Friends | |
class | ClpProblem |
A pack of CLP states inside a BasicBlock.
A ClpStatePack must be constructed after the run of the ClpAnalysis.
Use it to retreive the state of a specific instruction or semantic instruction.
This constructor will use the input state of the BasicBlock, and run again the analysis until the end of the block.
The state for each instruction and semantic instruction will be saved inside the pack.
typedef Vector<InstPack*>::Iterator otawa::clp::ClpStatePack::PackIterator |
typedef Vector<clp::State*>::Iterator otawa::clp::ClpStatePack::StateIterator |
otawa::clp::ClpStatePack::ClpStatePack | ( | BasicBlock * | bb, |
Process * | process | ||
) |
Constructor of a new ClpStatePack.
bb | BasicBlock to be analysed. |
process | Current process. |
References _bb, ClpProblem, and otawa::clp::STATE_IN.
otawa::clp::ClpStatePack::ClpStatePack | ( | BasicBlock * | bb, |
const Context & | context | ||
) |
Build a CLP state pack from a context.
bb | BB to analyze. |
context | Context to use. |
References _bb, otawa::clp::ClpStatePack::Context::problem(), and otawa::clp::STATE_IN.
otawa::clp::ClpStatePack::~ClpStatePack | ( | void | ) |
Destructor for ClpStatePack.
References _packs.
|
inline |
References _bb.
|
inline |
References _packs.
Referenced by state_after(), and state_before().
ClpStatePack::InstPack * otawa::clp::ClpStatePack::newPack | ( | address_t | inst | ) |
Add a new instruction pack inside the ClpStatePack.
References _packs.
clp::State otawa::clp::ClpStatePack::state_after | ( | address_t | instruction | ) |
instruction | is the address of the instruction to get the state of. |
References otawa::clp::State::EMPTY, getIterator(), otawa::clp::ClpStatePack::InstPack::inst_addr(), and otawa::clp::ClpStatePack::InstPack::outputState().
Referenced by otawa::se::FilterBuilder::makeFilters().
clp::State otawa::clp::ClpStatePack::state_after | ( | address_t | instruction, |
int | sem | ||
) |
instruction | is the address of the instruction where the semantic instruction is. |
sem | is the index (starting from 0) of the semantic instruction inside the block corresponding to the machine instruction. |
References otawa::clp::ClpStatePack::InstPack::_states, otawa::clp::State::EMPTY, getIterator(), and otawa::clp::ClpStatePack::InstPack::inst_addr().
clp::State otawa::clp::ClpStatePack::state_before | ( | address_t | instruction | ) |
instruction | is the address of the instruction to get the state before. |
References _bb, getIterator(), otawa::clp::ClpStatePack::InstPack::inst_addr(), otawa::clp::ClpStatePack::InstPack::outputState(), and otawa::clp::STATE_IN.
Referenced by otawa::se::getFilterForAddr(), and otawa::se::getFilterForReg().
clp::State otawa::clp::ClpStatePack::state_before | ( | address_t | instruction, |
int | sem | ||
) |
instruction | is the address of the instruction where the semantic instruction is. |
sem | is the index (starting from 0) of the semantic instruction inside the block corresponding to the machine instruction. |
References _bb, otawa::clp::ClpStatePack::InstPack::_states, getIterator(), otawa::clp::ClpStatePack::InstPack::inst_addr(), otawa::clp::ClpStatePack::InstPack::isEmpty(), otawa::clp::ClpStatePack::InstPack::outputState(), and otawa::clp::STATE_IN.
|
friend |
Referenced by ClpStatePack(), and otawa::clp::ClpStatePack::Context::Context().
|
private |
Referenced by bb(), ClpStatePack(), and state_before().
Referenced by getIterator(), newPack(), and ~ClpStatePack().