Otawa  0.10
otawa::pfg::Edge Class Reference

This class represents the control transfer between basic block (BB). More...

#include <otawa/cfg/PFG.h>

Inheritance diagram for otawa::pfg::Edge:
otawa::GenGraph< N, E >::GenEdge otawa::graph::Edge

Public Types

enum  kind_t {
  NONE = 0, SEQ = 1, BRANCH = 2, COND_BRANCH = 3,
  CALL = 4, COND_CALL = 5, RETURN = 6, COND_RETURN = 7
}
 Type of edges. More...
 
typedef enum
otawa::pfg::Edge::kind_t 
kind_t
 

Public Member Functions

 Edge (BB *source, BB *sink, kind_t kind)
 
kind_t kind (void) const
 Get the kind of an edge. More...
 
N * source (void) const
 
N * target (void) const
 

Private Attributes

kind_t _kind
 

Detailed Description

This class represents the control transfer between basic block (BB).

An edge is defined by its source basic block, its sink basic block and its type:

  • Edge::NONE – null edge kind (must not be found in PFG),
  • Edge::SEQ – sequential control transfer between two adjacent basic blocks,
  • Edge::BRANCH – transfer by a taken branch instruction,
  • Edge::COND_BRANCH – transfer by a taken conditional branch instruction,
  • Edge::CALL – transfer by a taken sub-program call instruction,
  • Edge::COND_CALL – transfer by a taken conditional sub-program call instruction,
  • Edge::RETURN – transfer a taken sub-program return instruction (notice that the sink node is ever PFG::ret).
  • Edge::COND_RETURN – transfer a taken conditional sub-program return instruction (notice that the sink node is ever PFG::ret)..

Some rules applies on the outing edges of a basic block:

Notice also that basic block that branch to unknown address have an edge with PFG::unknown as sink basic block.

Member Typedef Documentation

Member Enumeration Documentation

Type of edges.

Look at Edge for more details.

Enumerator
NONE 
SEQ 
BRANCH 
COND_BRANCH 
CALL 
COND_CALL 
RETURN 
COND_RETURN 

Constructor & Destructor Documentation

otawa::pfg::Edge::Edge ( BB source,
BB sink,
kind_t  kind 
)
inline

Member Function Documentation

kind_t otawa::pfg::Edge::kind ( void  ) const
inline

Get the kind of an edge.

Returns
Kind of edge.
template<class N, class E>
N* otawa::GenGraph< N, E >::GenEdge::source ( void  ) const
inlineinherited
template<class N, class E>
N* otawa::GenGraph< N, E >::GenEdge::target ( void  ) const
inlineinherited

Member Data Documentation

kind_t otawa::pfg::Edge::_kind
private

The documentation for this class was generated from the following files: