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
addMissingIds.h
1
#ifndef CONTROL_PLANE_ADDMISSINGIDS_H_
2
#define CONTROL_PLANE_ADDMISSINGIDS_H_
3
4
#include "frontends/common/resolveReferences/resolveReferences.h"
5
#include "frontends/p4/typeChecking/typeChecker.h"
6
#include "ir/ir.h"
7
#include "p4RuntimeSymbolTable.h"
8
9
namespace
P4
{
10
11
class
MissingIdAssigner :
public
Transform
{
14
ReferenceMap
*refMap;
15
20
TypeMap
*typeMap;
21
23
static
constexpr
int
ID_BIT_WIDTH = 32;
24
28
const
ControlPlaneAPI::P4RuntimeSymbolTable
*symbols =
nullptr
;
29
32
const
ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
&archBuilder;
33
34
const
IR::P4Program *preorder(IR::P4Program *program)
override
;
35
const
IR::Property *postorder(IR::Property *property)
override
;
36
const
IR::P4Table *postorder(IR::P4Table *table)
override
;
37
const
IR::Type_Header *postorder(IR::Type_Header *hdr)
override
;
38
const
IR::P4ValueSet *postorder(IR::P4ValueSet *valueSet)
override
;
39
const
IR::P4Action *postorder(IR::P4Action *action)
override
;
40
41
public
:
42
explicit
MissingIdAssigner(
43
ReferenceMap
*refMap,
TypeMap
*typeMap,
44
const
ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
&archBuilder);
45
46
explicit
MissingIdAssigner(
47
ReferenceMap
*refMap,
TypeMap
*typeMap,
48
const
ControlPlaneAPI::P4RuntimeSymbolTable
*symbols,
49
const
ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
&archBuilder);
50
};
11
class
MissingIdAssigner :
public
Transform
{
…
};
51
56
class
AddMissingIdAnnotations final :
public
PassManager {
57
public
:
58
AddMissingIdAnnotations(
ReferenceMap
*refMap,
TypeMap
*typeMap,
59
const
ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
*archBuilder);
60
};
56
class
AddMissingIdAnnotations final :
public
PassManager {
…
};
61
62
}
// namespace P4
63
64
#endif
/* CONTROL_PLANE_ADDMISSINGIDS_H_ */
P4::ControlPlaneAPI::P4RuntimeSymbolTable
Definition
p4RuntimeSymbolTable.h:93
P4::ReferenceMap
Class used to encode maps from paths to declarations.
Definition
referenceMap.h:67
P4::Transform
Definition
visitor.h:437
P4::TypeMap
Definition
typeMap.h:41
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:24
P4::ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
Definition
p4RuntimeArchHandler.h:204
control-plane
addMissingIds.h
Generated by
1.13.2