P4C
The P4 Compiler
|
#include <simplify_references.h>
Public Member Functions | |
SimplifyReferences (ParamBinding *bindings, P4::ReferenceMap *refMap, P4::TypeMap *typeMap) | |
Simplify complex references to headers, header stacks, structs, and structs.
This pass simplifies references so that the backend doesn't have to deal with complicated cases. The simplifications include:
extract()
and emit()
methods.isValid()
header method are replaced with references to the header's $valid
POV bit field. SimplifyReferences::SimplifyReferences | ( | ParamBinding * | bindings, |
P4::ReferenceMap * | refMap, | ||
P4::TypeMap * | typeMap ) |
Create a SimplifyReferences instance.
bindings | Known bindings to package parameters and declarations. References to these entities (i.e., via member or path expressions) will be bound to concrete objects (i.e., HeaderRefs or HeaderStackItemRefs). Any additional declarations encountered during the simplification process will be added to be bindings for us by future passes; this is an in-out parameter. |
refMap | Resolved references for the P4 program. |
typeMap | Resolved types for the P4 program. |