55 : typeMap(typeMap), policy(policy) {
57 setName(
"RemoveComplexExpressions");
60 auto rv = Transform::init_apply(node);
66 const IR::PathExpression *createTemporary(
const IR::Expression *expression);
67 const IR::Expression *simplifyExpression(
const IR::Expression *expression,
bool force);
74 const IR::Node *simpleStatement(IR::Statement *statement);
76 const IR::Node *postorder(IR::SelectExpression *expression)
override;
77 const IR::Node *preorder(IR::ParserState *state)
override {
81 const IR::Node *postorder(IR::ParserState *state)
override {
82 state->components.append(assignments);
85 const IR::Node *postorder(IR::MethodCallExpression *expression)
override;
86 const IR::Node *preorder(IR::P4Parser *parser)
override {
90 const IR::Node *postorder(IR::P4Parser *parser)
override {
91 if (newDecls.size() != 0) {
93 newDecls.append(parser->parserLocals);
94 parser->parserLocals = newDecls;
98 const IR::Node *preorder(IR::P4Control *control)
override;
99 const IR::Node *postorder(IR::P4Control *control)
override {
100 if (newDecls.size() != 0) {
102 newDecls.append(control->controlLocals);
103 control->controlLocals = newDecls;
107 const IR::Node *postorder(IR::Statement *statement)
override;
108 const IR::Node *postorder(IR::MethodCallStatement *statement)
override;
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition resolveReferences.h:35
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24