19#ifndef FRONTENDS_COMMON_OPTIONS_H_
20#define FRONTENDS_COMMON_OPTIONS_H_
24#include "parser_options.h"
26#include "control-plane/p4RuntimeTypes.h"
35 explicit CompilerOptions(std::string_view defaultMessage =
"Compile a P4 program");
39 bool excludeFrontendPasses =
false;
40 bool listFrontendPasses =
false;
43 bool excludeMidendPasses =
false;
44 bool listMidendPasses =
false;
47 bool excludeBackendPasses =
false;
50 std::vector<cstring> passesToExcludeFrontend;
53 std::vector<cstring> passesToExcludeMidend;
56 std::vector<cstring> passesToExcludeBackend;
58 std::filesystem::path dumpJsonFile;
60 bool debugJson =
false;
64 cstring p4RuntimeFile =
nullptr;
67 cstring p4RuntimeEntriesFile =
nullptr;
69 cstring p4RuntimeFiles =
nullptr;
72 cstring p4RuntimeEntriesFiles =
nullptr;
76 std::filesystem::path prettyPrintFile;
82 bool loopsUnrolling =
false;
85 int optimizationLevel = 1;
86 bool optimizeDebug =
false;
87 bool optimizeSize =
false;
89 virtual bool enable_intrinsic_metadata_fix();
Definition frontends/common/options.h:30
bool validateOptions() const override
Definition frontends/common/options.cpp:181
Definition parser_options.h:47
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
P4RuntimeFormat
P4Runtime serialization formats.
Definition p4RuntimeTypes.h:23