1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Option Parsing Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9/////////
10// Tables
11
12#if defined(OPTTABLE_CODE) || defined(OPTIONS_STRUCT_DEFS)
13namespace {
14enum ID : unsigned {
15 OPT_INVALID = 0,
16 OPT_INPUT,
17 OPT_UNKNOWN,
18 OPT_attributor_enable,
19 OPT_disable_preinline,
20 OPT_dot_cfg_after_color,
21 OPT_dot_cfg_before_color,
22 OPT_dot_cfg_common_color,
23 OPT_dot_cfg_dir,
24 OPT_dropped_variable_stats,
25 OPT_eagerly_invalidate_analyses,
26 OPT_enable_chr,
27 OPT_enable_constraint_elimination,
28 OPT_enable_devirtualize_speculatively,
29 OPT_enable_dfa_jump_thread,
30 OPT_enable_global_analyses,
31 OPT_enable_gvn_hoist,
32 OPT_enable_gvn_sink,
33 OPT_enable_instrumentor,
34 OPT_enable_jump_table_to_switch,
35 OPT_enable_loop_flatten,
36 OPT_enable_loop_versioning_licm,
37 OPT_enable_loopinterchange,
38 OPT_enable_matrix,
39 OPT_enable_merge_functions,
40 OPT_enable_mergeicmps,
41 OPT_enable_ml_inliner,
42 OPT_enable_module_inliner,
43 OPT_enable_newgvn,
44 OPT_enable_npm_pgo_inline_deferral,
45 OPT_enable_partial_inlining,
46 OPT_enable_post_pgo_loop_rotation,
47 OPT_enable_profcheck_in_pipeline,
48 OPT_enable_sampled_instrumentation,
49 OPT_enable_unroll_and_jam,
50 OPT_exec_on_ir_change,
51 OPT_extra_vectorizer_passes,
52 OPT_flattened_profile_used,
53 OPT_force_new_pm_codegen,
54 OPT_hot_cold_split,
55 OPT_instnamer_after_each_pass,
56 OPT_instrument_cold_function_only_path,
57 OPT_ir_dump_directory,
58 OPT_mandatory_inlining_first,
59 OPT_opt_bisect_print_ir_path,
60 OPT_opt_pipeline_trigger_crash,
61 OPT_preinline_threshold,
62 OPT_print_before_changed,
63 OPT_print_changed_dot_path,
64 OPT_print_on_crash_path,
65 OPT_print_on_crash,
66 OPT_print_pass_numbers,
67 OPT_print_pipeline_passes,
68 OPT_verify_analysis_invalidation,
69};
70} // namespace
71
72static llvm::opt::OptTable::Tables optionTables() {
73 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
74 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
75 llvm::opt::RenderSeparate;
76
77#ifdef __GNUC__
78#pragma GCC diagnostic push
79#pragma GCC diagnostic ignored "-Woverlength-strings"
80#endif
81static constexpr char OptionStrTableStorage[] =
82 "\0"
83 "-\0"
84 "--\0"
85 "<input>\0"
86 "<unknown>\0"
87 "-attributor-enable\0"
88 "Enable the attributor inter-procedural deduction pass\0"
89 "<full|light|module|module-light|cgscc|cgscc-light|none>\0"
90 "full,light,module,module-light,cgscc,cgscc-light,none\0"
91 "-disable-preinline\0"
92 "Disable pre-instrumentation inliner\0"
93 "-dot-cfg-after-color\0"
94 "Color for dot-cfg after elements\0"
95 "-dot-cfg-before-color\0"
96 "Color for dot-cfg before elements\0"
97 "-dot-cfg-common-color\0"
98 "Color for dot-cfg common elements\0"
99 "-dot-cfg-dir\0"
100 "Generate dot files into specified directory for changed IRs\0"
101 "-dropped-variable-stats\0"
102 "Dump dropped debug variables stats\0"
103 "-eagerly-invalidate-analyses\0"
104 "Eagerly invalidate more analyses in default pipelines\0"
105 "-enable-chr\0"
106 "Enable control height reduction optimization (CHR)\0"
107 "-enable-constraint-elimination\0"
108 "Enable pass to eliminate conditions based on linear constraints\0"
109 "-enable-devirtualize-speculatively\0"
110 "Enable speculative devirtualization optimization\0"
111 "-enable-dfa-jump-thread\0"
112 "Enable DFA jump threading\0"
113 "-enable-global-analyses\0"
114 "Enable inter-procedural analyses\0"
115 "-enable-gvn-hoist\0"
116 "Enable the GVN hoisting pass (default = off)\0"
117 "-enable-gvn-sink\0"
118 "Enable the GVN sinking pass (default = off)\0"
119 "-enable-instrumentor\0"
120 "Enable the Instrumentor Pass\0"
121 "-enable-jump-table-to-switch\0"
122 "Enable JumpTableToSwitch pass (default = true)\0"
123 "-enable-loop-flatten\0"
124 "Enable the LoopFlatten Pass\0"
125 "-enable-loop-versioning-licm\0"
126 "Enable the experimental Loop Versioning LICM pass\0"
127 "-enable-loopinterchange\0"
128 "Enable the LoopInterchange Pass\0"
129 "-enable-matrix\0"
130 "Enable lowering of the matrix intrinsics\0"
131 "-enable-merge-functions\0"
132 "Enable function merging as part of the optimization pipeline\0"
133 "-enable-mergeicmps\0"
134 "Enable MergeICmps pass in the optimization pipeline\0"
135 "-enable-ml-inliner\0"
136 "Enable ML policy for inliner. Currently trained for -Oz only\0"
137 "<default|development|release>\0"
138 "default,development,release\0"
139 "-enable-module-inliner\0"
140 "Enable module inliner\0"
141 "-enable-newgvn\0"
142 "Run the NewGVN pass\0"
143 "-enable-npm-pgo-inline-deferral\0"
144 "Enable inline deferral during PGO\0"
145 "-enable-partial-inlining\0"
146 "Run Partial inlining pass\0"
147 "-enable-post-pgo-loop-rotation\0"
148 "Run the loop rotation transformation after PGO instrumentation\0"
149 "-enable-profcheck-in-pipeline\0"
150 "Adds profile verification to the pipeline, erroring if profile information is dropped.\0"
151 "-enable-sampled-instrumentation\0"
152 "Enable profile instrumentation sampling (default = off)\0"
153 "-enable-unroll-and-jam\0"
154 "Enable Unroll And Jam Pass\0"
155 "-exec-on-ir-change\0"
156 "exe called with module IR after each pass that changes it\0"
157 "-extra-vectorizer-passes\0"
158 "Run cleanup optimization passes after vectorization\0"
159 "-flattened-profile-used\0"
160 "Indicate the sample profile being used is flattened, i.e., no inline hierarchy exists in the profile\0"
161 "-force-new-pm-codegen\0"
162 "Whether to force the NewPM on/off. Not setting the option will default to what the target prefers\0"
163 "-hot-cold-split\0"
164 "Enable hot-cold splitting pass\0"
165 "-instnamer-after-each-pass\0"
166 "Name unnamed IR values before and after each new-PM pass with fresh generated names across pass callbacks\0"
167 "-instrument-cold-function-only-path\0"
168 "File path for cold function only instrumentation(requires use with --pgo-instrument-cold-function-only)\0"
169 "-ir-dump-directory\0"
170 "If specified, IR printed using the -print-[before|after]{-all} options will be dumped into files in this directory rather than written to stderr\0"
171 "<filename>\0"
172 "-mandatory-inlining-first\0"
173 "Perform mandatory inlinings module-wide, before performing inlining\0"
174 "-opt-bisect-print-ir-path\0"
175 "Print IR to path when opt-bisect-limit is reached\0"
176 "-opt-pipeline-trigger-crash\0"
177 "Trigger crash in optimization pipeline\0"
178 "-preinline-threshold\0"
179 "Control the amount of inlining in pre-instrumentation inliner (default = 75)\0"
180 "-print-before-changed\0"
181 "Print before passes that change them\0"
182 "-print-changed-dot-path\0"
183 "system dot used by change reporters\0"
184 "-print-on-crash-path\0"
185 "Print the last form of the IR before crash to a file\0"
186 "-print-on-crash\0"
187 "Print the last form of the IR before crash (use -print-on-crash-path to dump to a file)\0"
188 "-print-pass-numbers\0"
189 "Print pass names and their ordinals\0"
190 "-print-pipeline-passes\0"
191 "Print string describing the pipeline (best-effort only): =text for a '-passes' compatible string, =tree for a tree-like structure\0"
192 "<text|tree>\0"
193 "text,tree\0"
194 "-verify-analysis-invalidation\0"
195 "Verify that analyses a pass reports as preserved are unchanged (default: on with EXPENSIVE_CHECKS)\0"
196 ;
197#ifdef __GNUC__
198#pragma GCC diagnostic pop
199#endif
200
201static constexpr llvm::StringTable
202OptionStrTable = OptionStrTableStorage;
203
204 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
205 0 /* prefixes */,
206 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
207 };
208
209 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
210 {0, 0},
211 };
212
213 static constexpr unsigned OptionSubCommandIDsTable[] = {
214 0 /* subcommands */
215 };
216
217 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
218 {0, 0, 0, 0, 0, 0, 0, 0},
219 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
220 {97, 0, 153, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
221 {1718, 0, 1748, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
222 {3205, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
223 {4057, 0, 4069, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
224 };
225
226 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
227 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
228 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
229 {24 /* -attributor-enable */, 43, 0, 0, 2, 1, llvm::opt::Option::SeparateOrEqClass},
230 {207 /* -disable-preinline */, 226, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
231 {262 /* -dot-cfg-after-color */, 283, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
232 {316 /* -dot-cfg-before-color */, 338, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
233 {372 /* -dot-cfg-common-color */, 394, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
234 {428 /* -dot-cfg-dir */, 441, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
235 {501 /* -dropped-variable-stats */, 525, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
236 {560 /* -eagerly-invalidate-analyses */, 589, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
237 {643 /* -enable-chr */, 655, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
238 {706 /* -enable-constraint-elimination */, 737, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
239 {801 /* -enable-devirtualize-speculatively */, 836, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
240 {885 /* -enable-dfa-jump-thread */, 909, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
241 {935 /* -enable-global-analyses */, 959, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
242 {992 /* -enable-gvn-hoist */, 1010, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
243 {1055 /* -enable-gvn-sink */, 1072, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
244 {1116 /* -enable-instrumentor */, 1137, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
245 {1166 /* -enable-jump-table-to-switch */, 1195, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
246 {1242 /* -enable-loop-flatten */, 1263, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
247 {1291 /* -enable-loop-versioning-licm */, 1320, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
248 {1370 /* -enable-loopinterchange */, 1394, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
249 {1426 /* -enable-matrix */, 1441, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
250 {1482 /* -enable-merge-functions */, 1506, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
251 {1567 /* -enable-mergeicmps */, 1586, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
252 {1638 /* -enable-ml-inliner */, 1657, 0, 0, 3, 1, llvm::opt::Option::SeparateOrEqClass},
253 {1776 /* -enable-module-inliner */, 1799, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
254 {1821 /* -enable-newgvn */, 1836, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
255 {1856 /* -enable-npm-pgo-inline-deferral */, 1888, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
256 {1922 /* -enable-partial-inlining */, 1947, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
257 {1973 /* -enable-post-pgo-loop-rotation */, 2004, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
258 {2067 /* -enable-profcheck-in-pipeline */, 2097, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
259 {2184 /* -enable-sampled-instrumentation */, 2216, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
260 {2272 /* -enable-unroll-and-jam */, 2295, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
261 {2322 /* -exec-on-ir-change */, 2341, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
262 {2399 /* -extra-vectorizer-passes */, 2424, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
263 {2476 /* -flattened-profile-used */, 2500, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
264 {2601 /* -force-new-pm-codegen */, 2623, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
265 {2721 /* -hot-cold-split */, 2737, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
266 {2768 /* -instnamer-after-each-pass */, 2795, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
267 {2901 /* -instrument-cold-function-only-path */, 2937, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
268 {3041 /* -ir-dump-directory */, 3060, 0, 0, 4, 1, llvm::opt::Option::SeparateOrEqClass},
269 {3216 /* -mandatory-inlining-first */, 3242, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
270 {3310 /* -opt-bisect-print-ir-path */, 3336, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
271 {3386 /* -opt-pipeline-trigger-crash */, 3414, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
272 {3453 /* -preinline-threshold */, 3474, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
273 {3551 /* -print-before-changed */, 3573, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
274 {3610 /* -print-changed-dot-path */, 3634, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
275 {3670 /* -print-on-crash-path */, 3691, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
276 {3744 /* -print-on-crash */, 3760, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
277 {3848 /* -print-pass-numbers */, 3868, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
278 {3904 /* -print-pipeline-passes */, 3927, 0, 0, 5, 1, llvm::opt::Option::FlagOrEqClass},
279 {4079 /* -verify-analysis-invalidation */, 4109, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
280 };
281
282 return {OptionStrTable, OptionPrefixesTable,
283 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
284}
285#undef OPTTABLE_CODE
286#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
287
288
289#ifdef OPTIONS_STRUCT_DECL
290#undef OPTIONS_STRUCT_DECL
291#include "llvm/ADT/ArrayRef.h"
292#include "llvm/ADT/BoolOrDefault.h"
293#include "llvm/ADT/StringRef.h"
294#include "llvm/Support/Allocator.h"
295#include "llvm/Support/LibraryOptionsContext.h"
296
297namespace llvm {
298namespace opt {
299class Arg;
300class LibraryOptionsParser;
301class OptTable;
302} // namespace opt
303} // namespace llvm
304
305namespace llvm {
306struct PassesOptions {
307 std::optional<PrintPipelinePassesFormat> print_pipeline_passes{std::nullopt};
308 AttributorRunOption attributor_enable{AttributorRunOption::NONE};
309 bool disable_preinline{false};
310 bool eagerly_invalidate_analyses{true};
311 bool enable_chr{true};
312 bool enable_constraint_elimination{true};
313 bool enable_devirtualize_speculatively{false};
314 bool enable_dfa_jump_thread{true};
315 bool enable_global_analyses{true};
316 bool enable_gvn_hoist{false};
317 bool enable_gvn_sink{false};
318 bool enable_instrumentor{false};
319 bool enable_jump_table_to_switch{true};
320 bool enable_loop_flatten{false};
321 bool enable_loop_versioning_licm{false};
322 bool enable_loopinterchange{true};
323 bool enable_matrix{false};
324 bool enable_merge_functions{false};
325 bool enable_mergeicmps{true};
326 InliningAdvisorMode enable_ml_inliner{InliningAdvisorMode::Default};
327 bool enable_module_inliner{false};
328 bool enable_newgvn{false};
329 bool enable_npm_pgo_inline_deferral{true};
330 bool enable_partial_inlining{false};
331 bool enable_post_pgo_loop_rotation{true};
332 bool enable_sampled_instrumentation{false};
333 bool enable_unroll_and_jam{false};
334 bool extra_vectorizer_passes{false};
335 bool flattened_profile_used{false};
336 bool hot_cold_split{false};
337 StringRef instrument_cold_function_only_path{};
338 bool mandatory_inlining_first{false};
339 bool opt_pipeline_trigger_crash{false};
340 int preinline_threshold{75};
341 bool enable_profcheck_in_pipeline{false};
342 llvm::BoolOrDefault force_new_pm_codegen{llvm::BoolOrDefault::Default};
343 StringRef dot_cfg_after_color{"forestgreen"};
344 StringRef dot_cfg_before_color{"red"};
345 StringRef dot_cfg_common_color{"black"};
346 StringRef dot_cfg_dir{"./"};
347 bool dropped_variable_stats{false};
348 StringRef exec_on_ir_change{};
349 bool instnamer_after_each_pass{false};
350 StringRef ir_dump_directory{};
351 StringRef opt_bisect_print_ir_path{};
352 bool print_before_changed{false};
353 StringRef print_changed_dot_path{"dot"};
354 bool print_on_crash{false};
355 StringRef print_on_crash_path{};
356 bool print_pass_numbers{false};
357 llvm::BoolOrDefault verify_analysis_invalidation{llvm::BoolOrDefault::Default};
358
359 static constexpr bool PerContext = true;
360 static const llvm::opt::OptTable &optTable();
361 /// Sets the member that \p A names, allocating a list from \p Alloc.
362 /// Returns false if the value is invalid.
363 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
364
365private:
366 friend class llvm::cl::LibraryOptionsContext;
367 friend class llvm::opt::LibraryOptionsParser;
368
369 static PassesOptions Global;
370 static const PassesOptions Default;
371};
372} // namespace llvm
373#endif // OPTIONS_STRUCT_DECL
374
375#ifdef OPTIONS_STRUCT_DEFS
376#undef OPTIONS_STRUCT_DEFS
377llvm::PassesOptions llvm::PassesOptions::Global;
378LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::PassesOptions llvm::PassesOptions::Default;
379
380const llvm::opt::OptTable &llvm::PassesOptions::optTable() {
381 static const llvm::opt::LibraryOptTable T(optionTables());
382 return T;
383}
384
385bool llvm::PassesOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
386 switch (A.getOption().getID()) {
387 case OPT_attributor_enable:
388 return llvm::opt::parseArgValue(A.getValue(), attributor_enable, Alloc, [](llvm::StringRef V, auto &X) {
389 if (V == "full") {
390 X = AttributorRunOption::FULL;
391 return true;
392 }
393 if (V == "light") {
394 X = AttributorRunOption::LIGHT;
395 return true;
396 }
397 if (V == "module") {
398 X = AttributorRunOption::MODULE;
399 return true;
400 }
401 if (V == "module-light") {
402 X = AttributorRunOption::MODULE_LIGHT;
403 return true;
404 }
405 if (V == "cgscc") {
406 X = AttributorRunOption::CGSCC;
407 return true;
408 }
409 if (V == "cgscc-light") {
410 X = AttributorRunOption::CGSCC_LIGHT;
411 return true;
412 }
413 if (V == "none") {
414 X = AttributorRunOption::NONE;
415 return true;
416 }
417 return false;
418 });
419 case OPT_disable_preinline:
420 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", disable_preinline, Alloc);
421 case OPT_dot_cfg_after_color:
422 return llvm::opt::parseArgValue(A.getValue(), dot_cfg_after_color, Alloc);
423 case OPT_dot_cfg_before_color:
424 return llvm::opt::parseArgValue(A.getValue(), dot_cfg_before_color, Alloc);
425 case OPT_dot_cfg_common_color:
426 return llvm::opt::parseArgValue(A.getValue(), dot_cfg_common_color, Alloc);
427 case OPT_dot_cfg_dir:
428 return llvm::opt::parseArgValue(A.getValue(), dot_cfg_dir, Alloc);
429 case OPT_dropped_variable_stats:
430 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", dropped_variable_stats, Alloc);
431 case OPT_eagerly_invalidate_analyses:
432 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", eagerly_invalidate_analyses, Alloc);
433 case OPT_enable_chr:
434 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_chr, Alloc);
435 case OPT_enable_constraint_elimination:
436 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_constraint_elimination, Alloc);
437 case OPT_enable_devirtualize_speculatively:
438 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_devirtualize_speculatively, Alloc);
439 case OPT_enable_dfa_jump_thread:
440 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_dfa_jump_thread, Alloc);
441 case OPT_enable_global_analyses:
442 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_global_analyses, Alloc);
443 case OPT_enable_gvn_hoist:
444 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_gvn_hoist, Alloc);
445 case OPT_enable_gvn_sink:
446 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_gvn_sink, Alloc);
447 case OPT_enable_instrumentor:
448 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_instrumentor, Alloc);
449 case OPT_enable_jump_table_to_switch:
450 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_jump_table_to_switch, Alloc);
451 case OPT_enable_loop_flatten:
452 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_loop_flatten, Alloc);
453 case OPT_enable_loop_versioning_licm:
454 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_loop_versioning_licm, Alloc);
455 case OPT_enable_loopinterchange:
456 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_loopinterchange, Alloc);
457 case OPT_enable_matrix:
458 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_matrix, Alloc);
459 case OPT_enable_merge_functions:
460 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_merge_functions, Alloc);
461 case OPT_enable_mergeicmps:
462 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_mergeicmps, Alloc);
463 case OPT_enable_ml_inliner:
464 return llvm::opt::parseArgValue(A.getValue(), enable_ml_inliner, Alloc, [](llvm::StringRef V, auto &X) {
465 if (V == "default") {
466 X = InliningAdvisorMode::Default;
467 return true;
468 }
469 if (V == "development") {
470 X = InliningAdvisorMode::Development;
471 return true;
472 }
473 if (V == "release") {
474 X = InliningAdvisorMode::Release;
475 return true;
476 }
477 return false;
478 });
479 case OPT_enable_module_inliner:
480 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_module_inliner, Alloc);
481 case OPT_enable_newgvn:
482 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_newgvn, Alloc);
483 case OPT_enable_npm_pgo_inline_deferral:
484 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_npm_pgo_inline_deferral, Alloc);
485 case OPT_enable_partial_inlining:
486 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_partial_inlining, Alloc);
487 case OPT_enable_post_pgo_loop_rotation:
488 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_post_pgo_loop_rotation, Alloc);
489 case OPT_enable_profcheck_in_pipeline:
490 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_profcheck_in_pipeline, Alloc);
491 case OPT_enable_sampled_instrumentation:
492 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_sampled_instrumentation, Alloc);
493 case OPT_enable_unroll_and_jam:
494 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_unroll_and_jam, Alloc);
495 case OPT_exec_on_ir_change:
496 return llvm::opt::parseArgValue(A.getValue(), exec_on_ir_change, Alloc);
497 case OPT_extra_vectorizer_passes:
498 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", extra_vectorizer_passes, Alloc);
499 case OPT_flattened_profile_used:
500 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", flattened_profile_used, Alloc);
501 case OPT_force_new_pm_codegen:
502 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", force_new_pm_codegen, Alloc);
503 case OPT_hot_cold_split:
504 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", hot_cold_split, Alloc);
505 case OPT_instnamer_after_each_pass:
506 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", instnamer_after_each_pass, Alloc);
507 case OPT_instrument_cold_function_only_path:
508 return llvm::opt::parseArgValue(A.getValue(), instrument_cold_function_only_path, Alloc);
509 case OPT_ir_dump_directory:
510 return llvm::opt::parseArgValue(A.getValue(), ir_dump_directory, Alloc);
511 case OPT_mandatory_inlining_first:
512 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", mandatory_inlining_first, Alloc);
513 case OPT_opt_bisect_print_ir_path:
514 return llvm::opt::parseArgValue(A.getValue(), opt_bisect_print_ir_path, Alloc);
515 case OPT_opt_pipeline_trigger_crash:
516 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", opt_pipeline_trigger_crash, Alloc);
517 case OPT_preinline_threshold:
518 return llvm::opt::parseArgValue(A.getValue(), preinline_threshold, Alloc);
519 case OPT_print_before_changed:
520 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_before_changed, Alloc);
521 case OPT_print_changed_dot_path:
522 return llvm::opt::parseArgValue(A.getValue(), print_changed_dot_path, Alloc);
523 case OPT_print_on_crash_path:
524 return llvm::opt::parseArgValue(A.getValue(), print_on_crash_path, Alloc);
525 case OPT_print_on_crash:
526 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_on_crash, Alloc);
527 case OPT_print_pass_numbers:
528 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_pass_numbers, Alloc);
529 case OPT_print_pipeline_passes:
530 if (!A.getNumValues()) { print_pipeline_passes = PrintPipelinePassesFormat::Text; return true; }
531 return llvm::opt::parseArgValue(A.getValue(), print_pipeline_passes, Alloc, [](llvm::StringRef V, auto &X) {
532 if (V == "text") {
533 X = PrintPipelinePassesFormat::Text;
534 return true;
535 }
536 if (V == "tree") {
537 X = PrintPipelinePassesFormat::Tree;
538 return true;
539 }
540 return false;
541 });
542 case OPT_verify_analysis_invalidation:
543 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", verify_analysis_invalidation, Alloc);
544 }
545 llvm_unreachable("option without a member");
546}
547#endif // OPTIONS_STRUCT_DEFS
548/////////
549// ValuesCode
550
551#ifdef OPTTABLE_VALUES_CODE
552static llvm::StringRef getOptionValuesCode(unsigned ID) {
553 switch (ID) {
554 }
555 return {};
556}
557#undef OPTTABLE_VALUES_CODE
558#endif // OPTTABLE_VALUES_CODE
559/////////
560// Groups
561
562#ifdef OPTION
563
564//////////
565// Options
566
567OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
568OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
569OPTION(1, 24 /* -attributor-enable */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 43, 0, 97, 153, 0)
570OPTION(1, 207 /* -disable-preinline */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 226, 0, 0, 0, 0)
571OPTION(1, 262 /* -dot-cfg-after-color */, anonymous_36, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 283, 0, 0, 0, 0)
572OPTION(1, 316 /* -dot-cfg-before-color */, anonymous_37, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 338, 0, 0, 0, 0)
573OPTION(1, 372 /* -dot-cfg-common-color */, anonymous_38, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 394, 0, 0, 0, 0)
574OPTION(1, 428 /* -dot-cfg-dir */, anonymous_39, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 441, 0, 0, 0, 0)
575OPTION(1, 501 /* -dropped-variable-stats */, anonymous_40, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 525, 0, 0, 0, 0)
576OPTION(1, 560 /* -eagerly-invalidate-analyses */, anonymous_3, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 589, 0, 0, 0, 0)
577OPTION(1, 643 /* -enable-chr */, anonymous_4, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 655, 0, 0, 0, 0)
578OPTION(1, 706 /* -enable-constraint-elimination */, anonymous_5, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 737, 0, 0, 0, 0)
579OPTION(1, 801 /* -enable-devirtualize-speculatively */, anonymous_6, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 836, 0, 0, 0, 0)
580OPTION(1, 885 /* -enable-dfa-jump-thread */, anonymous_7, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 909, 0, 0, 0, 0)
581OPTION(1, 935 /* -enable-global-analyses */, anonymous_8, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 959, 0, 0, 0, 0)
582OPTION(1, 992 /* -enable-gvn-hoist */, anonymous_9, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1010, 0, 0, 0, 0)
583OPTION(1, 1055 /* -enable-gvn-sink */, anonymous_10, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1072, 0, 0, 0, 0)
584OPTION(1, 1116 /* -enable-instrumentor */, anonymous_11, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1137, 0, 0, 0, 0)
585OPTION(1, 1166 /* -enable-jump-table-to-switch */, anonymous_12, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1195, 0, 0, 0, 0)
586OPTION(1, 1242 /* -enable-loop-flatten */, anonymous_13, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1263, 0, 0, 0, 0)
587OPTION(1, 1291 /* -enable-loop-versioning-licm */, anonymous_14, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1320, 0, 0, 0, 0)
588OPTION(1, 1370 /* -enable-loopinterchange */, anonymous_15, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1394, 0, 0, 0, 0)
589OPTION(1, 1426 /* -enable-matrix */, anonymous_16, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1441, 0, 0, 0, 0)
590OPTION(1, 1482 /* -enable-merge-functions */, anonymous_17, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1506, 0, 0, 0, 0)
591OPTION(1, 1567 /* -enable-mergeicmps */, anonymous_18, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1586, 0, 0, 0, 0)
592OPTION(1, 1638 /* -enable-ml-inliner */, anonymous_19, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1657, 0, 1718, 1748, 0)
593OPTION(1, 1776 /* -enable-module-inliner */, anonymous_20, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1799, 0, 0, 0, 0)
594OPTION(1, 1821 /* -enable-newgvn */, anonymous_21, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1836, 0, 0, 0, 0)
595OPTION(1, 1856 /* -enable-npm-pgo-inline-deferral */, anonymous_22, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1888, 0, 0, 0, 0)
596OPTION(1, 1922 /* -enable-partial-inlining */, anonymous_23, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1947, 0, 0, 0, 0)
597OPTION(1, 1973 /* -enable-post-pgo-loop-rotation */, anonymous_24, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2004, 0, 0, 0, 0)
598OPTION(1, 2067 /* -enable-profcheck-in-pipeline */, anonymous_34, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2097, 0, 0, 0, 0)
599OPTION(1, 2184 /* -enable-sampled-instrumentation */, anonymous_25, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2216, 0, 0, 0, 0)
600OPTION(1, 2272 /* -enable-unroll-and-jam */, anonymous_26, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2295, 0, 0, 0, 0)
601OPTION(1, 2322 /* -exec-on-ir-change */, anonymous_41, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2341, 0, 0, 0, 0)
602OPTION(1, 2399 /* -extra-vectorizer-passes */, anonymous_27, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2424, 0, 0, 0, 0)
603OPTION(1, 2476 /* -flattened-profile-used */, anonymous_28, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2500, 0, 0, 0, 0)
604OPTION(1, 2601 /* -force-new-pm-codegen */, anonymous_35, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2623, 0, 0, 0, 0)
605OPTION(1, 2721 /* -hot-cold-split */, anonymous_29, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2737, 0, 0, 0, 0)
606OPTION(1, 2768 /* -instnamer-after-each-pass */, anonymous_42, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2795, 0, 0, 0, 0)
607OPTION(1, 2901 /* -instrument-cold-function-only-path */, anonymous_30, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2937, 0, 0, 0, 0)
608OPTION(1, 3041 /* -ir-dump-directory */, anonymous_43, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3060, 0, 3205, 0, 0)
609OPTION(1, 3216 /* -mandatory-inlining-first */, anonymous_31, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3242, 0, 0, 0, 0)
610OPTION(1, 3310 /* -opt-bisect-print-ir-path */, anonymous_44, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3336, 0, 0, 0, 0)
611OPTION(1, 3386 /* -opt-pipeline-trigger-crash */, anonymous_32, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3414, 0, 0, 0, 0)
612OPTION(1, 3453 /* -preinline-threshold */, anonymous_33, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3474, 0, 0, 0, 0)
613OPTION(1, 3551 /* -print-before-changed */, anonymous_45, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3573, 0, 0, 0, 0)
614OPTION(1, 3610 /* -print-changed-dot-path */, anonymous_46, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3634, 0, 0, 0, 0)
615OPTION(1, 3670 /* -print-on-crash-path */, anonymous_48, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3691, 0, 0, 0, 0)
616OPTION(1, 3744 /* -print-on-crash */, anonymous_47, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3760, 0, 0, 0, 0)
617OPTION(1, 3848 /* -print-pass-numbers */, anonymous_49, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3868, 0, 0, 0, 0)
618OPTION(1, 3904 /* -print-pipeline-passes */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3927, 0, 4057, 4069, 0)
619OPTION(1, 4079 /* -verify-analysis-invalidation */, anonymous_50, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4109, 0, 0, 0, 0)
620#endif // OPTION
621
622#ifdef SIMPLE_ENUM_VALUE_TABLE
623
624struct SimpleEnumValue {
625 const char *Name;
626 unsigned Value;
627};
628
629struct SimpleEnumValueTable {
630 const SimpleEnumValue *Table;
631 unsigned Size;
632};
633static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
634static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
635#endif // SIMPLE_ENUM_VALUE_TABLE
636