|
PHV::Field * | add (cstring fieldName, gress_t gress, int size, int offset, bool isMetadata, bool isPOV, bool bridged=false, bool isPad=false, bool isOverlayable=false, bool isFlexible=false, bool isFixedSizeHeader=false, std::optional< Util::SourceInfo > srcInfo=std::nullopt) |
|
void | add_container_to_field_entry (const PHV::Container c, const PHV::Field *f) |
|
bool | add_table_constraints (gress_t grs, IR::MAU::Table *tbl, InsertionConstraints cnstrs) |
|
void | addAliasMapEntry (const PHV::Field *f1, const PHV::Field *f2) |
| Adds an entry to the aliasMap.
|
|
void | addDarkMutex (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addDeparserNoPack (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addDigestNoPack (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addExternalNameMapEntry (PHV::Field *f, cstring externalName) |
| Adds an entry to the externalNameMap.
|
|
void | addFieldMutex (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addFieldNoPack (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addMetadataDependency (const IR::MAU::Table *t1, const IR::MAU::Table *t2, const PHV::FieldSlice *slice=nullptr) |
|
void | addMetadataMutex (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addMutuallyAligned (const PHV::Field *f1, const PHV::Field *f2) |
|
void | addTempVar (const IR::TempVar *tempVar, gress_t gress) |
|
void | addZeroContainer (gress_t gr, PHV::Container c) |
| adds container to the set of deparsed zero containers.
|
|
bool | alloc_done () const |
|
bool | are_bridged_extracted_together (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | are_mutually_aligned (const PHV::Field *f1, const PHV::Field *f2) const |
|
iterator< safe_vector< PHV::Field * >::iterator > | begin () |
|
iterator< safe_vector< PHV::Field * >::const_iterator > | begin () const |
|
bitvec | bits_allocated (const PHV::Container container, const IR::MAU::Table *ctxt, const PHV::FieldUse *use=nullptr) const |
|
bitvec | bits_allocated (const PHV::Container container, const ordered_set< const PHV::Field * > &fields, const IR::MAU::Table *ctxt, const PHV::FieldUse *use=nullptr) const |
|
bitvec | bits_allocated (const PHV::Container container, const PHV::Field *field, const IR::MAU::Table *ctxt, const PHV::FieldUse *use=nullptr) const |
|
bitvec | bits_allocated (const PHV::Container, const ordered_set< const PHV::Field * > &, const PHV::AllocContext *ctxt=nullptr, const PHV::FieldUse *use=nullptr) const |
|
bitvec | bits_allocated (const PHV::Container, const PHV::AllocContext *ctxt=nullptr, const PHV::FieldUse *use=nullptr) const |
|
bitvec | bits_allocated (const PHV::Container, const PHV::Field *field, const PHV::AllocContext *ctxt=nullptr, const PHV::FieldUse *use=nullptr) const |
|
void | clear_container_to_fields () |
|
void | clearARAconstraints () |
|
void | clearConstantExtractionState () |
| Clear the state maintained corresponding to constant extractors.
|
|
PHV::Field * | create_dummy_padding (size_t sz, gress_t gress, bool overlayable=true) |
|
SymBitMatrix & | dark_mutex () |
|
const SymBitMatrix & | dark_mutex () const |
|
bool | darkLivenessOkay (const IR::MAU::Table *gateway, const IR::MAU::Table *t) const |
|
SymBitMatrix & | deparser_no_pack_mutex () |
|
const SymBitMatrix & | deparser_no_pack_mutex () const |
|
SymBitMatrix & | digest_no_pack_mutex () |
|
const SymBitMatrix & | digest_no_pack_mutex () const |
|
iterator< safe_vector< PHV::Field * >::iterator > | end () |
|
iterator< safe_vector< PHV::Field * >::const_iterator > | end () const |
|
const PHV::Field * | field (const cstring &) const |
|
PHV::Field * | field (const cstring &name) |
|
const PHV::Field * | field (const IR::Expression *, le_bitrange *bits=0) const |
|
PHV::Field * | field (const IR::Expression *e, le_bitrange *bits=0) |
|
const PHV::Field * | field (const IR::Member *, le_bitrange *bits=0) const |
|
PHV::Field * | field (const IR::Member *fr, le_bitrange *bits=0) |
|
PHV::Field * | field (int idx) |
|
const PHV::Field * | field (int idx) const |
|
SymBitMatrix & | field_mutex () |
|
const SymBitMatrix & | field_mutex () const |
|
const ordered_set< const PHV::Field * > & | fields_in_container (const PHV::Container c) const |
|
cstring | full_hdr_name (const cstring &name) const |
|
std::optional< cstring > | get_alias_name (const IR::Expression *expr) const |
|
const std::map< cstring, PHV::Field > & | get_all_fields () const |
|
std::vector< PHV::AllocSlice > | get_alloc (const IR::Expression *f, const PHV::AllocContext *ctxt=nullptr, const PHV::FieldUse *use=nullptr) const |
|
std::vector< PHV::AllocSlice > | get_alloc (const PHV::Field *phv_field, le_bitrange *bits=nullptr, const PHV::AllocContext *ctxt=nullptr, const PHV::FieldUse *use=nullptr) const |
|
void | get_hdr_fields (cstring name_, ordered_set< const PHV::Field * > &flds) const |
|
std::vector< PHV::AllocSlice > | get_slices_in_container (const PHV::Container c) const |
|
std::vector< PHV::AllocSlice > | get_slices_in_container (const PHV::Container c, const PHV::AllocContext *ctxt, const PHV::FieldUse *use) const |
|
const PHV::Field * | getAliasDestination (const PHV::Field *f) const |
|
const ordered_map< const PHV::Field *, const PHV::Field * > & | getAliasMap () const |
|
const ordered_map< gress_t, ConstraintMap > & | getARAConstraints () const |
|
SymBitMatrix & | getBridgedExtractedTogether () |
|
const SymBitMatrix & | getBridgedExtractedTogether () const |
|
ContainterToSliceMap | getContainerToSlicesMap (std::function< bool(const PHV::Field *)> *f=nullptr, std::function< bool(const PHV::AllocSlice *)> *s=nullptr) const |
|
const ordered_map< tpair, const PHV::FieldSlice * > & | getMetadataDepFields () const |
|
const ordered_map< cstring, ordered_set< cstring > > & | getMetadataDeps () const |
|
SymBitMatrix & | getMutuallyAligned () |
|
const SymBitMatrix & | getMutuallyAligned () const |
|
const ordered_map< cstring, ordered_set< cstring > > & | getReverseMetadataDeps () const |
|
const ordered_set< cstring > | getReverseMetadataDeps (const IR::MAU::Table *t) const |
|
UnionFind< PHV::Field * > & | getSameSetConstantExtraction () |
|
const UnionFind< PHV::Field * > & | getSameSetConstantExtraction () const |
|
const IR::TempVar * | getTempVar (const PHV::Field *f) const |
|
const std::set< PHV::Container > & | getZeroContainers (gress_t gr) const |
|
bool | has_struct_info (cstring name) const |
|
bool | hasParserConstantExtract (const PHV::Field *f) const |
|
const PhvInfo::StructInfo * | hdr (const cstring &name_) const |
| Get information about a collection of header or metadata fields, based on the partial or complete name_ of the collection or of a field in the collection.
|
|
void | insertConstantExtractField (PHV::Field *f) |
|
bool | isDarkMutex (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isDeparserNoPack (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isDigestNoPack (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isFieldMutex (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isFieldNoPack (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isMetadataMutex (const PHV::Field *f1, const PHV::Field *f2) const |
|
bool | isTempVar (const PHV::Field *f) const |
|
void | mergeConstantExtracts (PHV::Field *f, PHV::Field *g) |
|
SymBitMatrix & | metadata_mutex () |
|
const SymBitMatrix & | metadata_mutex () const |
|
bool | must_alloc_same_container (const PHV::FieldSlice &a, const PHV::FieldSlice &b) const |
|
size_t | num_fields () const |
|
void | removeDigestNoPack (const PHV::Field *f1, const PHV::Field *f2) |
|
void | removeFieldMutex (const PHV::Field *f1, const PHV::Field *f2) |
|
void | removeFieldNoPack (const PHV::Field *f1, const PHV::Field *f2) |
|
SameContainerAllocConstraint & | same_container_alloc_constraint () |
|
const SameContainerAllocConstraint & | same_container_alloc_constraint () const |
|
void | set_done (bool trivial=false) |
|
unsigned | sizeFieldNoPack () |
|
const StructInfo | struct_info (const IR::HeaderRef *hr) const |
|
const StructInfo | struct_info (cstring name) const |
|
bool | trivial_alloc () const |
|
PhvInfo stores information about the PHV-backed storage in the program - fields of header and metadata instances, header stacks, TempVars, and POV bits. These items are all represented as PHV::Field objects.
Prior to PHV allocation, PhvInfo provides a central place to discover information about Fields; this includes their name, size and alignment, the ways in which they're used in the program and the PHV allocation constraints that apply to them.
After PHV allocation, PhvInfo additionally stores the allocation results for each Field.
PhvInfo is read throughout the backend, but it should be written to only by CollectPhvInfo and the PHV analysis and PHV bind passes. If you need to store new information in PhvInfo, add a pass that collects it from the IR in CollectPhvInfo.
- See also
- CollectPhvInfo for more information.