P4C
The P4 Compiler
Loading...
Searching...
No Matches
pa_deparser_zero.h
1
19#ifndef BACKENDS_TOFINO_BF_P4C_PHV_PRAGMA_PA_DEPARSER_ZERO_H_
20#define BACKENDS_TOFINO_BF_P4C_PHV_PRAGMA_PA_DEPARSER_ZERO_H_
21
22#include "backends/tofino/bf-p4c/phv/phv_fields.h"
23#include "ir/ir.h"
24
25using namespace P4;
26
31 private:
32 PhvInfo &phv_i;
33
35 static const std::vector<std::string> *supported_pragmas;
36
38 ordered_set<const PHV::Field *> notParsedFields;
40 ordered_set<const PHV::Field *> notDeparsedFields;
44 ordered_set<const PHV::Field *> disableDeparseZeroFields;
45
46 profile_t init_apply(const IR::Node *root) override;
47 bool preorder(const IR::BFN::Pipe *pipe) override;
48 void end_apply() override;
49
50 public:
51 explicit PragmaDeparserZero(PhvInfo &p) : phv_i(p) {}
52
54 const ordered_set<const PHV::Field *> &getNotParsedFields() const { return notParsedFields; }
55
58 return notDeparsedFields;
59 }
60};
61
62std::ostream &operator<<(std::ostream &out, const PragmaDeparserZero &pa_np);
63
64#endif /* BACKENDS_TOFINO_BF_P4C_PHV_PRAGMA_PA_DEPARSER_ZERO_H_ */
Definition node.h:94
Definition visitor.h:400
Definition visitor.h:78
Definition ordered_map.h:32
Definition ordered_set.h:32
Definition phv_fields.h:1095
Definition pa_deparser_zero.h:30
const ordered_set< const PHV::Field * > & getNotParsedFields() const
Definition pa_deparser_zero.h:54
const ordered_set< const PHV::Field * > & getNotDeparsedFields() const
Definition pa_deparser_zero.h:57
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24