
Public Member Functions | |
| RemoveUnusedActionParameters (ReferenceMap *refMap) | |
| const IR::Node * | postorder (IR::P4Action *action) override |
Removes action parameters which are never referenced.
This can reduce the amount of space required to represent a table, because it reduces the amount of action data. However, in the absence of special target-specific features to support it, this optimization changes the control plane API. For that reason, it's generally not applied for P4-16 programs, since it can be quite surprising if commenting out a block of code changes the control plane API. Some P4-14 compilers did apply this optimization, though, and in those cases it's necessary for backwards compatibility.
is converted to