19#ifndef BF_P4C_PHV_CLUSTER_PHV_OPERATIONS_H_
20#define BF_P4C_PHV_CLUSTER_PHV_OPERATIONS_H_
22#include "backends/tofino/bf-p4c/ir/thread_visitor.h"
23#include "backends/tofino/bf-p4c/phv/phv.h"
24#include "backends/tofino/bf-p4c/phv/phv_parde_mau_use.h"
27#include "lib/ordered_map.h"
48 static constexpr int SALU_HASH_SOURCE_LIMIT = 51;
77 class Find_Salu_Sources :
public Inspector {
80 bool preorder(
const IR::MAU::SaluAction *)
override;
81 bool preorder(
const IR::Expression *e)
override;
82 bool preorder(
const IR::MAU::HashDist *)
override;
83 bool preorder(
const IR::MAU::IXBarExpression *)
override;
85 bool preorder(
const IR::Annotation *)
override {
return false; }
86 bool preorder(
const IR::Declaration_Instance *)
override {
return false; }
87 bool preorder(
const IR::MAU::Selector *)
override {
return false; }
89 static void collapse_contained(std::map<le_bitrange, const IR::Expression *> &m);
92 explicit Find_Salu_Sources(
const PhvInfo &phv) : phv(phv) {}
95 std::vector<const IR::MAU::IXBarExpression *> hash_sources;
98 void processSaluInst(
const IR::MAU::Instruction *);
99 void processInst(
const IR::MAU::Instruction *);
100 bool preorder(
const IR::MAU::Instruction *)
override;
Definition ordered_map.h:32
Definition ordered_set.h:32
Annotate each Field in PhvInfo with the instructions it's involved in.
Definition cluster_phv_operations.h:47
static const ordered_set< cstring > BITWISE_OPS
Definition cluster_phv_operations.h:26
Definition phv_fields.h:1095
The namespace encapsulating PHV-related stuff.
Definition gateway.h:32