19#ifndef BACKENDS_TOFINO_BF_P4C_COMMON_SCC_TOPOSORT_H_
20#define BACKENDS_TOFINO_BF_P4C_COMMON_SCC_TOPOSORT_H_
23#include <unordered_map>
24#include <unordered_set>
31 using Graph = std::unordered_map<int, std::unordered_set<int>>;
67 void validate_node_id(
int i)
const;
Definition scc_toposort.h:29
int new_node()
create a new node and return a new node_id, starting from 1.
Definition common/scc_toposort.cpp:135
void add_dep(int a, int b)
Definition common/scc_toposort.cpp:150
std::unordered_map< int, int > scc_topo_sort() const
Definition common/scc_toposort.cpp:156