P4C
The P4 Compiler
Loading...
Searching...
No Matches
add_parde_metadata.h
1
19#ifndef BF_P4C_PARDE_ADD_PARDE_METADATA_H_
20#define BF_P4C_PARDE_ADD_PARDE_METADATA_H_
21
22#include "parde_visitor.h"
23
35 public:
36 explicit AddParserMetadata(const IR::BFN::Pipe *pipe, bool isV1) : pipe(pipe), isV1(isV1) {
37 CHECK_NULL(pipe);
38 }
39
40 private:
41 bool preorder(IR::BFN::Parser *) override;
42
43 void addIngressMetadata(IR::BFN::Parser *d);
44 void addEgressMetadata(IR::BFN::Parser *d);
45
46 void addTofinoIngressParserEntryPoint(IR::BFN::Parser *);
47 void addTofinoEgressParserEntryPoint(IR::BFN::Parser *);
48
49 const IR::BFN::Pipe *pipe;
50 bool isV1;
51};
52
65 public:
66 explicit AddDeparserMetadata(const IR::BFN::Pipe *pipe) : pipe(pipe) { CHECK_NULL(pipe); }
67
69 bool preorder(IR::BFN::Deparser *) override;
70
72 void addIngressMetadata(IR::BFN::Deparser *d);
73
74 // Add egress deparser parameters
75 void addEgressMetadata(IR::BFN::Deparser *d);
76
77 const IR::BFN::Pipe *pipe;
78};
79
80#endif /* BF_P4C_PARDE_ADD_PARDE_METADATA_H_ */
bool preorder(IR::BFN::Deparser *) override
Process the deparser instances to add parameters.
Definition add_parde_metadata.cpp:137
void addIngressMetadata(IR::BFN::Deparser *d)
Add ingress deparser parameters.
Definition add_parde_metadata.cpp:158
Add deparser parameters for standard metadata.
Definition add_parde_metadata.h:64
Extend parsers to extract standard metadata.
Definition add_parde_metadata.h:34
Definition parde_visitor.h:129
Definition parde_visitor.h:78