|
| CoreAllocation (const PHV::AllocUtils &utils, bool disable_metainit) |
|
bool | can_physical_liverange_overlay (const PHV::AllocSlice &slice, const ordered_set< PHV::AllocSlice > &allocated) const |
|
bool | checkDarkOverlay (const std::vector< PHV::AllocSlice > &candidate_slices, const PHV::Transaction &alloc) const |
|
bool | checkParserExtractions (const std::vector< PHV::AllocSlice > &candidate_slices, const PHV::Transaction &alloc) const |
|
std::optional< const PHV::SuperCluster::SliceList * > | find_first_unallocated_slicelist (const PHV::Allocation &alloc, const std::list< PHV::ContainerGroup * > &container_groups, const PHV::SuperCluster &cluster) const |
|
bool | generateNewAllocSlices (const PHV::AllocSlice &origSlice, const ordered_set< PHV::AllocSlice > &alloced_slices, PHV::DarkInitMap &slices, ordered_set< PHV::AllocSlice > &new_candidate_slices, PHV::Transaction &alloc_attempt, const PHV::Allocation::MutuallyLiveSlices &container_state) const |
|
bool | get_prioririze_ARA_inits () |
|
bool | get_single_gress_parser_group () |
|
bool | hasARAinits (ordered_set< PHV::AllocSlice > slices) const |
| @look for ARA inits in set of slices
|
|
bool | hasCrossingLiveranges (std::vector< PHV::AllocSlice > candidate_slices, ordered_set< PHV::AllocSlice > alloc_slices) const |
|
PHV::Transaction | make_speculated_alloc (const PHV::Transaction &alloc, const PHV::SuperCluster &sc, const std::vector< PHV::AllocSlice > &candidates, const PHV::Container &c) const |
|
bool | rangesOverlap (const PHV::AllocSlice &slice, const IR::BFN::ParserPrimitive *prim) const |
| Do the slice and prim have overlapping field ranges.
|
|
bool | satisfies_constraints (const PHV::Allocation &alloc, const PHV::AllocSlice &slice, ordered_set< PHV::AllocSlice > &initFields, std::vector< PHV::AllocSlice > &candidate_slices) const |
|
bool | satisfies_constraints (const PHV::ContainerGroup &group, const PHV::Field *f) const |
|
bool | satisfies_constraints (const PHV::ContainerGroup &group, const PHV::FieldSlice &slice) const |
|
bool | satisfies_constraints (std::vector< PHV::AllocSlice > slices, const PHV::Allocation &alloc) const |
|
void | set_prioritize_ARA_inits () |
|
void | set_single_gress_parser_group () |
|
std::optional< PHV::Transaction > | try_alloc (const PHV::Allocation &alloc, const PHV::ContainerGroup &group, PHV::SuperCluster &cluster, int max_alignment_tries, const ScoreContext &score_ctx) const |
|
std::optional< PHV::Transaction > | try_deparser_zero_alloc (const PHV::Allocation &alloc, PHV::SuperCluster &cluster, PhvInfo &phv) const |
|
std::optional< PHV::Transaction > | tryAllocSliceList (const PHV::Allocation &alloc, const PHV::ContainerGroup &group, const PHV::SuperCluster &super_cluster, const PHV::Allocation::ConditionalConstraint &start_positions, const ScoreContext &score_ctx) const |
|
std::optional< PHV::Transaction > | tryAllocSliceList (const PHV::Allocation &alloc, const PHV::ContainerGroup &group, const PHV::SuperCluster &super_cluster, const PHV::SuperCluster::SliceList &slice_list, const ordered_map< PHV::FieldSlice, int > &start_positions, const ScoreContext &score_ctx) const |
|
A set of functions used in PHV allocation.
Helper function for tryAlloc that tries to allocate all fields in start_positions
simultaneously. Deparsed fields in particular need to be placed simultaneously with their neighbors; otherwise, the deparsed
constraint cannot be satisfied.
For example, consider a header with two 8-bit fields:
header h { bit<4> f1; bit<4> f2; }
Fields f1 and f2 are deparsed, meaning that each must be placed in a container alone or with other deparsed fields (in order) such that no container bits are unallocated. However, if we check this constraint one field at a time, then neither field can be placed—one must be placed first, but it only occupies half the container, violating the constraint.
Additionally, start_positions
also includes the conditional constraints generated by ActionPhvConstraints.
Uses mutex_i and uses_i.
- Parameters
-
alloc | the allocation computed so far. |
group | the container group to which the slice list is to be allocated. |
super_cluster | ??? |
start_positions | a map. Keys are the field slices to be allocated. Values are the corresponding conditional constraint on the field slice. |
score_ctx | TODO TODO: there is an assumption that only fieldslice of the slice list, shows up in the start_positions map (as there is no slice list passed as args). Better to remove this. |
- no overlapped slice.
- directly overlaid.