17#ifndef MIDEND_ELIMINATESWITCH_H_
18#define MIDEND_ELIMINATESWITCH_H_
20#include "frontends/p4/typeChecking/typeChecker.h"
80 std::vector<const IR::Declaration *> toInsert;
83 bool exactNeeded =
false;
86 setName(
"DoEliminateSwitch");
91 auto rv = Transform::init_apply(node);
97 const IR::Node *postorder(IR::SwitchStatement *statement)
override;
98 const IR::Node *postorder(IR::P4Control *control)
override;
99 const IR::Node *postorder(IR::P4Program *program)
override;
105 if (!typeChecking) typeChecking =
new TypeChecking(
nullptr, typeMap);
106 passes.push_back(typeChecking);
109 setName(
"EliminateSwitch");
Definition typeChecker.h:32
Definition eliminateSwitch.h:77
Definition eliminateSwitch.h:102
Definition referenceMap.h:36
Definition ir/pass_manager.h:40
Definition typeChecker.h:55
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24