P4C
The P4 Compiler
Loading...
Searching...
No Matches
add_special_constraints.h
1
19#ifndef BF_P4C_PHV_ADD_SPECIAL_CONSTRAINTS_H_
20#define BF_P4C_PHV_ADD_SPECIAL_CONSTRAINTS_H_
21
22#include "backends/tofino/bf-p4c/parde/decaf.h"
23#include "backends/tofino/bf-p4c/phv/action_phv_constraints.h"
24#include "backends/tofino/bf-p4c/phv/phv_fields.h"
25#include "backends/tofino/bf-p4c/phv/pragma/phv_pragmas.h"
26#include "ir/ir.h"
27
41 private:
42 PhvInfo &phv_i;
44 PHV::Pragmas &pragmas_i;
46 const ActionPhvConstraints &actions_i;
47 const DeparserCopyOpt &decaf_i;
48
50 std::set<cstring> seen_hdr_i;
51
52 profile_t init_apply(const IR::Node *root) override;
53
58 bool preorder(const IR::BFN::ChecksumVerify *verify) override;
59 bool preorder(const IR::BFN::ChecksumResidualDeposit *get) override;
60
62 bool preorder(const IR::Concat *) override;
63 bool preorder(const IR::Cast *) override;
64
65 bool preorder(const IR::ConcreteHeaderRef *hr) override;
66
67 void end_apply() override;
68
69 public:
70 explicit AddSpecialConstraints(PhvInfo &phv, PHV::Pragmas &pragmas,
71 const ActionPhvConstraints &actions,
72 const DeparserCopyOpt &decaf)
73 : phv_i(phv), pragmas_i(pragmas), actions_i(actions), decaf_i(decaf) {}
74};
75
76#endif /* BF_P4C_PHV_ADD_SPECIAL_CONSTRAINTS_H_ */
Definition action_phv_constraints.h:107
Definition add_special_constraints.h:40
Definition node.h:94
Definition visitor.h:400
Definition visitor.h:78
Definition phv_pragmas.h:46
Definition phv_fields.h:1095
Top level PassManager.
Definition decaf.h:749