P4C
The P4 Compiler
Loading...
Searching...
No Matches
backends/bmv2/simple_switch/options.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 BACKENDS_BMV2_SIMPLE_SWITCH_OPTIONS_H_
9
#define BACKENDS_BMV2_SIMPLE_SWITCH_OPTIONS_H_
10
11
#include "backends/bmv2/common/options.h"
12
#include "backends/bmv2/simple_switch/midend.h"
13
14
namespace
P4::BMV2
{
15
16
class
SimpleSwitchOptions :
public
BMV2Options {
17
public
:
18
SimpleSwitchOptions() {
19
registerOption(
20
"--listMidendPasses"
,
nullptr
,
21
[
this
](
const
char
*) {
22
listMidendPasses =
true
;
23
loadIRFromJson
=
false
;
24
SimpleSwitchMidEnd
midEnd(*
this
, outStream);
25
exit(0);
26
return
false
;
27
},
28
"[SimpleSwitch back-end] Lists exact name of all midend passes.\n"
);
29
}
30
};
31
32
using
SimpleSwitchContext =
P4CContextWithOptions<SimpleSwitchOptions>
;
33
34
}
// namespace P4::BMV2
35
36
#endif
/* BACKENDS_BMV2_SIMPLE_SWITCH_OPTIONS_H_ */
P4::BMV2::BMV2Options::loadIRFromJson
bool loadIRFromJson
Read from json.
Definition
backends/bmv2/common/options.h:25
P4::BMV2::SimpleSwitchMidEnd
Definition
bmv2/simple_switch/midend.h:19
P4::P4CContextWithOptions
Definition
parser_options.h:170
P4::BMV2
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
action.cpp:9
backends
bmv2
simple_switch
options.h
Generated by
1.13.2