P4C
The P4 Compiler
BMV2::SkipControls Class Reference
Inheritance diagram for BMV2::SkipControls:
[legend]

Public Member Functions

 SkipControls (const std::set< cstring > *skip)
 
bool convert (const Visitor::Context *, const IR::P4Control *control) override
 
- Public Member Functions inherited from P4::ActionSynthesisPolicy
virtual bool can_combine (const Visitor::Context *, const IR::BlockStatement *, const IR::StatOrDecl *)
 

Detailed Description

This class implements a policy suitable for the SynthesizeActions pass. The policy is: do not synthesize actions for the controls whose names are in the specified set. For example, we expect that the code in the deparser will not use any tables or actions.

Member Function Documentation

◆ convert()

bool BMV2::SkipControls::convert ( const Visitor::Context ctxt,
const IR::P4Control *  control 
)
inlineoverridevirtual

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

Implements P4::ActionSynthesisPolicy.