P4C
The P4 Compiler
|
#include <utils_v2.h>
Public Member Functions | |
AllocError (ErrorCode code) | |
AllocError (ErrorCode code, cstring msg) | |
std::string | str () const |
Public Attributes | |
ErrorCode | code |
const std::vector< AllocSlice > * | invalid_packing = nullptr |
cstring | msg |
const ordered_set< const SuperCluster::SliceList * > * | reslice_required = nullptr |
AllocError contains a code of the failure reason and detailed messages. The additional cannot_allocate_sl may be specified if some allocation process has found that allocation cannot proceed because a slice list cannot be allocated, which is usually caused by field packing in the slice that violates action phv constraints.
const std::vector<AllocSlice>* PHV::v2::AllocError::invalid_packing = nullptr |
when allocating slices, and action cannot be synthesized, alloc slices in the destination container will be saved here.
const ordered_set<const SuperCluster::SliceList *>* PHV::v2::AllocError::reslice_required = nullptr |
when failed to allocate a super cluster because action cannot be synthesized, if it is intrinsic conflict of constraints, then either the destination slice list needs to be sliced more, or source slice list needs to be sliced less (packed together). Both sources and destination slice lists will be saved here.