Public Types | Public Member Functions | Private Member Functions | Private Attributes

OA::NestedSCR Class Reference

#include <NestedSCR.hpp>

Collaboration diagram for OA::NestedSCR:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Node_t { NODE_NOTHING, NODE_ACYCLIC, NODE_INTERVAL, NODE_IRREDUCIBLE }
enum  Edge_t { EDGE_NORMAL, EDGE_LOOP_ENTRY, EDGE_IRRED_ENTRY, EDGE_ITERATE }
typedef unsigned int DFNUM_t

Public Member Functions

 NestedSCR (OA::OA_ptr< OA::RIFG > rifg)
 ~NestedSCR ()
OA::OA_ptr< OA::RIFGgetRIFG ()
TarjTreeNodegetTree ()
bool isFirst (RIFG::NodeId id)
bool isLast (RIFG::NodeId id)
bool isHeader (RIFG::NodeId id)
RIFG::NodeId getInners (RIFG::NodeId id)
RIFG::NodeId getInnersLast (RIFG::NodeId id)
RIFG::NodeId getOuter (RIFG::NodeId id)
RIFG::NodeId getNext (RIFG::NodeId id)
int getLevel (RIFG::NodeId id)
int getLoopIndex (RIFG::NodeId id)
Node_t getNodeType (RIFG::NodeId id)
Edge_t getEdgeType (RIFG::NodeId src, RIFG::NodeId sink)
bool isBackEdge (RIFG::EdgeId e)
int getExits (RIFG::NodeId src, RIFG::NodeId sink)
RIFG::NodeId getLoopExited (RIFG::NodeId src, RIFG::NodeId sink)
bool Contains (RIFG::NodeId a, RIFG::NodeId b)
RIFG::NodeId LCA (RIFG::NodeId a, RIFG::NodeId b)
void Renumber ()
void Prenumber (int n)
void dump (std::ostream &os)

Private Member Functions

void Create ()
void Init ()
void InitArrays ()
void DFS (RIFG::NodeId n)
void FillPredLists ()
void GetTarjans ()
void Build ()
void Sort ()
void ComputeIntervalIndex ()
void ComputeIntervalIndexSubTree (int node, int value)
void FreeWork ()
void DumpSubTree (std::ostream &os, int node, int indent)
int FIND (int v)
void UNION (int i, int j, int k)

Private Attributes

OA::OA_ptr< OA::RIFGrifg
UnionFindUniverseuf
TarjWorkwk
TarjTreeNodetarj
std::list< RIFG::NodeIdrev_top_list
std::map< RIFG::NodeId, DFNUM_tnodeid_to_dfnum_map

Detailed Description

Definition at line 71 of file NestedSCR.hpp.


Member Typedef Documentation

typedef unsigned int OA::NestedSCR::DFNUM_t

Definition at line 84 of file NestedSCR.hpp.


Member Enumeration Documentation

Enumerator:
EDGE_NORMAL 
EDGE_LOOP_ENTRY 
EDGE_IRRED_ENTRY 
EDGE_ITERATE 

Definition at line 79 of file NestedSCR.hpp.

Enumerator:
NODE_NOTHING 
NODE_ACYCLIC 
NODE_INTERVAL 
NODE_IRREDUCIBLE 

Definition at line 74 of file NestedSCR.hpp.


Constructor & Destructor Documentation

OA::NestedSCR::NestedSCR ( OA::OA_ptr< OA::RIFG rifg  ) 

Definition at line 210 of file NestedSCR.cpp.

References Create().

Here is the call graph for this function:

OA::NestedSCR::~NestedSCR (  ) 

Definition at line 217 of file NestedSCR.cpp.

References nodeid_to_dfnum_map, rev_top_list, tarj, uf, and wk.


Member Function Documentation

void OA::NestedSCR::Build (  )  [private]

Definition at line 516 of file NestedSCR.cpp.

References DFNUM_ROOT, header, isCyclic, OA::n, OA::RIFG::NIL, Prenumber(), reducible, rifg, TARJ_inners, TARJ_level, TARJ_next, TARJ_nodeid, TARJ_outer, TARJ_type, and vertex.

Referenced by Create().

Here is the call graph for this function:

void OA::NestedSCR::ComputeIntervalIndex (  )  [private]

Definition at line 621 of file NestedSCR.cpp.

References ComputeIntervalIndexSubTree(), DFNUM_ROOT, and OA::loopIndex.

