P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BMV2::ProcessControls Class Reference

#include <backend.h>

Inheritance diagram for P4::BMV2::ProcessControls:
[legend]

Public Member Functions

 ProcessControls (const std::set< cstring > *process)
 
bool convert (const IR::P4Control *control) const
 
- Public Member Functions inherited from P4::RemoveComplexExpressionsPolicy

Detailed Description

This class implements a policy suitable for the RemoveComplexExpression pass. The policy is: only remove complex expression for the controls whose names are in the specified set. For example, we expect that the code in ingress and egress will have complex expression removed.

Member Function Documentation

◆ convert()

bool P4::BMV2::ProcessControls::convert ( const IR::P4Control * control) const
inlinevirtual

If the policy returns true the control block is processed, otherwise it is left unchanged.

Implements P4::RemoveComplexExpressionsPolicy.