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

Public Member Functions

 ExtendedCallGraph (std::string_view name)
 
void addToHash (T vertex, const IR::ID &name)
 
const ReachabilityHashType & getHash () const
 
bool isReachable (T start, T element) const
 
- Public Member Functions inherited from P4::CallGraph< T >
 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)
 

Friends

class P4ProgramDCGCreator
 

Additional Inherited Members

- Public Types inherited from P4::CallGraph< T >
using const_iterator = typename ordered_map<T, std::vector<T> *>::const_iterator
 
using Set = std::unordered_set<T>
 
- Public Attributes inherited from P4::CallGraph< T >
ordered_set< T > nodes
 
- Protected Member Functions inherited from P4::CallGraph< T >
bool strongConnect (T node, sccInfo &helper, std::vector< T > &out)
 
- Static Protected Member Functions inherited from P4::CallGraph< T >
static void insersectWith (Set &set, Set &with)
 
- Protected Attributes inherited from P4::CallGraph< T >
ordered_map< T, std::vector< T > * > in_edges
 
cstring name
 
ordered_map< T, std::vector< T > * > out_edges
 

Member Function Documentation

◆ addToHash()

template<class T >
void P4::P4Tools::ExtendedCallGraph< T >::addToHash ( T vertex,
const IR::ID & name )
inline

Function adds current vertex to a hash which allows to get access for vertexes from string in DCG. If name is empty then it doesn't hash it.