45const IR::BFN::Pipe *extract_maupipe(
const IR::P4Program *, BFN_Options &options);
69class AttachTables :
public PassManager {
76 IR::MAU::StatefulAlu *>
78 StatefulSelectors stateful_selectors;
97 void postorder(
const IR::Expression *)
override { visitAgain(); }
98 void postorder(
const IR::GlobalRef *)
override;
99 void updateAttachedSalu(
const IR::Declaration_Instance *,
const IR::GlobalRef *);
102 explicit InitializeStatefulAlus(AttachTables &s) : self(s) {}
127 IR::MAU::StatefulAlu *>
129 bool preorder(
const IR::MAU::Primitive *prim)
override;
130 void end_apply()
override;
133 explicit InitializeRegisterParams(AttachTables &s) : self(s) {}
148 class InitializeStatefulInstructions :
public MauInspector {
153 void postorder(
const IR::Expression *)
override { visitAgain(); }
154 void postorder(
const IR::GlobalRef *gref)
override;
157 explicit InitializeStatefulInstructions(AttachTables &s) : self(s) {}
173 bool preorder(IR::MAU::Table *)
override;
174 bool preorder(IR::MAU::Action *)
override;
175 void postorder(IR::MAU::Table *)
override;
176 void postorder(IR::Expression *)
override { visitAgain(); }
177 void postorder(IR::GlobalRef *)
override;
179 const IR::MAU::StatefulAlu *findAttachedSalu(
const IR::Declaration_Instance *ext);
183 : self(s), refMap(refMap), typeMap(typeMap) {}
185 bool findSaluDeclarations(
const IR::Declaration_Instance *ext,
186 const IR::Declaration_Instance **reg_ptr,
187 const IR::Type_Specialized **regtype_ptr =
nullptr,
188 const IR::Type_Extern **seltype_ptr =
nullptr);
191 static bool isSaluActionType(
const IR::Type *);
195 StatefulSelectors ss)
196 : refMap(rm), typeMap(tm), converted(con), stateful_selectors(ss) {
197 addPasses({
new InitializeStatefulAlus(*
this),
new InitializeRegisterParams(*
this),
198 new InitializeStatefulInstructions(*
this),
199 new DefineGlobalRefs(*
this, refMap, typeMap)});
200 stop_on_error =
false;
ProcessBackendPipe(P4::ReferenceMap *refMap, P4::TypeMap *typeMap, IR::BFN::Pipe *rv, DeclarationConversions &converted, StatefulSelectors ss, ParamBinding *bindings)
Definition extract_maupipe.cpp:1924