P4C
The P4 Compiler
Loading...
Searching...
No Matches
removeLeftSlices.h
1
/*
2
* SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc.
3
* Copyright 2013-present Barefoot Networks, Inc.
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef MIDEND_REMOVELEFTSLICES_H_
9
#define MIDEND_REMOVELEFTSLICES_H_
10
11
#include "frontends/p4/typeChecking/typeChecker.h"
12
#include "ir/ir.h"
13
14
namespace
P4
{
15
26
class
DoRemoveLeftSlices :
public
Transform
{
27
P4::TypeMap
*typeMap;
28
29
public
:
30
explicit
DoRemoveLeftSlices(
P4::TypeMap
*typeMap) : typeMap(typeMap) {
31
CHECK_NULL(typeMap);
32
setName(
"DoRemoveLeftSlices"
);
33
}
34
const
IR::Node
*postorder(IR::AssignmentStatement *stat)
override
;
35
};
36
37
class
RemoveLeftSlices :
public
PassManager {
38
public
:
39
explicit
RemoveLeftSlices(
TypeMap
*typeMap) {
40
passes.push_back(
new
TypeChecking
(
nullptr
, typeMap));
41
passes.push_back(
new
DoRemoveLeftSlices
(typeMap));
42
setName(
"RemoveLeftSlices"
);
43
}
44
};
45
46
}
// namespace P4
47
48
#endif
/* MIDEND_REMOVELEFTSLICES_H_ */
P4::DoRemoveLeftSlices
Definition
removeLeftSlices.h:26
P4::IR::Node
Definition
node.h:44
P4::Transform
Definition
visitor.h:433
P4::TypeChecking
Definition
typeChecker.h:46
P4::TypeMap
Definition
typeMap.h:32
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:13
midend
removeLeftSlices.h
Generated by
1.13.2