P4C
The P4 Compiler
Loading...
Searching...
No Matches
CreateAliasesForVarbitHeaders Class Reference
Inheritance diagram for CreateAliasesForVarbitHeaders:
[legend]

Public Member Functions

 CreateAliasesForVarbitHeaders (const PhvInfo &phv, const ClotInfo &clot_info, PragmaAlias &pragma)
 

Protected Member Functions

void end_apply () override
 
Visitor::profile_t init_apply (const IR::Node *root) override
 
bool preorder (const IR::HeaderOrMetadata *h) override
 

Static Protected Member Functions

static std::pair< cstring, int > getHeaderBaseAndSize (cstring name)
 
static bool isVarbitHeaderPattern (cstring name)
 

Protected Attributes

const ClotInfoclot_info
 
std::map< gress_t, std::set< cstring > > desugared_headers
 
const PhvInfophv
 
PragmaAliaspragma
 

Detailed Description

Identify headers corresponding to varbit fields that were injected during varbit header desugaring. Create aliases for the validity bits for slices of the same header placed in CLOTs.

Member Function Documentation

◆ end_apply()

void CreateAliasesForVarbitHeaders::end_apply ( )
inlineoverrideprotected

Create aliases for the validity bits for sliced varbit headers that are placed in CLOTS.

◆ getHeaderBaseAndSize()

static std::pair< cstring, int > CreateAliasesForVarbitHeaders::getHeaderBaseAndSize ( cstring name)
inlinestaticprotected

Split the header name into a base and a size

◆ isVarbitHeaderPattern()

static bool CreateAliasesForVarbitHeaders::isVarbitHeaderPattern ( cstring name)
inlinestaticprotected

Check whether the header name matches the varbit header pattern used by DesugarVarbitExtract