31 std::set<const IR::Parameter *> toDereference;
32 std::vector<cstring> saveAction;
48 bool preorder(
const IR::PathExpression *expression)
override;
49 bool preorder(
const IR::MethodCallExpression *expression)
override;
50 bool preorder(
const IR::ExitStatement *)
override;
51 bool preorder(
const IR::ReturnStatement *)
override;
52 bool preorder(
const IR::IfStatement *statement)
override;
53 bool preorder(
const IR::SwitchStatement *statement)
override;
54 bool preorder(
const IR::StructExpression *expr)
override;
60 const IR::ControlBlock *controlBlock;
61 const IR::Parameter *headers;
62 const IR::Parameter *accept;
63 const IR::Parameter *xdpInputMeta;
64 const IR::Parameter *xdpOutputMeta;
65 const IR::Parameter *parserHeaders;
69 const bool emitExterns;
71 std::set<const IR::Parameter *> toDereference;
72 std::map<cstring, EBPFTable *> tables;
73 std::map<cstring, EBPFCounterTable *> counters;
76 const IR::Parameter *parserHeaders);
78 virtual void emitDeclaration(
CodeBuilder *builder,
const IR::Declaration *decl);
80 virtual void emitTableInitializers(
CodeBuilder *builder);
81 virtual void emitTableInstances(
CodeBuilder *builder);
84 auto result = ::P4::get(tables, name);
85 BUG_CHECK(result !=
nullptr,
"No table named %1%", name);
89 auto result = ::P4::get(counters, name);
90 BUG_CHECK(result !=
nullptr,
"No counter named %1%", name);
97 DECLARE_TYPEINFO(EBPFControl, EBPFObject);
Definition ebpfControl.h:28
virtual void compileEmitField(const IR::Expression *expr, cstring field, unsigned alignment, EBPFType *type)
Handle the packet_out.emit method.
Definition ebpfControl.cpp:156