Code Listener  [unstable] git snapshot
Public Types | Public Member Functions | Private Types | Private Attributes
ControlFlow Class Reference

Control flow graph - an easy to analyse representation of the intermediate code. More...

#include <storage.hh>

Collaboration diagram for ControlFlow:
Collaboration graph
[legend]

Public Types

typedef TList::const_iterator const_iterator
 
typedef const_iterator iterator
 

Public Member Functions

 ControlFlow ()
 
 ~ControlFlow ()
 
 ControlFlow (const ControlFlow &)
 shallow copy More...
 
ControlFlowoperator= (const ControlFlow &)
 shallow copy More...
 
const Blockentry () const
 return entry basic block More...
 
Block *& operator[] (const char *name)
 look for a basic block by name, create one if not found More...
 
const Blockoperator[] (const char *name) const
 look for a basic block by name, crash if not found More...
 
const_iterator begin () const
 return STL-like iterator to go through all basic blocks inside More...
 
const_iterator end () const
 return STL-like iterator to go through all basic blocks inside More...
 
size_t size () const
 return count of basic blocks inside the control flow graph More...
 

Private Types

typedef BlockTList
 

Private Attributes

TList bbs_
 
Private * d
 

Detailed Description

Control flow graph - an easy to analyse representation of the intermediate code.

Nodes of the graph are basic blocks - instances of Block

Todo:
support for (non-recursive) call graph unfolding?

Definition at line 552 of file storage.hh.

Member Typedef Documentation

Definition at line 557 of file storage.hh.

Definition at line 558 of file storage.hh.

typedef Block* TList
private

Definition at line 554 of file storage.hh.

Constructor & Destructor Documentation

ControlFlow ( const ControlFlow )

shallow copy

Member Function Documentation

const_iterator begin ( ) const
inline

return STL-like iterator to go through all basic blocks inside

Definition at line 591 of file storage.hh.

References ControlFlow::bbs_, and Block::begin().

const_iterator end ( ) const
inline

return STL-like iterator to go through all basic blocks inside

Definition at line 596 of file storage.hh.

References ControlFlow::bbs_, and Block::end().

const Block* entry ( ) const

return entry basic block

ControlFlow& operator= ( const ControlFlow )

shallow copy

Block*& operator[] ( const char *  name)

look for a basic block by name, create one if not found

Parameters
namename of the basic block to look for
Returns
referenced pointer to either a found or just created Block
Attention
created objects will not be destroyed automatically
const Block* operator[] ( const char *  name) const

look for a basic block by name, crash if not found

Attention
It is not safe to look for a non-existing basic block, it will jump to debugger in that case.
Parameters
namename of the basic block to look for
Returns
pointer to the found Var object
size_t size ( ) const
inline

return count of basic blocks inside the control flow graph

Definition at line 601 of file storage.hh.

References ControlFlow::bbs_, and Block::size().

Field Documentation

TList bbs_
private

Definition at line 604 of file storage.hh.

Referenced by ControlFlow::begin(), ControlFlow::end(), and ControlFlow::size().

Private* d
private

Definition at line 605 of file storage.hh.


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