P4C
The P4 Compiler
Loading...
Searching...
No Matches
parserCallGraph.h
1/*
2 * Copyright 2016 VMware, Inc.
3 * SPDX-FileCopyrightText: 2016 VMware, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef FRONTENDS_P4_PARSERCALLGRAPH_H_
9#define FRONTENDS_P4_PARSERCALLGRAPH_H_
10
11#include "frontends/common/resolveReferences/resolveReferences.h"
12#include "frontends/p4/callGraph.h"
13#include "ir/ir.h"
14
15namespace P4 {
16
17typedef CallGraph<const IR::ParserState *> ParserCallGraph;
18
21class ComputeParserCG : public Inspector, public ResolutionContext {
22 ParserCallGraph *transitions;
23
24 public:
25 explicit ComputeParserCG(/* out */ ParserCallGraph *transitions) : transitions(transitions) {
26 CHECK_NULL(transitions);
27 setName("ComputeParserCG");
28 }
29 bool preorder(const IR::PathExpression *expression) override;
30 void postorder(const IR::SelectExpression *expression) override;
31};
32
33} // namespace P4
34
35#endif /* FRONTENDS_P4_PARSERCALLGRAPH_H_ */
Definition callGraph.h:41
Definition visitor.h:418
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13