8#ifndef FRONTENDS_P4_REDUNDANTPARSERS_H_
9#define FRONTENDS_P4_REDUNDANTPARSERS_H_
11#include "frontends/common/resolveReferences/resolveReferences.h"
12#include "frontends/p4/typeChecking/typeChecker.h"
13#include "frontends/p4/unusedDeclarations.h"
22 std::set<const IR::P4Parser *> &redundantParsers;
23 bool preorder(
const IR::P4Parser *parser)
override;
26 explicit FindRedundantParsers(std::set<const IR::P4Parser *> &redundantParsers)
27 : redundantParsers(redundantParsers) {}
33class EliminateSubparserCalls :
public Transform,
public ResolutionContext {
34 const std::set<const IR::P4Parser *> &redundantParsers;
36 const IR::Node *postorder(IR::MethodCallStatement *methodCallStmt)
override;
39 EliminateSubparserCalls(
const std::set<const IR::P4Parser *> &redundantParsers,
41 : redundantParsers(redundantParsers), typeMap(typeMap) {}
44class RemoveRedundantParsers :
public PassManager {
45 std::set<const IR::P4Parser *> redundantParsers;
53 setName(
"RemoveRedundantParsers");
Definition redundantParsers.h:33
Definition redundantParsers.h:21
Iterates UnusedDeclarations until convergence.
Definition unusedDeclarations.h:196
Definition unusedDeclarations.h:48
Definition typeChecker.h:55
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13