Otawa
0.10
|
This allows storing all CFG available in a workspace. More...
#include <otawa/cfg/CFGInfo.h>
Classes | |
class | Iter |
Public Member Functions | |
CFGInfo (WorkSpace *fw) | |
Build a new CFGInfo. More... | |
virtual | ~CFGInfo (void) |
Delete the CFG information contained in this program. More... | |
CFG * | findCFG (Address addr) |
Get a CFG from the address of its first instruction. More... | |
CFG * | findCFG (Inst *inst) |
Find the CFG starting by the basic block containing this instruction. More... | |
CFG * | findCFG (const BasicBlock *bb) |
Find the CFG starting at the given basic block. More... | |
CFG * | findCFG (String label) |
Find the CFG starting at the given label. More... | |
void | add (CFG *cfg) |
Add a CFG to the CFG information structure. More... | |
void | add (BasicBlock *bb) |
Add the given BB to the CFG information. More... | |
void | clear (void) |
Remove all CFG stored in this CFG information. More... | |
void | lock (void) |
void | unlock () |
Static Public Attributes | |
static Identifier< CFGInfo * > & | ID = CFG_INFO |
This property allows to get the CFG information from the current CFG is member of. More... | |
Private Attributes | |
WorkSpace * | fw |
genstruct::FragTable< CFG * > | _cfgs |
genstruct::FragTable < BasicBlock * > | bbs |
MemBlockMap< BasicBlock > | map |
This allows storing all CFG available in a workspace.
otawa::CFGInfo::CFGInfo | ( | WorkSpace * | _fw | ) |
|
virtual |
void otawa::CFGInfo::add | ( | CFG * | cfg | ) |
Add a CFG to the CFG information structure.
cfg | Added CFG. |
References _cfgs.
Referenced by otawa::CFGBuilder::addCFG(), and otawa::CFGBuilder::buildCFG().
void otawa::CFGInfo::add | ( | BasicBlock * | bb | ) |
Add the given BB to the CFG information.
bb | BB to add. |
References elm::genstruct::FragTable< T >::add(), bbs, and map.
void otawa::CFGInfo::clear | ( | void | ) |
Remove all CFG stored in this CFG information.
References _cfgs, otawa::cfgio::bb(), bbs, elm::genstruct::FragTable< T >::clear(), and otawa::cfgio::edge().
Referenced by ~CFGInfo().
Get a CFG from the address of its first instruction.
addr | Address of the first instruction. |
References otawa::cfgio::bb(), and map.
Referenced by findCFG(), otawa::WorkSpace::getStartCFG(), and otawa::CFGCollector::processWorkSpace().
Find the CFG starting by the basic block containing this instruction.
If the CFG does not exists, it is created and added.
inst | Instruction to find the CFG starting with. |
References otawa::ProgItem::address(), otawa::cfgio::bb(), findCFG(), and map.
CFG * otawa::CFGInfo::findCFG | ( | const BasicBlock * | bb | ) |
Find the CFG starting at the given basic block.
bb | Basic block to look at. |
References otawa::ENTRY.
Find the CFG starting at the given label.
label | Label of the first instruction of the CFG. |
References findCFG(), otawa::Process::findInstAt(), fw, and otawa::WorkSpace::process().
|
private |
|
private |
|
private |