P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::v2::IxbarFriendlyPacking Class Reference

Public Member Functions

 IxbarFriendlyPacking (PhvInfo &phv, const CollectTableKeys &tables, const TablesMutuallyExclusive &table_mutex, const FieldDefUse &defuse, const DependencyGraph &deps, HasPackConflict has_pc, const ParserPackingValidator *parser_packing_validator, const AllocVerifier &can_alloc, const MauBacktracker *mau, AllocatorMetrics &alloc_metrics)
 
std::list< SuperCluster * > pack (const std::list< SuperCluster * > &clusters)
 

Static Public Member Functions

static bool may_create_container_conflict (const FieldSlice &a, const FieldSlice &b, const FieldDefUse &defuse, const DependencyGraph &deps, const TablesMutuallyExclusive &table_mutex, int n_stages, const MauBacktracker *mau)
 

Member Function Documentation

◆ may_create_container_conflict()

bool PHV::v2::IxbarFriendlyPacking::may_create_container_conflict ( const FieldSlice & a,
const FieldSlice & b,
const FieldDefUse & defuse,
const DependencyGraph & deps,
const TablesMutuallyExclusive & table_mutex,
int n_stages,
const MauBacktracker * mau )
static
Returns
true if stages of writes to a overlapped with b's writing stages. When n_stages is not zero, they are considered as overlapped if there is a write within n_stages stages of a write to the other. This behavior can be overiden if the mau argument is set to non nullptr. In this case, the container conflict evaluation will look at the last table allocation instead.

◆ pack()

std::list< SuperCluster * > PHV::v2::IxbarFriendlyPacking::pack ( const std::list< SuperCluster * > & clusters)

verify by trying to allocate the proposed super cluster.