
Public Member Functions | |
| DoMoveActionsToTables (ReferenceMap *refMap, TypeMap *typeMap) | |
| const IR::Node * | postorder (IR::MethodCallStatement *statement) override |
| const IR::Node * | postorder (IR::P4Control *control) override |
| const IR::Node * | preorder (IR::P4Action *action) override |
| const IR::Node * | preorder (IR::P4Control *control) override |
| const IR::Node * | preorder (IR::P4Parser *parser) override |
Convert direct action calls to table invocations.
control c() { action x(in bit b) { ... } apply { x(e); } }
turns into
control c() { action x(in bit b) { ... } table _tmp() { actions = { x(e); } const default_action = x(); } apply { _tmp.apply(); } }
For this to work all variable declarations must have been moved to the beginning.