Referenced by Create().

Here is the call graph for this function:

void OA::NestedSCR::ComputeIntervalIndexSubTree ( int  node,
int  value 
) [private]

Definition at line 607 of file NestedSCR.cpp.

References DFNUM_NIL, OA::loopIndex, TARJ_inners, TARJ_loopIndex, and TARJ_next.

Referenced by ComputeIntervalIndex().

bool OA::NestedSCR::Contains ( RIFG::NodeId  a,
RIFG::NodeId  b 
)

Definition at line 879 of file NestedSCR.cpp.

References dfnum, and TARJ_contains.

Referenced by getLoopExited(), and LCA().

void OA::NestedSCR::Create (  )  [private]

Definition at line 232 of file NestedSCR.cpp.

References Build(), ComputeIntervalIndex(), DFS(), FillPredLists(), FreeWork(), GetTarjans(), Init(), rifg, and Sort().

Referenced by NestedSCR().

Here is the call graph for this function:

void OA::NestedSCR::DFS ( RIFG::NodeId  n  )  [private]

Definition at line 344 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, OA::n, rev_top_list, rifg, TLast, and vertex.

Referenced by Create().

void OA::NestedSCR::dump ( std::ostream &  os  ) 

Definition at line 629 of file NestedSCR.cpp.

References DFNUM_ROOT, and DumpSubTree().

Here is the call graph for this function:

void OA::NestedSCR::DumpSubTree ( std::ostream &  os,
int  node,
int  indent 
) [private]

Definition at line 641 of file NestedSCR.cpp.

References DFNUM_NIL, TARJ_inners, TARJ_level, TARJ_loopIndex, TARJ_next, TARJ_nodeid, and TARJ_type.

Referenced by dump().

void OA::NestedSCR::FillPredLists (  )  [private]

Definition at line 368 of file NestedSCR.cpp.

References backPreds, dfnum, DFNUM_ROOT, is_backedge, OA::n, nonBackPreds, rifg, and vertex.

Referenced by Create().

int OA::NestedSCR::FIND ( int  v  )  [private]

Definition at line 669 of file NestedSCR.cpp.

References OA::UnionFindUniverse::Find(), and uf.

Referenced by GetTarjans().

Here is the call graph for this function:

void OA::NestedSCR::FreeWork (  )  [private]

Definition at line 595 of file NestedSCR.cpp.

References uf, and wk.

Referenced by Create().

NestedSCR::Edge_t OA::NestedSCR::getEdgeType ( RIFG::NodeId  src,
RIFG::NodeId  sink 
)

Definition at line 733 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, LCA(), NODE_ACYCLIC, NODE_INTERVAL, NODE_IRREDUCIBLE, NODE_NOTHING, TARJ_outer, and TARJ_type.

Here is the call graph for this function:

int OA::NestedSCR::getExits ( RIFG::NodeId  src,
RIFG::NodeId  sink 
)

Definition at line 687 of file NestedSCR.cpp.

References dfnum, LCA(), OA::RIFG::NIL, and TARJ_level.

Here is the call graph for this function:

RIFG::NodeId OA::NestedSCR::getInners ( RIFG::NodeId  id  ) 

Definition at line 806 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, OA::RIFG::NIL, TARJ_inners, and TARJ_nodeid.

Referenced by isFirst(), and isHeader().

RIFG::NodeId OA::NestedSCR::getInnersLast ( RIFG::NodeId  id  ) 

Definition at line 814 of file NestedSCR.cpp.

References dfnum, TARJ_last_id, and TARJ_nodeid.

int OA::NestedSCR::getLevel ( RIFG::NodeId  id  ) 

Definition at line 865 of file NestedSCR.cpp.

References dfnum, and TARJ_level.

RIFG::NodeId OA::NestedSCR::getLoopExited ( RIFG::NodeId  src,
RIFG::NodeId  sink 
)

Definition at line 704 of file NestedSCR.cpp.

References Contains(), dfnum, LCA(), OA::RIFG::NIL, NODE_INTERVAL, NODE_IRREDUCIBLE, TARJ_nodeid, TARJ_outer, and TARJ_type.

Here is the call graph for this function:

int OA::NestedSCR::getLoopIndex ( RIFG::NodeId  id  ) 

Definition at line 886 of file NestedSCR.cpp.

References dfnum, and TARJ_loopIndex.

