P4C
The P4 Compiler
Loading...
Searching...
No Matches
PHV::MiniAlloc Struct Reference

Public Member Functions

void add_slice (const AllocSlice &slice)
 add a new alloc slice.
 
std::optional< gress_t > get_gress (const Container &c) const
 
bool is_empty_at (const Container &c, const LiveRange &lr) const
 
bool satisfies_constraints (const PHV::Field *f, const LiveRange &lr, const Container &c) const
 

Public Attributes

ordered_map< Container, gress_t > cont_gress
 
ordered_map< Container, ordered_set< AllocSlice > > cont_slices
 

Member Function Documentation

◆ get_gress()

std::optional< gress_t > PHV::MiniAlloc::get_gress ( const Container & c) const
inline
Returns
gress assignment for c.

◆ is_empty_at()

bool PHV::MiniAlloc::is_empty_at ( const Container & c,
const LiveRange & lr ) const
inline
Returns
true if c does not have any allocated slice within lr.

◆ satisfies_constraints()

bool PHV::MiniAlloc::satisfies_constraints ( const PHV::Field * f,
const LiveRange & lr,
const Container & c ) const
inline
Returns
true if f of lr can be allocated to c.