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

Public Member Functions

 AllocSlice (AllocSlice &&)=default
 
 AllocSlice (const AllocSlice &a)
 
 AllocSlice (const Field *f, Container c, int f_bit_lo, int container_bit_lo, int width)
 
 AllocSlice (const Field *f, Container c, int f_bit_lo, int container_bit_lo, int width, const ActionSet &action)
 
 AllocSlice (const Field *f, Container c, le_bitrange f_slice, le_bitrange container_slice)
 
bool addRef (cstring, FieldUse f_use) const
 
void addRefs (const RefsMap &sl_refs, bool clear_refs=false)
 
void clearRefs ()
 
Container container () const
 
std::pair< Container, int > container_byte () const
 
le_bitrange container_bytes () const
 
le_bitrange container_slice () const
 
bool extends_live_range (const AllocSlice &other) const
 
const Fieldfield () const
 
le_bitrange field_slice () const
 
void get_ref_lr (StageAndAccess &minStg, StageAndAccess &maxStg) const
 
const StageAndAccess & getEarliestLiveness () const
 
const ActionSetgetInitPoints () const
 
DarkInitPrimitivegetInitPrimitive ()
 
const DarkInitPrimitivegetInitPrimitive () const
 
const StageAndAccess & getLatestLiveness () const
 
const RefsMapgetRefs () const
 
bool getShadowAlwaysRun () const
 
bool getShadowInit () const
 
bool hasInitPrimitive () const
 
bool hasMetaInit () const
 
bool is_initialized () const
 
bool isEarlierFieldslice (const AllocSlice &other) const
 Check if the references of the slice are earlier than the @other refs.
 
bool isLiveAt (int stage, const FieldUse &use) const
 
bool isLiveRangeDisjoint (const AllocSlice &other, int gap=0) const
 
bool isPhysicalDeparserStage () const
 
bool isPhysicalDeparserStageExceeded () const
 
bool isPhysicalStageBased () const
 
bool isReferenced (const AllocContext *ctxt, const FieldUse *use, SliceMatch match=SliceMatch::DFLT) const
 
bool isUninitializedRead () const
 
bool isUsedDeparser () const
 
bool isUsedParser () const
 
bool operator!= (const AllocSlice &other) const
 
bool operator< (const AllocSlice &other) const
 
AllocSliceoperator= (AllocSlice &&)=default
 
AllocSliceoperator= (const AllocSlice &a)
 
bool operator== (const AllocSlice &other) const
 
bool representsSameFieldSlice (const AllocSlice &other) const
 
bool same_alloc_fieldslice (const AllocSlice &other) const
 
void setEarliestLiveness (const StageAndAccess &min)
 
void setInitPoints (const ActionSet &init_points)
 
void setInitPrimitive (const DarkInitPrimitive *prim)
 
void setIsPhysicalStageBased (bool v)
 
void setLatestLiveness (const StageAndAccess &max)
 
void setLiveness (const StageAndAccess &min, const StageAndAccess &max)
 
void setMetaInit ()
 
void setPhysicalDeparserStage (bool v)
 
void setPhysicalDeparserStageExceeded (bool v)
 
void setShadowAlwaysRun (bool val)
 
void setShadowInit (bool val)
 
std::optional< AllocSlicesub_alloc_by_field (int start, int len) const
 
std::string toString () const
 
int width () const
 

Static Public Attributes

static const int NOTSET = -2