P4C
The P4 Compiler
 
Loading...
Searching...
No Matches
P4::MoveDeclarations Class Reference
Inheritance diagram for P4::MoveDeclarations:

Public Member Functions

 MoveDeclarations (bool parsersOnly=false)
 
void end_apply (const IR::Node *) override
 
const IR::Node * postorder (IR::Declaration_Constant *decl) override
 
const IR::Node * postorder (IR::Declaration_Variable *decl) override
 
const IR::Node * postorder (IR::Function *function) override
 
const IR::Node * postorder (IR::P4Action *action) override
 
const IR::Node * postorder (IR::P4Control *control) override
 
const IR::Node * postorder (IR::P4Parser *parser) override
 
const IR::Node * preorder (IR::Function *function) 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
 

Detailed Description

Moves all local declarations in a control or parser to the "top", including the ones in the control body and parser states. Also, if the control has nested actions, move the declarations from the actions to the enclosing control.

Precondition
All declarations must have different names—eg. must be done after the UniqueNames pass.