P4C
The P4 Compiler
Loading...
Searching...
No Matches
dpdk/midend.h
1/*
2 * Copyright 2020 Intel Corp.
3 * SPDX-FileCopyrightText: 2020 Intel Corp.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef BACKENDS_DPDK_MIDEND_H_
9#define BACKENDS_DPDK_MIDEND_H_
10
11#include "frontends/common/options.h"
12#include "ir/ir.h"
13#include "midend/convertEnums.h"
14
15namespace P4::DPDK {
16
17class DpdkMidEnd : public PassManager {
18 public:
21 P4::TypeMap typeMap;
22 const IR::ToplevelBlock *toplevel = nullptr;
23 P4::ConvertEnums::EnumMapping enumMap;
24
27 explicit DpdkMidEnd(CompilerOptions &options, std::ostream *outStream = nullptr);
28
29 const IR::ToplevelBlock *process(const IR::P4Program *&program) {
30 program = program->apply(*this);
31 return toplevel;
32 }
33};
34
35} // namespace P4::DPDK
36
37#endif /* BACKENDS_DPDK_MIDEND_H_ */
Definition frontends/common/options.h:31
DpdkMidEnd(CompilerOptions &options, std::ostream *outStream=nullptr)
Definition dpdk/midend.cpp:99
P4::ReferenceMap refMap
These will be accurate when the mid-end completes evaluation.
Definition dpdk/midend.h:20
Class used to encode maps from paths to declarations.
Definition referenceMap.h:67
Definition typeMap.h:32
Definition dpdk/backend.cpp:26