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