Otawa
0.10
|
A basic block in a otawa::pfg::PFG . More...
#include <otawa/cfg/PFG.h>
Classes | |
class | InstIter |
Iterator on the instructions of a basic block. More... | |
Public Member Functions | |
BB (void) | |
BB (Inst *first, t::uint32 size) | |
Address | address (void) const |
Get the start address of the basic block. More... | |
Address | topAddress (void) const |
Get the address next after the basic block, that is, address + size. More... | |
t::uint32 | size (void) const |
Get the size of the basic block. More... | |
Inst * | first (void) const |
Get the first instruction of the basic block. More... | |
int | count (void) const |
Count the number of instructions in the basic block. More... | |
PFG & | pfg (void) const |
bool | isControl (void) const |
Test if the basic block is ended by a control instruction. More... | |
bool | isBranch (void) const |
Test if the basic block is ended by a simple branch instruction (neither a call, nor a return). More... | |
bool | isConditional (void) const |
Test if the basic block is ended by a conditional branch. More... | |
bool | isBranched (void) const |
bool | isCall (void) const |
Test if the basic block ends with a call instruction. More... | |
bool | isReturn (void) const |
Test if the basic block ends with a return instruction. More... | |
bool | isMultiTarget (void) const |
Test if the basic block ends with a multi-target branch instruction (either branch, or call). More... | |
void | setSize (size_t size) |
int | index (void) const |
bool | hasSucc (void) const |
bool | hasPred (void) const |
int | countSucc (void) const |
int | countPred (void) const |
bool | isPredOf (const GenNode *node) |
bool | isSuccOf (const GenNode *node) |
Private Attributes | |
Inst * | _first |
t::uint32 | _size |
A basic block in a otawa::pfg::PFG .
|
inline |
|
inline |
Get the start address of the basic block.
Referenced by otawa::pfg::PFG::add(), and otawa::PFGBuilder::finalizeBB().
|
inline |
Count the number of instructions in the basic block.
|
inlineinherited |
References otawa::graph::Node::countPred().
|
inlineinherited |
References otawa::graph::Node::countSucc().
|
inline |
Get the first instruction of the basic block.
Referenced by otawa::PFGBuilder::finalizeBB().
|
inlineinherited |
References otawa::graph::Node::hasPred().
Referenced by otawa::LiExeGraph::shadeNodes().
|
inlineinherited |
References otawa::graph::Node::hasSucc().
|
inlineinherited |
References otawa::graph::Node::index().
Referenced by otawa::ParamExeNode::contentionDep(), otawa::ParamExeGraph::cost(), otawa::ParamExeNode::d(), otawa::ParamExeNode::delay(), otawa::ParExeNode::delay(), otawa::ParExeNode::producer(), otawa::ParamExeNode::setContentionDep(), otawa::ParExeNode::setDelay(), and otawa::ParamExeNode::setE().
bool otawa::pfg::BB::isBranch | ( | void | ) | const |
Test if the basic block is ended by a simple branch instruction (neither a call, nor a return).
References otawa::pfg::Edge::BRANCH, otawa::pfg::Edge::COND_BRANCH, and otawa::cfgio::edge().
bool otawa::pfg::BB::isBranched | ( | void | ) | const |
bool otawa::pfg::BB::isCall | ( | void | ) | const |
Test if the basic block ends with a call instruction.
References otawa::pfg::Edge::CALL, otawa::pfg::Edge::COND_CALL, and otawa::cfgio::edge().
bool otawa::pfg::BB::isConditional | ( | void | ) | const |
Test if the basic block is ended by a conditional branch.
References otawa::pfg::Edge::COND_BRANCH, otawa::pfg::Edge::COND_CALL, otawa::pfg::Edge::COND_RETURN, and otawa::cfgio::edge().
bool otawa::pfg::BB::isControl | ( | void | ) | const |
Test if the basic block is ended by a control instruction.
References otawa::cfgio::edge(), and otawa::pfg::Edge::SEQ.
bool otawa::pfg::BB::isMultiTarget | ( | void | ) | const |
Test if the basic block ends with a multi-target branch instruction (either branch, or call).
References otawa::pfg::Edge::BRANCH, otawa::pfg::Edge::CALL, otawa::pfg::Edge::COND_BRANCH, otawa::pfg::Edge::COND_CALL, and otawa::cfgio::edge().
|
inlineinherited |
References otawa::graph::Node::countPred().
bool otawa::pfg::BB::isReturn | ( | void | ) | const |
Test if the basic block ends with a return instruction.
References otawa::pfg::Edge::COND_RETURN, otawa::cfgio::edge(), and otawa::pfg::Edge::RETURN.
|
inlineinherited |
References otawa::graph::Node::isSuccOf().
|
inline |
|
inline |
Referenced by otawa::PFGBuilder::finalizeBB().
|
inline |
Get the size of the basic block.
|
inline |
Get the address next after the basic block, that is, address + size.
References otawa::ot::address().
|
private |
|
private |