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

#include <utils_v2.h>

Public Member Functions

bool empty () const
 
std::optional< ScAllocAlignmentmerge (const ScAllocAlignment &other) const
 
bool ok (const AlignedCluster *aligned, int start) const
 
cstring pretty_print (cstring prefix, const SuperCluster *sc) const
 

Public Attributes

ordered_map< const AlignedCluster *, int > cluster_starts
 a cluster_alignment maps aligned cluster to start bit location in a container.
 

Detailed Description

ScAllocAlignment is the alignment arrangement for a super cluster based on its alignment constraints of slice lists and aligned clusters.

Member Function Documentation

◆ empty()

bool PHV::v2::ScAllocAlignment::empty ( ) const
inline
Returns
true if there is no alignment scheduled: cluster without slice lists.

◆ merge()

std::optional< ScAllocAlignment > PHV::v2::ScAllocAlignment::merge ( const ScAllocAlignment & other) const
Returns
merged alignment constraint if no conflict was found.

◆ ok()

bool PHV::v2::ScAllocAlignment::ok ( const AlignedCluster * aligned,
int start ) const
inline
Returns
true if it is okay to place field slices in aligned to start index of a container.

◆ pretty_print()

cstring PHV::v2::ScAllocAlignment::pretty_print ( cstring prefix,
const SuperCluster * sc ) const
Returns
pretty print string for the alignment of sc.