P4C
The P4 Compiler
Loading...
Searching...
No Matches
HeaderInfo Struct Reference

Data structure containing information about which headers are present in the parser and MAU, as well as additional properties for each header and mutual exclusivity information. The passes in HeaderMutex fill this data structure in a specific order, thus the order of these passes matter (e.g. FindConstEntryTable needs to run after passes which fill all_headers, mau_headers, and parser_headers). More...

#include <header_mutex.h>

Public Member Functions

void clear ()
 
size_t get_header_index (cstring header_name)
 
cstring get_header_name (size_t header_index)
 
void pretty_print_bitvec (bitvec bv)
 
void print_header_encounter_info ()
 
void print_headers_live_during_action ()
 
void print_mutually_exclusive_headers ()
 

Public Attributes

ordered_set< cstringall_headers
 
bitvec headers_always_encountered
 
ordered_map< cstring, bitvecheaders_always_encountered_after
 
ordered_map< cstring, bitvecheaders_always_encountered_before
 
ordered_map< cstring, bitvecheaders_always_not_encountered_if_header_not_encountered
 
ordered_map< const IR::MAU::Table *, ordered_map< cstring, std::vector< std::pair< cstring, HeaderState > > > > headers_live_during_action
 
ordered_set< cstringmau_headers
 
SymBitMatrix mutually_exclusive_headers
 
ordered_set< cstringparser_headers
 

Detailed Description

Data structure containing information about which headers are present in the parser and MAU, as well as additional properties for each header and mutual exclusivity information. The passes in HeaderMutex fill this data structure in a specific order, thus the order of these passes matter (e.g. FindConstEntryTable needs to run after passes which fill all_headers, mau_headers, and parser_headers).