P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::CallGraph< T > Class Template Reference
Inheritance diagram for P4::CallGraph< T >:
[legend]

Classes

class  Loop
 
struct  Loops
 
struct  sccInfo
 

Public Types

using const_iterator = typename ordered_map<T, std::vector<T> *>::const_iterator
 
using Set = std::unordered_set<T>
 

Public Member Functions

 CallGraph (std::string_view name)
 
void add (T caller)
 
const_iterator begin () const
 
void calls (T caller, T callee)
 
Loopscompute_loops (T start)
 
void dominators (T start, std::map< T, Set > &dominators)
 
bool empty () const
 Return true if the graph is empty.
 
const_iterator end () const
 
std::vector< T > * getCallees (T caller)
 
void getCallees (T caller, std::set< T > &toAppend)
 
std::vector< T > * getCallers (T callee)
 
const ordered_map< T, std::vector< T > * > & getInEdges () const
 Return the number of incoming edges.
 
const cstringgetName () const
 Get the name of the graph.
 
const ordered_set< T > & getNodes () const
 Return the set of nodes.
 
const ordered_map< T, std::vector< T > * > & getOutEdges () const
 Return the number of outgoing edges.
 
bool isCallee (T callee) const
 
bool isCaller (T caller) const
 
void reachable (T start, std::set< T > &out) const
 
void remove (T node)
 
void restrict (const std::set< T > &to)
 
bool sccSort (T start, std::vector< T > &out)
 
size_t size () const
 Return the number of nodes.
 
bool sort (std::vector< T > &out)
 
bool sort (std::vector< T > &start, std::vector< T > &out)
 

Public Attributes

ordered_set< T > nodes
 

Protected Member Functions

bool strongConnect (T node, sccInfo &helper, std::vector< T > &out)
 

Static Protected Member Functions

static void insersectWith (Set &set, Set &with)
 

Protected Attributes

ordered_map< T, std::vector< T > * > in_edges
 
cstring name
 
ordered_map< T, std::vector< T > * > out_edges