P4C
The P4 Compiler
|
Identify POV bits that can be merged. More...
Public Member Functions | |
IdentifyPovMergeTargets (const PhvInfo &phv, const CollectParserInfo &parser_info, const HeaderValidityAnalysis &hva, ordered_map< const PHV::Field *, const PHV::Field * > &merge_pov) | |
Protected Member Functions | |
void | end_apply () override |
Visitor::profile_t | init_apply (const IR::Node *root) override |
bool | preorder (const IR::BFN::Extract *e) override |
Protected Attributes | |
const HeaderValidityAnalysis & | hva |
ordered_map< const PHV::Field *, const PHV::Field * > & | merge_pov |
const CollectParserInfo & | parser_info |
const PhvInfo & | phv |
ordered_map< const PHV::Field *, std::set< const IR::BFN::ParserState * > > | pov_states |
std::set< const PHV::Field * > | pov_zero_writes |
ordered_map< const IR::BFN::ParserState *, ordered_set< const PHV::Field * > > | state_povs |
Identify POV bits that can be merged.
Two POV bits can be merged if the headers are always extracted together, and if their validity remains in sync in MAU (always invalidated/validated together). The extractions can occur in the same state or in consecutive states.
FIXME: Handle headers that are not extracted but which are made valid in MAU.