67 Cloner() { setName(
"Cloner"); }
68 const IR::Node *postorder(IR::EmptyStatement *stat)
override {
72 return new IR::BlockStatement(stat->srcInfo);
74 const IR::Node *postorder(IR::BlockStatement *stat)
override {
78 if (stat->components.empty()) {
81 auto result =
new IR::BlockStatement(
82 stat->srcInfo, {new IR::Annotation(IR::Annotation::hiddenAnnotation, {})});
83 LOG2(
"Cloning " << getOriginal()->
id <<
" into " << result->id);
88 return Transform::postorder(stat);
101 passes.push_back(
new Cloner());
102 if (!typeChecking) typeChecking =
new TypeChecking(&refMap, typeMap);
105 passes.push_back(
new RemoveHidden());
106 setName(
"SimplifyDefUse");
static P4CContext & get()
Definition parser_options.cpp:539
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24