19#ifndef BF_P4C_PHV_PHV_PARDE_MAU_USE_H_
20#define BF_P4C_PHV_PHV_PARDE_MAU_USE_H_
22#include "backends/tofino/bf-p4c/common/header_stack.h"
23#include "backends/tofino/bf-p4c/ir/bitrange.h"
24#include "backends/tofino/bf-p4c/ir/gress.h"
25#include "backends/tofino/bf-p4c/ir/thread_visitor.h"
26#include "backends/tofino/bf-p4c/ir/tofino_write_context.h"
27#include "backends/tofino/bf-p4c/phv/phv.h"
61 bitvec extracted_i[GRESS_T_COUNT];
64 bitvec extracted_from_pkt_i[GRESS_T_COUNT];
67 bitvec extracted_from_const_i[GRESS_T_COUNT];
70 enum { PARDE = 0, MAU = 1 };
111 std::optional<gress_t> gress = std::nullopt)
const;
115 std::optional<gress_t> gress = std::nullopt)
const;
136 gress_t thread = INGRESS;
142 bool preorder(
const IR::BFN::Parser *)
override;
143 bool preorder(
const IR::BFN::Extract *)
override;
144 bool preorder(
const IR::BFN::ParserChecksumWritePrimitive *)
override;
145 bool preorder(
const IR::BFN::Deparser *)
override;
146 bool preorder(
const IR::BFN::Digest *)
override;
147 bool preorder(
const IR::MAU::TableSeq *)
override;
148 bool preorder(
const IR::MAU::TableKey *)
override;
149 bool preorder(
const IR::Expression *)
override;
159 bool preorder(
const IR::BFN::Deparser *d)
override;
160 bool preorder(
const IR::BFN::DeparserParameter *param)
override;
161 void postorder(
const IR::BFN::DeparserParameter *param)
override;
162 bool preorder(
const IR::BFN::Digest *digest)
override;
163 void postorder(
const IR::BFN::Digest *digest)
override;
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition phv_fields.h:154
Definition phv_parde_mau_use.h:38
bool is_learning(const PHV::Field *f) const
Definition phv_parde_mau_use.h:126
bitvec deparser_i[GRESS_T_COUNT]
Fields used in the deparser.
Definition phv_parde_mau_use.h:80
bool is_extracted_from_constant(const PHV::Field *f, std::optional< gress_t > gress=std::nullopt) const
Definition phv_parde_mau_use.cpp:250
bool is_referenced(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:179
profile_t init_apply(const IR::Node *) override
Definition phv_parde_mau_use.cpp:34
bool is_used_alu(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:211
ordered_map< int, ordered_map< unsigned, ordered_set< le_bitrange > > > use_i
Definition phv_parde_mau_use.h:77
bool is_used_mau(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:194
bool is_used_parde(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:222
bool is_allocation_required(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:259
bool is_extracted(const PHV::Field *f, std::optional< gress_t > gress=std::nullopt) const
Definition phv_parde_mau_use.cpp:233
ordered_set< std::pair< const IR::MAU::Table *, const IR::MAU::TableKey * > > ixbar_read(const PHV::Field *f, le_bitrange range) const
Definition phv_parde_mau_use.cpp:264
bool is_extracted_from_pkt(const PHV::Field *f, std::optional< gress_t > gress=std::nullopt) const
Definition phv_parde_mau_use.cpp:241
bool is_written_mau(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:216
bool is_deparsed(const PHV::Field *f) const
Definition phv_parde_mau_use.cpp:188
Definition phv_fields.h:1095
Definition phv_parde_mau_use.h:154
Definition tofino_write_context.h:24
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
The namespace encapsulating PHV-related stuff.
Definition gateway.h:32