![]() |
Spicy
|
#include <cfg.h>
Public Types | |
| using | NodeId = uint64_t |
| using | Graph = util::graph::DirectedGraph< GraphNode, NodeId > |
Public Member Functions | |
| CFG (const Node *root) | |
| void | removeNode (Node *node) |
| std::string | dot () const |
| const auto & | dataflow () const |
| const Graph & | graph () const |
Infrastructure to compute control and dataflow facts about a AST (sub)tree.
| using hilti::detail::cfg::CFG::Graph = util::graph::DirectedGraph<GraphNode, NodeId> |
The underlying graph.
| hilti::detail::cfg::CFG::CFG | ( | const Node * | root | ) |
Construct a new CFG.
This automatically computes a control flow and data flow facts for the AST under the node.
| root | the node pointing to the AST subtree to work on |
|
inline |
Get dataflow facts.
| std::string hilti::detail::cfg::CFG::dot | ( | ) | const |
Compute a dot representation of the CFG.
|
inline |
Get control flow.
| void hilti::detail::cfg::CFG::removeNode | ( | Node * | node | ) |
Remove a node from the graph.
This function will connect all upstream neighbors to all downstream neighbors.
| node | the node to remove |