P4C
The P4 Compiler
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
};
51
56
class
AddMissingIdAnnotations final :
public
PassManager {
57
public
:
58
AddMissingIdAnnotations(
ReferenceMap
*refMap,
TypeMap
*typeMap,
59
const
ControlPlaneAPI::P4RuntimeArchHandlerBuilderIface
*archBuilder);
60
};
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:66
P4::Transform
Definition
visitor.h:424
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