19#ifndef BACKENDS_TOFINO_BF_P4C_PHV_PRAGMA_PA_BYTE_PACK_H_
20#define BACKENDS_TOFINO_BF_P4C_PHV_PRAGMA_PA_BYTE_PACK_H_
22#include "backends/tofino/bf-p4c/phv/phv_fields.h"
23#include "backends/tofino/bf-p4c/phv/utils/utils.h"
25#include "lib/safe_vector.h"
45 std::optional<Util::SourceInfo> src_info;
52 std::optional<cstring> error;
53 bool ok()
const {
return !
error; }
63 AddConstraintResult add_packing_constraint(
const PackConstraint &packing);
66 profile_t init_apply(
const IR::Node *root)
override {
67 profile_t rv = Inspector::init_apply(root);
68 packing_layouts_i.clear();
73 bool preorder(
const IR::BFN::Pipe *pipe)
override;
91 static const char *description;
92 static const char *help;
Definition ordered_set.h:32
Definition safe_vector.h:27
Definition phv_fields.h:1095
Definition pa_byte_pack.h:39
static const char * name
BFN::Pragma interface.
Definition pa_byte_pack.h:90
AddConstraintResult add_compiler_added_packing(const PHV::PackingLayout &packing)
Definition phv/pragma/pa_byte_pack.cpp:195
const safe_vector< PackConstraint > & packings() const
Definition pa_byte_pack.h:79
Definition pa_byte_pack.h:43
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
void error(const char *format, Args &&...args)
Report an error with the given message.
Definition lib/error.h:51
Definition phv_fields.h:1034
Definition pa_byte_pack.h:49
ordered_set< const PHV::Field * > alignment_added
the set of fields which new alignment constraints were added on.
Definition pa_byte_pack.h:51