P4C
The P4 Compiler
Loading...
Searching...
No Matches
removeUnusedParameters.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_REMOVEUNUSEDPARAMETERS_H_
9#define MIDEND_REMOVEUNUSEDPARAMETERS_H_
10
11#include "frontends/common/resolveReferences/referenceMap.h"
12#include "ir/ir.h"
13
14namespace P4 {
15
40class RemoveUnusedActionParameters : public Transform {
41 public:
42 explicit RemoveUnusedActionParameters(ReferenceMap *refMap) : refMap(refMap) {
43 CHECK_NULL(refMap);
44 setName("RemoveUnusedActionParameters");
45 }
46
47 const IR::Node *postorder(IR::P4Action *action) override;
48
49 private:
50 ReferenceMap *refMap;
51};
52
53} // namespace P4
54
55#endif /* MIDEND_REMOVEUNUSEDPARAMETERS_H_ */
Definition node.h:53
Class used to encode maps from paths to declarations.
Definition referenceMap.h:67
Definition visitor.h:442
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13