P4C
The P4 Compiler
Toggle main menu visibility
Main Page
P4C Repository Organization
Getting Started
P4C Intermediate Representation (IR)
Frontend
Midend
Backends
Behavioral Model Backend
DPDK Backend
eBPF Backend
TC Backend
uBPF Backend
P4test Backend
Graphs Backend
p4fmt (P4 Formatter)
P4Tools
P4Smith
P4Testgen
Contribute to the P4 Compiler Project
Releases
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
w
x
z
Functions
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
x
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Typedefs
Enumerations
Enumerator
Related Symbols
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
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
};
33
class
TableControlDeps
:
public
MauTableInspector
{
…
};
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