Otawa
0.10
|
A PFG (Program Flow Graph) is built from the binary form of the program to represent all possible pathes of the program from its entry point. More...
#include <otawa/cfg/PFG.h>
Public Types | |
typedef N * | Vertex |
typedef E * | Edge |
Public Member Functions | |
PFG (void) | |
PFG constructor. More... | |
void | add (BB *bb) |
Add a basic block to a PFG. More... | |
BB * | get (Address addr) |
Get a basic block from its address. More... | |
int | count (void) const |
bool | contains (N *item) const |
bool | isEmpty (void) const |
operator bool (void) const | |
void | clear (void) |
void | add (GenNode *node) |
void | add (Node *node) |
Add new node. More... | |
template<template< class _ > class C> | |
void | addAll (const C< N * > &items) |
void | remove (GenNode *node) |
void | remove (GenEdge *edge) |
template<template< class _ > class C> | |
void | removeAll (const C< N * > &items) |
N * | sinkOf (E *edge) const |
int | outDegree (N *vertex) const |
bool | isSuccessorOf (N *succ, N *ref) const |
N * | sourceOf (E *edge) const |
int | inDegree (N *vertex) const |
bool | isPredecessorOf (N *succ, N *ref) const |
int | indexOf (N *vertex) const |
const graph::Graph * | _ (void) const |
graph::Graph * | _ (void) |
Static Public Member Functions | |
static const graph::Node * | _ (const GenNode *node) |
static const graph::Edge * | _ (const GenEdge *edge) |
static graph::Node * | _ (GenNode *node) |
static graph::Edge * | _ (Edge *edge) |
Public Attributes | |
BB | ret |
This special basic block is used as the sink vertex of edges representing sub-program return. More... | |
BB | unknown |
This special basic block is used as the sink vertex of edges representing branch or call to an unknown target. More... | |
Private Attributes | |
genstruct::HashTable< Address, BB * > | bbs |
A PFG (Program Flow Graph) is built from the binary form of the program to represent all possible pathes of the program from its entry point.
Building a PFG is the first step to understand the control flow of the program. Usually, it helps to analyze the sub-program and processed CFG (Control Flow Graphs) are extracted from it.
|
inherited |
|
inherited |
otawa::pfg::PFG::PFG | ( | void | ) |
PFG constructor.
References otawa::GenGraph< N, E >::add(), ret, and unknown.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
Referenced by add(), PFG(), and otawa::ccg::Builder::processLBlockSet().
void otawa::pfg::PFG::add | ( | BB * | bb | ) |
Add a basic block to a PFG.
bb | Basic block to add. |
References otawa::GenGraph< N, E >::add(), otawa::pfg::BB::address(), otawa::cfgio::bb(), and bbs.
Referenced by otawa::PFGBuilder::addFunction().
|
inherited |
Add new node.
node | Node to add. |
References otawa::graph::Node::_graph, and otawa::graph::Node::idx.
Referenced by otawa::GenGraph< ParamExeNode, otawa::ExeGraph::ExeEdge >::add(), otawa::graph::Graph::addAll(), and otawa::graph::Node::Node().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Referenced by otawa::etime::EdgeTimeBuilder::rollback().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
private |
BB otawa::pfg::PFG::ret |
This special basic block is used as the sink vertex of edges representing sub-program return.
Referenced by otawa::PFGBuilder::finalizeBB(), PFG(), and otawa::PFGBuilder::processWorkSpace().
BB otawa::pfg::PFG::unknown |
This special basic block is used as the sink vertex of edges representing branch or call to an unknown target.
Referenced by otawa::PFGBuilder::finalizeBB(), PFG(), and otawa::PFGBuilder::processWorkSpace().