P4C
The P4 Compiler
Loading...
Searching...
No Matches
table_control_deps.h
1
18
19
#ifndef BF_P4C_MAU_TABLE_CONTROL_DEPS_H_
20
#define BF_P4C_MAU_TABLE_CONTROL_DEPS_H_
21
22
#include "backends/tofino/bf-p4c/mau/mau_visitor.h"
23
#include "lib/ordered_map.h"
24
25
using namespace
P4
;
26
33
class
TableControlDeps
:
public
MauTableInspector
{
34
struct
info_t {
// info per table
35
ordered_set<const IR::MAU::Table *>
parents = {};
36
int
dependent_paths = 0;
37
};
38
ordered_map<const IR::MAU::Table *, info_t>
info;
39
40
profile_t
init_apply(
const
IR::Node
*root)
override
{
41
info.clear();
42
return
MauTableInspector::init_apply(root);
43
}
44
ordered_set<const IR::MAU::Table *>
parents();
45
void
postorder(
const
IR::MAU::Table *tbl)
override
;
46
void
revisit(
const
IR::MAU::Table *tbl)
override
;
47
void
postorder(
const
IR::MAU::TableSeq *)
override
{ visitAgain(); }
48
49
public
:
50
bool
operator()(
const
IR::MAU::Table *a,
const
IR::MAU::Table *b)
const
;
51
int
paths(
const
IR::MAU::Table *)
const
;
52
};
53
54
#endif
/* BF_P4C_MAU_TABLE_CONTROL_DEPS_H_ */
MauTableInspector
Definition
mau_visitor.h:39
P4::IR::Node
Definition
node.h:94
P4::Visitor::profile_t
Definition
visitor.h:78
P4::ordered_map
Definition
ordered_map.h:32
P4::ordered_set
Definition
ordered_set.h:32
TableControlDeps
Definition
table_control_deps.h:33
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:24
backends
tofino
bf-p4c
mau
table_control_deps.h
Generated by
1.13.2