19#ifndef BACKENDS_TOFINO_BF_P4C_PHV_ANALYSIS_DOMINATOR_TREE_H_
20#define BACKENDS_TOFINO_BF_P4C_PHV_ANALYSIS_DOMINATOR_TREE_H_
22#include "bf-p4c/mau/mau_visitor.h"
23#include "bf-p4c/mau/table_flow_graph.h"
36 using G = FlowGraph::Graph;
37 using Vertex = boost::graph_traits<G>::vertex_descriptor;
38 using IndexMap = boost::property_map<G, boost::vertex_index_t>::type;
39 using PredMap = boost::iterator_property_map<std::vector<Vertex>::iterator, IndexMap>;
48 bool preorder(
const IR::BFN::Pipe *pipe)
override;
49 bool preorder(
const IR::MAU::Table *tbl)
override;
54 void generateIndexToTableMap(
const FlowGraph &fg,
61 void generateDominatorTree(
const FlowGraph &fg,
107 const std::vector<const IR::MAU::Table *>
getAllDominators(
const IR::MAU::Table *t,
108 gress_t gress)
const;
Definition dominator_tree.h:32
const ordered_map< gress_t, FlowGraph > & getFlowGraph() const
Definition dominator_tree.h:72
bool strictlyDominates(const IR::BFN::Unit *u1, const IR::BFN::Unit *u2) const
Definition phv/analysis/dominator_tree.cpp:185
std::optional< const IR::MAU::Table * > getNonGatewayImmediateDominator(const IR::MAU::Table *t, gress_t gress) const
Definition phv/analysis/dominator_tree.cpp:171
std::optional< const IR::MAU::Table * > getImmediateDominator(const IR::MAU::Table *t, gress_t gress) const
Definition phv/analysis/dominator_tree.cpp:162
cstring hasImmediateDominator(gress_t g, cstring t) const
GTest methods.
Definition phv/analysis/dominator_tree.cpp:324
bool isDominator(cstring t1, gress_t gress, cstring t2) const
Definition phv/analysis/dominator_tree.cpp:349
const std::vector< const IR::MAU::Table * > getAllDominators(const IR::MAU::Table *t, gress_t gress) const
Definition phv/analysis/dominator_tree.cpp:226
const IR::MAU::Table * getNonGatewayGroupDominator(ordered_set< const IR::MAU::Table * > &tables) const
Definition phv/analysis/dominator_tree.cpp:238
Definition mau_visitor.h:29
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition table_flow_graph.h:45