148 IR::IndexedVector<IR::DpdkAsmStatement> instructions;
152 const IR::P4Parser *parser =
nullptr;
153 const IR::Node *parent =
nullptr;
154 IR::Type_Struct *metadataStruct =
nullptr;
158 bool checkIfBelongToSameHdrMdStructure(
const IR::Argument *field);
160 cstring getHdrMdStrName(
const IR::Member *mem);
161 bool checkIfConsecutiveHdrMdfields(
const IR::Argument *field);
166 : typemap(typemap), refmap(refmap), structure(structure) {
167 visitDagOnce =
false;
171 : typemap(typemap), refmap(refmap), structure(structure), metadataStruct(metadataStruct) {
172 visitDagOnce =
false;
174 IR::IndexedVector<IR::DpdkAsmStatement> getInstructions() {
return instructions; }
175 void branchingInstructionGeneration(
cstring true_label,
cstring false_label,
176 const IR::Expression *expr);
177 bool preorder(
const IR::AssignmentStatement *a)
override;
178 bool preorder(
const IR::IfStatement *a)
override;
179 bool preorder(
const IR::MethodCallStatement *a)
override;
180 bool preorder(
const IR::SwitchStatement *a)
override;
182 void add_instr(
const IR::DpdkAsmStatement *s) { instructions.push_back(s); }
183 IR::IndexedVector<IR::DpdkAsmStatement> &get_instr() {
return instructions; }
184 void process_logical_operation(
const IR::Expression *,
const IR::Operation_Binary *);
185 void process_relation_operation(
const IR::Expression *,
const IR::Operation_Relation *);
187 void set_parser(
const IR::P4Parser *p) { parser = p; }
188 void set_parent(
const IR::Node *p) { parent = p; }
189 bool handleConstSwitch(
const IR::SwitchStatement *a);