19#ifndef BF_P4C_PHV_AUTO_INIT_METADATA_H_
20#define BF_P4C_PHV_AUTO_INIT_METADATA_H_
25#include "backends/tofino/bf-p4c/common/elim_unused.h"
26#include "backends/tofino/bf-p4c/common/field_defuse.h"
28#include "ir/visitor.h"
29#include "lib/cstring.h"
40 : defuse(defuse), phv(phv) {}
42 const IR::Node *preorder(IR::BFN::Pipe *pipe)
override;
46 bool auto_init_metadata(
const IR::BFN::Pipe *pipe)
const;
59 std::set<cstring> &zeroInitFields;
63 std::set<cstring> pa_no_inits;
67 bool elim_assign(
const IR::BFN::Unit *unit,
const IR::Expression *left,
68 const IR::Expression *right);
71 void end_apply()
override;
74 bool elim_extract(
const IR::BFN::Unit *unit,
const IR::BFN::Extract *extract)
override;
76 const IR::BFN::Pipe *preorder(IR::BFN::Pipe *pipe)
override;
77 const IR::MAU::Instruction *preorder(IR::MAU::Instruction *instr)
override;
80 std::set<cstring> &zeroInitFields)
84 zeroInitFields(zeroInitFields) {}
Definition elim_unused.h:45
Definition phv_fields.h:1095
Definition field_defuse.h:77