Specializes each Parser and Control with constant constructor arguments by substituting type arguments and constructor parameters. More...

Public Member Functions | |
| Specialize (SpecializationMap *specMap) | |
| const IR::Node * | postorder (IR::ConstructorCallExpression *expression) override |
| const IR::Node * | postorder (IR::Declaration_Instance *) override |
| const IR::Node * | postorder (IR::P4Control *control) override |
| const IR::Node * | postorder (IR::P4Parser *parser) override |
| const IR::Node * | preorder (IR::Type_Package *package) override |
Specializes each Parser and Control with constant constructor arguments by substituting type arguments and constructor parameters.
Specifically, each instantiation of each Parser (or Control) with constructor parameters will cause
Instantiations with constructor arguments that are not constant values are ignored—see SpecializeAll for details.
Note that this pass handles type substitution for instantiating generic Parser or Control types, which is an experimental feature.
For example:
is converted to
with 16 substituted for size in the body of cspec.
A different specialization is made for each constructor invocation and Declaration_Instance.