P4C
The P4 Compiler
Loading...
Searching...
No Matches
midend.h
1
/*
2
Copyright (C) 2023 Intel Corporation
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing,
11
software distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions
14
and limitations under the License.
15
*/
16
17
#ifndef BACKENDS_TC_MIDEND_H_
18
#define BACKENDS_TC_MIDEND_H_
19
20
#include "backends/ebpf/lower.h"
21
#include "frontends/common/constantFolding.h"
22
#include "frontends/common/options.h"
23
#include "frontends/common/resolveReferences/referenceMap.h"
24
#include "frontends/common/resolveReferences/resolveReferences.h"
25
#include "frontends/p4/evaluator/evaluator.h"
26
#include "frontends/p4/moveDeclarations.h"
27
#include "frontends/p4/simplify.h"
28
#include "frontends/p4/simplifyParsers.h"
29
#include "frontends/p4/strengthReduction.h"
30
#include "frontends/p4/toP4/toP4.h"
31
#include "frontends/p4/typeChecking/typeChecker.h"
32
#include "frontends/p4/typeMap.h"
33
#include "frontends/p4/unusedDeclarations.h"
34
#include "ir/ir.h"
35
#include "midend/actionSynthesis.h"
36
#include "midend/complexComparison.h"
37
#include "midend/convertEnums.h"
38
#include "midend/copyStructures.h"
39
#include "midend/eliminateInvalidHeaders.h"
40
#include "midend/eliminateNewtype.h"
41
#include "midend/eliminateSerEnums.h"
42
#include "midend/eliminateTuples.h"
43
#include "midend/expandEmit.h"
44
#include "midend/local_copyprop.h"
45
#include "midend/midEndLast.h"
46
#include "midend/noMatch.h"
47
#include "midend/parserUnroll.h"
48
#include "midend/removeExits.h"
49
#include "midend/removeLeftSlices.h"
50
#include "midend/removeMiss.h"
51
#include "midend/removeSelectBooleans.h"
52
#include "midend/simplifyKey.h"
53
#include "midend/simplifySelectCases.h"
54
#include "midend/simplifySelectList.h"
55
#include "midend/singleArgumentSelect.h"
56
#include "midend/tableHit.h"
57
#include "midend/validateProperties.h"
58
#include "options.h"
59
60
namespace
TC
{
61
62
class
MidEnd
{
63
public
:
64
std::vector<DebugHook> hooks;
65
P4::ReferenceMap
refMap;
66
P4::TypeMap
typeMap;
67
68
void
addDebugHook(DebugHook hook) { hooks.push_back(hook); }
69
// If p4c is run with option '--listMidendPasses', outStream is used for printing passes names
70
const
IR::ToplevelBlock *run(
TCOptions
&options,
const
IR::P4Program *program,
71
std::ostream *outStream =
nullptr
);
72
};
73
}
// namespace TC
74
75
#endif
/* BACKENDS_TC_MIDEND_H_ */
P4::ReferenceMap
Class used to encode maps from paths to declarations.
Definition
referenceMap.h:66
P4::TypeMap
Definition
typeMap.h:42
TC::MidEnd
Definition
midend.h:62
TC::TCOptions
Definition
options.h:26
TC
This file defines functions for the pass to generate the introspection file.
Definition
backend.cpp:24
backends
tc
midend.h
Generated on Tue Mar 26 2024 for