19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_HELPERS_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_HELPERS_H_
22#include "bf-p4c/ir/bitrange.h"
23#include "bf-p4c/parde/clot/clot_info.h"
24#include "bf-p4c/phv/utils/slice_alloc.h"
26#include "lib/cstring.h"
27#include "lib/stringref.h"
48 bool includeContainerInfo =
true);
63 bool includeContainerInfo =
true);
105 const IR::BFN::FieldLVal *fieldRef,
111std::pair<IR::Vector<IR::BFN::ContainerRef>, std::vector<Clot *>>
lowerFields(
112 const PhvInfo &phv,
const ClotInfo &clotInfo,
const IR::Vector<IR::BFN::FieldLVal> &fields,
113 bool is_checksum =
false);
119 const IR::BFN::FieldLVal *fieldRef,
120 const char *unsplittableReason);
127std::map<PHV::Container, unsigned> getChecksumPhvSwap(
const PhvInfo &phv,
128 const IR::BFN::EmitChecksum *emitChecksum);
133 const PhvInfo &phv,
const IR::Vector<IR::BFN::FieldLVal> &fields);
Definition clot_info.h:41
Definition safe_vector.h:27
Represents a PHV-allocation context: a parser, a table, or a deparser.
Definition phv_fields.h:83
Definition slice_alloc.h:136
Definition phv_fields.h:1095
ClosedRange< RangeUnit::Bit, Endian::Network > nw_bitrange
Convenience typedefs for closed ranges in bits.
Definition lib/bitrange.h:755
Definition lower_parser.cpp:72
cstring debugInfoFor(const cstring fieldName, const PHV::AllocSlice &slice, bool includeContainerInfo)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:35
cstring sanitizeName(StringRef name)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:29
std::pair< IR::Vector< IR::BFN::ContainerRef >, std::vector< Clot * > > lowerFields(const PhvInfo &phv, const ClotInfo &clotInfo, const IR::Vector< IR::BFN::FieldLVal > &fields, bool is_checksum)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:179
const IR::BFN::ContainerRef * lowerUnsplittableField(const PhvInfo &phv, const ClotInfo &clotInfo, const IR::BFN::FieldLVal *fieldRef, const char *unsplittableReason)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:257
const IR::BFN::ContainerBitRef * lowerSingleBit(const PhvInfo &phv, const IR::BFN::FieldLVal *fieldRef, const PHV::AllocContext *ctxt)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:152
const safe_vector< IR::BFN::DigestField > * computeControlPlaneFormat(const PhvInfo &phv, const IR::Vector< IR::BFN::FieldLVal > &fields)
Definition tofino/bf-p4c/parde/lowered/helpers.cpp:304
Definition stringref.h:43