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
remove_act_tables.h
1
18
19
#ifndef _BACKENDS_TOFINO_BF_P4C_MAU_REMOVE_ACT_TABLES_H_
20
#define _BACKENDS_TOFINO_BF_P4C_MAU_REMOVE_ACT_TABLES_H_
21
22
#include "ir/ir.h"
23
24
using namespace
P4
;
25
34
class
AnalyzeActionTables :
public
MAU::Inspector {
35
public
:
36
AnalyzeActionTables() {}
37
bool
isCandidate(
const
IR::MAU::Table *t)
const
{
return
_candidates. }
38
39
private
:
40
bool
preorder(IR::P4Control *control)
override
;
41
bool
preorder(
const
IR::MAU::Table *t)
override
;
42
bool
preorder(IR::P4Action *action)
override
;
43
44
std::set<cstring> _candidates;
45
};
34
class
AnalyzeActionTables :
public
MAU::Inspector {
…
};
46
48
class
DoRemoveActionTables :
public
Transform
{
49
const
AnalyzeActionTables
*analysis;
50
51
public
:
52
explicit
DoRemoveActionTables(
const
AnalyzeActionTables
*a) : analysis(a) {}
53
54
private
:
55
const
IR::Node
*postorder(
const
IR::MAU::Table *t)
override
;
56
};
48
class
DoRemoveActionTables :
public
Transform
{
…
};
57
58
class
RemoveActionTables :
public
PassManager {
59
public
:
60
RemoveActionTables() {
61
auto
analysis =
new
AnalyzeActionTables
();
62
addPasses({
63
&analysis,
64
new
DoRemoveActionTables
(analysis),
65
});
66
}
67
};
58
class
RemoveActionTables :
public
PassManager {
…
};
68
69
#endif
/* _BACKENDS_TOFINO_BF_P4C_MAU_REMOVE_ACT_TABLES_H_ */
AnalyzeActionTables
Definition
remove_act_tables.h:34
DoRemoveActionTables
Do the actual moves after the analysis has completed.
Definition
remove_act_tables.h:48
P4::IR::Node
Definition
node.h:94
P4::Transform
Definition
visitor.h:437
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:24
backends
tofino
bf-p4c
mau
remove_act_tables.h
Generated by
1.13.2