19#ifndef BF_P4C_COMMON_ELIM_UNUSED_H_
20#define BF_P4C_COMMON_ELIM_UNUSED_H_
22#include "field_defuse.h"
27 const IR::BFN::AliasMember *preorder(IR::BFN::AliasMember *m) {
return m; }
28 const IR::BFN::AliasMember *preorder(IR::Member *m) {
return new IR::BFN::AliasMember(m, m); }
34 std::set<cstring> &zeroInitFields;
37 class CollectEmptyTables;
52 const IR::MAU::StatefulAlu *preorder(IR::MAU::StatefulAlu *salu)
override {
58 const IR::GlobalRef *preorder(IR::GlobalRef *gr)
override {
65 virtual bool elim_extract(
const IR::BFN::Unit *unit,
const IR::BFN::Extract *extract) = 0;
67 const IR::BFN::Extract *preorder(IR::BFN::Extract *extract)
override;
68 const IR::BFN::FieldLVal *preorder(IR::BFN::FieldLVal *lval)
override;
Definition elim_unused.h:45
virtual bool elim_extract(const IR::BFN::Unit *unit, const IR::BFN::Extract *extract)=0
Determines whether the given extract, occurring in the given unit, should be eliminated.
std::set< cstring > eliminated
Names of fields whose extracts have been eliminated.
Definition elim_unused.h:50
Definition elim_unused.cpp:68
Removes no-op tables that have the @hidden annotation.
Definition elim_unused.cpp:118
Definition elim_unused.h:31
Definition ir/pass_manager.h:40
Definition phv_fields.h:1095
Definition elim_unused.h:26
Definition field_defuse.h:77
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24