22class CompilerOptions :
public ParserOptions {
27 explicit CompilerOptions(std::string_view defaultMessage =
"Compile a P4 program");
31 bool excludeFrontendPasses =
false;
32 bool listFrontendPasses =
false;
35 bool excludeMidendPasses =
false;
36 bool listMidendPasses =
false;
39 bool excludeBackendPasses =
false;
42 std::vector<cstring> passesToExcludeFrontend;
45 std::vector<cstring> passesToExcludeMidend;
48 std::vector<cstring> passesToExcludeBackend;
50 std::filesystem::path dumpJsonFile;
52 bool debugJson =
false;
56 cstring p4RuntimeFile =
nullptr;
59 cstring p4RuntimeEntriesFile =
nullptr;
61 cstring p4RuntimeFiles =
nullptr;
64 cstring p4RuntimeEntriesFiles =
nullptr;
68 std::filesystem::path prettyPrintFile;
74 bool loopsUnrolling =
false;
78 std::set<cstring> selectedMetrics;
81 int optimizationLevel = 1;
82 bool optimizeDebug =
false;
83 bool optimizeSize =
false;
85 virtual bool enable_intrinsic_metadata_fix();
91 if (p4RuntimeFile.isNullOrEmpty() && p4RuntimeFiles.isNullOrEmpty() &&
92 p4RuntimeEntriesFile.isNullOrEmpty() && p4RuntimeEntriesFiles.isNullOrEmpty()) {
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13