RIFG::NodeId OA::NestedSCR::getNext ( RIFG::NodeId  id  ) 

Definition at line 830 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, OA::RIFG::NIL, TARJ_next, and TARJ_nodeid.

Referenced by isLast().

NestedSCR::Node_t OA::NestedSCR::getNodeType ( RIFG::NodeId  id  ) 

Definition at line 872 of file NestedSCR.cpp.

References dfnum, and TARJ_type.

RIFG::NodeId OA::NestedSCR::getOuter ( RIFG::NodeId  id  ) 

Definition at line 822 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, OA::RIFG::NIL, TARJ_nodeid, and TARJ_outer.

Referenced by isFirst().

OA::OA_ptr<OA::RIFG> OA::NestedSCR::getRIFG (  )  [inline]

Definition at line 91 of file NestedSCR.hpp.

References rifg.

void OA::NestedSCR::GetTarjans (  )  [private]

Definition at line 391 of file NestedSCR.cpp.

References backPreds, DFNUM_NIL, DFNUM_ROOT, FIND(), header, inP, is_backedge, isCyclic, OA::n, nextP, nextQ, nonBackPreds, reducible, rifg, UNION(), and vertex.

Referenced by Create().

Here is the call graph for this function:

TarjTreeNode * OA::NestedSCR::getTree (  ) 

Definition at line 298 of file NestedSCR.cpp.

References tarj.

void OA::NestedSCR::Init (  )  [private]

Definition at line 309 of file NestedSCR.cpp.

References DFNUM_ROOT, InitArrays(), OA::n, rifg, tarj, uf, and wk.

Referenced by Create().

Here is the call graph for this function:

void OA::NestedSCR::InitArrays (  )  [private]

Definition at line 329 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, and rifg.

Referenced by Init().

bool OA::NestedSCR::isBackEdge ( RIFG::EdgeId  e  ) 

Definition at line 796 of file NestedSCR.cpp.

References dfnum, is_backedge, and rifg.

bool OA::NestedSCR::isFirst ( RIFG::NodeId  id  ) 

Definition at line 846 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, getInners(), and getOuter().

Here is the call graph for this function:

bool OA::NestedSCR::isHeader ( RIFG::NodeId  id  ) 

Definition at line 839 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, and getInners().

Here is the call graph for this function:

bool OA::NestedSCR::isLast ( RIFG::NodeId  id  ) 

Definition at line 858 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, and getNext().

Here is the call graph for this function:

RIFG::NodeId OA::NestedSCR::LCA ( RIFG::NodeId  a,
RIFG::NodeId  b 
)

Definition at line 772 of file NestedSCR.cpp.

References Contains(), dfnum, DFNUM_NIL, OA::RIFG::NIL, TARJ_nodeid, and TARJ_outer.

Referenced by getEdgeType(), getExits(), and getLoopExited().

Here is the call graph for this function:

void OA::NestedSCR::Prenumber ( int  n  ) 
void OA::NestedSCR::Renumber (  ) 

Definition at line 584 of file NestedSCR.cpp.

References DFNUM_ROOT, OA::n, Prenumber(), and tarj.

Referenced by Sort().

Here is the call graph for this function:

void OA::NestedSCR::Sort (  )  [private]

Definition at line 259 of file NestedSCR.cpp.

References dfnum, DFNUM_NIL, OA::RIFG::NIL, Renumber(), rev_top_list, rifg, TARJ_inners, TARJ_next, and TARJ_outer.

Referenced by Create().

Here is the call graph for this function:

void OA::NestedSCR::UNION ( int  i,
int  j,
int  k 
) [private]

Definition at line 676 of file NestedSCR.cpp.

References uf, and OA::UnionFindUniverse::Union().

Referenced by GetTarjans().

Here is the call graph for this function:


Member Data Documentation

Definition at line 185 of file NestedSCR.hpp.

Referenced by ~NestedSCR().

Definition at line 182 of file NestedSCR.hpp.

Referenced by DFS(), Sort(), and ~NestedSCR().

Definition at line 179 of file NestedSCR.hpp.

Referenced by getTree(), Init(), Prenumber(), Renumber(), and ~NestedSCR().

Definition at line 177 of file NestedSCR.hpp.

Referenced by FIND(), FreeWork(), Init(), UNION(), and ~NestedSCR().

Definition at line 178 of file NestedSCR.hpp.

Referenced by FreeWork(), Init(), and ~NestedSCR().


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