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_riscv_br_merging_base_cost,
19 OPT_riscv_br_merging_likely_bias,
20 OPT_riscv_br_merging_unlikely_bias,
21 OPT_riscv_constant_pool_for_large_ints,
22 OPT_riscv_cost_per_use,
23 OPT_riscv_enable_cfi_instr_inserter,
24 OPT_riscv_enable_copy_propagation,
25 OPT_riscv_enable_copyelim,
26 OPT_riscv_enable_dead_defs,
27 OPT_riscv_enable_global_merge,
28 OPT_riscv_enable_loop_data_prefetch,
29 OPT_riscv_enable_machine_combiner,
30 OPT_riscv_enable_sink_fold,
31 OPT_riscv_force_machine_combiner_strategy,
32 OPT_riscv_frm_insert_opt,
33 OPT_riscv_insert_vsetvli_whole_vector_register_move_valid_vtype,
34 OPT_riscv_landing_pad_label,
35 OPT_riscv_load_store_scan_limit,
36 OPT_riscv_lower_ext_max_web_size,
37 OPT_riscv_lower_form_vw_w_with_splat,
38 OPT_riscv_lower_fp_repeated_divisors,
39 OPT_riscv_lower_fpimm_cost,
40 OPT_riscv_max_build_ints_cost,
41 OPT_riscv_min_jump_table_entries,
42 OPT_riscv_mips_ccmov,
43 OPT_riscv_mips_load_store_pairs,
44 OPT_riscv_or_like_select,
45 OPT_riscv_outliner_regsave,
46 OPT_riscv_prefer_whole_register_move,
47 OPT_riscv_reassoc_shl_addi_add,
48 OPT_riscv_regalloc_hints,
49 OPT_riscv_sched_load_latency,
50 OPT_riscv_sched_mispredict_penalty,
51 OPT_riscv_select_opt,
52 OPT_riscv_sextw_removal,
53 OPT_riscv_strip_w_suffix,
54 OPT_riscv_use_aa,
55 OPT_riscv_use_rematerializable_movimm,
56 OPT_riscv_v_min_trip_count,
57 OPT_riscv_v_register_bit_width_lmul,
58 OPT_riscv_v_slp_max_vf,
59 OPT_riscv_v_vector_bits_max,
60 OPT_riscv_v_vector_bits_min,
61 OPT_riscv_vector_mask_mutation,
62 OPT_riscv_zilsd_max_reschedule_distance,
63 OPT_riscv_zilsd_opt,
64};
65} // namespace
66
67static llvm::opt::OptTable::Tables optionTables() {
68 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
69 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
70 llvm::opt::RenderSeparate;
71
72#ifdef __GNUC__
73#pragma GCC diagnostic push
74#pragma GCC diagnostic ignored "-Woverlength-strings"
75#endif
76static constexpr char OptionStrTableStorage[] =
77 "\0"
78 "-\0"
79 "--\0"
80 "<input>\0"
81 "<unknown>\0"
82 "-riscv-br-merging-base-cost\0"
83 "Sets the cost threshold for when multiple conditionals will be merged into one branch versus be split in multiple branches. Merging conditionals saves branches at the cost of additional instructions. This value sets the instruction cost limit, below which conditionals will be merged, and above which conditionals will be split. Set to -1 to never merge branches\0"
84 "-riscv-br-merging-likely-bias\0"
85 "Increases 'riscv-br-merging-base-cost' in cases that it is likely that all conditionals will be executed. For example for merging the conditionals (a == b && c > d), if its known that a == b is likely, then it is likely that if the conditionals are split both sides will be executed, so it may be desirable to increase the instruction cost threshold. Set to -1 to never merge likely branches\0"
86 "-riscv-br-merging-unlikely-bias\0"
87 "Decreases 'riscv-br-merging-base-cost' in cases that it is unlikely that all conditionals will be executed. For example for merging the conditionals (a == b && c > d), if its known that a == b is unlikely, then it is unlikely that if the conditionals are split both sides will be executed, so it may be desirable to decrease the instruction cost threshold. Set to -1 to never merge unlikely branches\0"
88 "-riscv-constant-pool-for-large-ints\0"
89 "Enable using constant pool for large integers\0"
90 "-riscv-cost-per-use\0"
91 "\0"
92 "\0"
93 "-riscv-enable-cfi-instr-inserter\0"
94 "Enable CFI Instruction Inserter for RISC-V\0"
95 "-riscv-enable-copy-propagation\0"
96 "Enable the copy propagation with RISC-V copy instr\0"
97 "-riscv-enable-copyelim\0"
98 "Enable the redundant copy elimination pass\0"
99 "-riscv-enable-dead-defs\0"
100 "Enable the pass that removes dead definitions and replaces stores to them with stores to x0\0"
101 "-riscv-enable-global-merge\0"
102 "Enable the global merge pass\0"
103 "-riscv-enable-loop-data-prefetch\0"
104 "Enable the loop data prefetch pass\0"
105 "-riscv-enable-machine-combiner\0"
106 "Enable the machine combiner pass\0"
107 "-riscv-enable-sink-fold\0"
108 "Enable sinking and folding of instruction copies\0"
109 "-riscv-force-machine-combiner-strategy\0"
110 "Force machine combiner to use a specific strategy for machine trace metrics evaluation\0"
111 "<local|min-instr>\0"
112 "local,min-instr\0"
113 "-riscv-frm-insert-opt\0"
114 "Enable optimized frm insertion\0"
115 "-riscv-insert-vsetvli-whole-vector-register-move-valid-vtype\0"
116 "Insert vsetvlis before vmvNr.vs to ensure vtype is valid and vill is cleared\0"
117 "-riscv-landing-pad-label\0"
118 "Use preferred fixed label for all labels\0"
119 "-riscv-load-store-scan-limit\0"
120 "-riscv-lower-ext-max-web-size\0"
121 "Give the maximum size (in number of nodes) of the web of instructions that we will consider for VW expansion\0"
122 "-riscv-lower-form-vw-w-with-splat\0"
123 "Allow the formation of VW_W operations (e.g., VWADD_W) with splat constants\0"
124 "-riscv-lower-fp-repeated-divisors\0"
125 "Set the minimum number of repetitions of a divisor to allow transformation to multiplications by the reciprocal\0"
126 "-riscv-lower-fpimm-cost\0"
127 "Give the maximum number of instructions that we will use for creating a floating-point immediate value\0"
128 "-riscv-max-build-ints-cost\0"
129 "The maximum cost used for building integers\0"
130 "-riscv-min-jump-table-entries\0"
131 "Set minimum number of entries to use a jump table on RISCV\0"
132 "-riscv-mips-ccmov\0"
133 "Use 'mips.ccmov' instruction\0"
134 "-riscv-mips-load-store-pairs\0"
135 "Enable the load/store pair optimization pass\0"
136 "-riscv-or-like-select\0"
137 "-riscv-outliner-regsave\0"
138 "Enable RegSave strategy in machine outliner (save X5 to a temporary register when X5 is live across outlined calls)\0"
139 "-riscv-prefer-whole-register-move\0"
140 "Prefer whole register move for vector registers\0"
141 "-riscv-reassoc-shl-addi-add\0"
142 "Swap add and addi in cases where the add may be combined with a shift\0"
143 "-riscv-regalloc-hints\0"
144 "Enable two address hints for register allocation\0"
145 "-riscv-sched-load-latency\0"
146 "Override the load latency (in cycles) in the scheduler model. A non-negative value overrides the target default\0"
147 "-riscv-sched-mispredict-penalty\0"
148 "Override the mispredict penalty (in cycles) in the scheduler model. A non-negative value overrides the target default\0"
149 "-riscv-select-opt\0"
150 "Enable select to branch optimizations\0"
151 "-riscv-sextw-removal\0"
152 "Enable removal of sext.w\0"
153 "-riscv-strip-w-suffix\0"
154 "Enable strip W suffix\0"
155 "-riscv-use-aa\0"
156 "Enable the use of AA during codegen\0"
157 "-riscv-use-rematerializable-movimm\0"
158 "Use a rematerializable pseudoinstruction for 2 instruction constant materialization\0"
159 "-riscv-v-min-trip-count\0"
160 "Set the lower bound of a trip count to decide on vectorization while tail-folding\0"
161 "-riscv-v-register-bit-width-lmul\0"
162 "The LMUL to use for getRegisterBitWidth queries. Affects LMUL used by autovectorized code. Fractional LMULs are not supported\0"
163 "-riscv-v-slp-max-vf\0"
164 "Overrides result used for getMaximumVF query which is used exclusively by SLP vectorizer\0"
165 "-riscv-v-vector-bits-max\0"
166 "Assume V extension vector registers are at most this big, with zero meaning no maximum size is assumed\0"
167 "-riscv-v-vector-bits-min\0"
168 "Assume V extension vector registers are at least this big, with zero meaning no minimum size is assumed. A value of -1 means use Zvl*b extension. This is primarily used to enable autovectorization with fixed width vectors\0"
169 "-riscv-vector-mask-mutation\0"
170 "Enable the vector mask scheduling mutation\0"
171 "-riscv-zilsd-max-reschedule-distance\0"
172 "Maximum distance for rescheduling load/store instructions\0"
173 "-riscv-zilsd-opt\0"
174 "Enable Zilsd load/store optimization\0"
175 ;
176#ifdef __GNUC__
177#pragma GCC diagnostic pop
178#endif
179
180static constexpr llvm::StringTable
181OptionStrTable = OptionStrTableStorage;
182
183 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
184 0 /* prefixes */,
185 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
186 };
187
188 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
189 {0, 0},
190 };
191
192 static constexpr unsigned OptionSubCommandIDsTable[] = {
193 0 /* subcommands */
194 };
195
196 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
197 {0, 0, 0, 0, 0, 0, 0, 0},
198 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
199 {2100, 0, 2118, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
200 };
201
202 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
203 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
204 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
205 {24 /* -riscv-br-merging-base-cost */, 52, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
206 {415 /* -riscv-br-merging-likely-bias */, 445, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
207 {837 /* -riscv-br-merging-unlikely-bias */, 869, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
208 {1269 /* -riscv-constant-pool-for-large-ints */, 1305, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
209 {1351 /* -riscv-cost-per-use */, 1371, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
210 {1373 /* -riscv-enable-cfi-instr-inserter */, 1406, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
211 {1449 /* -riscv-enable-copy-propagation */, 1480, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
212 {1531 /* -riscv-enable-copyelim */, 1554, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
213 {1597 /* -riscv-enable-dead-defs */, 1621, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
214 {1713 /* -riscv-enable-global-merge */, 1740, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
215 {1769 /* -riscv-enable-loop-data-prefetch */, 1802, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
216 {1837 /* -riscv-enable-machine-combiner */, 1868, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
217 {1901 /* -riscv-enable-sink-fold */, 1925, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
218 {1974 /* -riscv-force-machine-combiner-strategy */, 2013, 0, 0, 2, 1, llvm::opt::Option::SeparateOrEqClass},
219 {2134 /* -riscv-frm-insert-opt */, 2156, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
220 {2187 /* -riscv-insert-vsetvli-whole-vector-register-move-valid-vtype */, 2248, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
221 {2325 /* -riscv-landing-pad-label */, 2350, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
222 {2391 /* -riscv-load-store-scan-limit */, 1371, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
223 {2420 /* -riscv-lower-ext-max-web-size */, 2450, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
224 {2559 /* -riscv-lower-form-vw-w-with-splat */, 2593, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
225 {2669 /* -riscv-lower-fp-repeated-divisors */, 2703, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
226 {2815 /* -riscv-lower-fpimm-cost */, 2839, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
227 {2942 /* -riscv-max-build-ints-cost */, 2969, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
228 {3013 /* -riscv-min-jump-table-entries */, 3043, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
229 {3102 /* -riscv-mips-ccmov */, 3120, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
230 {3149 /* -riscv-mips-load-store-pairs */, 3178, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
231 {3223 /* -riscv-or-like-select */, 1371, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
232 {3245 /* -riscv-outliner-regsave */, 3269, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
233 {3385 /* -riscv-prefer-whole-register-move */, 3419, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
234 {3467 /* -riscv-reassoc-shl-addi-add */, 3495, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
235 {3565 /* -riscv-regalloc-hints */, 3587, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
236 {3636 /* -riscv-sched-load-latency */, 3662, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
237 {3774 /* -riscv-sched-mispredict-penalty */, 3806, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
238 {3924 /* -riscv-select-opt */, 3942, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
239 {3980 /* -riscv-sextw-removal */, 4001, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
240 {4026 /* -riscv-strip-w-suffix */, 4048, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
241 {4070 /* -riscv-use-aa */, 4084, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
242 {4120 /* -riscv-use-rematerializable-movimm */, 4155, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
243 {4239 /* -riscv-v-min-trip-count */, 4263, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
244 {4345 /* -riscv-v-register-bit-width-lmul */, 4378, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
245 {4504 /* -riscv-v-slp-max-vf */, 4524, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
246 {4613 /* -riscv-v-vector-bits-max */, 4638, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
247 {4741 /* -riscv-v-vector-bits-min */, 4766, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
248 {4988 /* -riscv-vector-mask-mutation */, 5016, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
249 {5059 /* -riscv-zilsd-max-reschedule-distance */, 5096, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
250 {5154 /* -riscv-zilsd-opt */, 5171, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
251 };
252
253 return {OptionStrTable, OptionPrefixesTable,
254 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
255}
256#undef OPTTABLE_CODE
257#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
258
259
260#ifdef OPTIONS_STRUCT_DECL
261#undef OPTIONS_STRUCT_DECL
262#include "llvm/ADT/ArrayRef.h"
263#include "llvm/ADT/BoolOrDefault.h"
264#include "llvm/ADT/StringRef.h"
265#include "llvm/Support/Allocator.h"
266#include "llvm/Support/LibraryOptionsContext.h"
267
268namespace llvm {
269namespace opt {
270class Arg;
271class LibraryOptionsParser;
272class OptTable;
273} // namespace opt
274} // namespace llvm
275
276namespace llvm {
277struct RISCVOptions {
278 bool use_rematerializable_movimm{false};
279 std::optional<int> br_merging_base_cost{std::nullopt};
280 int br_merging_likely_bias{0};
281 int br_merging_unlikely_bias{-1};
282 unsigned lower_ext_max_web_size{18};
283 bool lower_form_vw_w_with_splat{false};
284 unsigned lower_fp_repeated_divisors{2};
285 int lower_fpimm_cost{3};
286 bool reassoc_shl_addi_add{true};
287 std::optional<uint32_t> landing_pad_label{std::nullopt};
288 bool frm_insert_opt{true};
289 bool insert_vsetvli_whole_vector_register_move_valid_vtype{true};
290 std::optional<MachineTraceStrategy> force_machine_combiner_strategy{std::nullopt};
291 bool outliner_regsave{true};
292 bool prefer_whole_register_move{false};
293 unsigned load_store_scan_limit{128};
294 bool sextw_removal{true};
295 bool strip_w_suffix{true};
296 bool cost_per_use{true};
297 bool regalloc_hints{true};
298 bool constant_pool_for_large_ints{true};
299 std::optional<unsigned> max_build_ints_cost{std::nullopt};
300 std::optional<unsigned> min_jump_table_entries{std::nullopt};
301 bool mips_ccmov{true};
302 bool mips_load_store_pairs{false};
303 std::optional<unsigned> sched_load_latency{std::nullopt};
304 std::optional<unsigned> sched_mispredict_penalty{std::nullopt};
305 bool use_aa{true};
306 bool enable_cfi_instr_inserter{false};
307 bool enable_copy_propagation{true};
308 bool enable_copyelim{true};
309 bool enable_dead_defs{true};
310 llvm::BoolOrDefault enable_global_merge{llvm::BoolOrDefault::Default};
311 bool enable_loop_data_prefetch{true};
312 bool enable_machine_combiner{true};
313 bool enable_sink_fold{true};
314 bool select_opt{true};
315 std::optional<unsigned> v_vector_bits_max{std::nullopt};
316 std::optional<int> v_vector_bits_min{std::nullopt};
317 bool vector_mask_mutation{true};
318 bool or_like_select{true};
319 unsigned v_min_trip_count{5};
320 unsigned v_register_bit_width_lmul{2};
321 std::optional<unsigned> v_slp_max_vf{std::nullopt};
322 unsigned zilsd_max_reschedule_distance{10};
323 bool zilsd_opt{true};
324
325 static const llvm::opt::OptTable &optTable();
326 /// Sets the member that \p A names, allocating a list from \p Alloc.
327 /// Returns false if the value is invalid.
328 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
329
330private:
331 friend class llvm::cl::LibraryOptionsContext;
332 friend class llvm::opt::LibraryOptionsParser;
333
334 static const RISCVOptions Default;
335};
336} // namespace llvm
337#endif // OPTIONS_STRUCT_DECL
338
339#ifdef OPTIONS_STRUCT_DEFS
340#undef OPTIONS_STRUCT_DEFS
341LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::RISCVOptions llvm::RISCVOptions::Default;
342
343const llvm::opt::OptTable &llvm::RISCVOptions::optTable() {
344 static const llvm::opt::LibraryOptTable T(optionTables());
345 return T;
346}
347
348bool llvm::RISCVOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
349 switch (A.getOption().getID()) {
350 case OPT_riscv_br_merging_base_cost:
351 return llvm::opt::parseArgValue(A.getValue(), br_merging_base_cost, Alloc);
352 case OPT_riscv_br_merging_likely_bias:
353 return llvm::opt::parseArgValue(A.getValue(), br_merging_likely_bias, Alloc);
354 case OPT_riscv_br_merging_unlikely_bias:
355 return llvm::opt::parseArgValue(A.getValue(), br_merging_unlikely_bias, Alloc);
356 case OPT_riscv_constant_pool_for_large_ints:
357 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", constant_pool_for_large_ints, Alloc);
358 case OPT_riscv_cost_per_use:
359 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", cost_per_use, Alloc);
360 case OPT_riscv_enable_cfi_instr_inserter:
361 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_cfi_instr_inserter, Alloc);
362 case OPT_riscv_enable_copy_propagation:
363 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_copy_propagation, Alloc);
364 case OPT_riscv_enable_copyelim:
365 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_copyelim, Alloc);
366 case OPT_riscv_enable_dead_defs:
367 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_dead_defs, Alloc);
368 case OPT_riscv_enable_global_merge:
369 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_global_merge, Alloc);
370 case OPT_riscv_enable_loop_data_prefetch:
371 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_loop_data_prefetch, Alloc);
372 case OPT_riscv_enable_machine_combiner:
373 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_machine_combiner, Alloc);
374 case OPT_riscv_enable_sink_fold:
375 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_sink_fold, Alloc);
376 case OPT_riscv_force_machine_combiner_strategy:
377 return llvm::opt::parseArgValue(A.getValue(), force_machine_combiner_strategy, Alloc, [](llvm::StringRef V, auto &X) {
378 if (V == "local") {
379 X = MachineTraceStrategy::TS_Local;
380 return true;
381 }
382 if (V == "min-instr") {
383 X = MachineTraceStrategy::TS_MinInstrCount;
384 return true;
385 }
386 return false;
387 });
388 case OPT_riscv_frm_insert_opt:
389 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", frm_insert_opt, Alloc);
390 case OPT_riscv_insert_vsetvli_whole_vector_register_move_valid_vtype:
391 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", insert_vsetvli_whole_vector_register_move_valid_vtype, Alloc);
392 case OPT_riscv_landing_pad_label:
393 return llvm::opt::parseArgValue(A.getValue(), landing_pad_label, Alloc);
394 case OPT_riscv_load_store_scan_limit:
395 return llvm::opt::parseArgValue(A.getValue(), load_store_scan_limit, Alloc);
396 case OPT_riscv_lower_ext_max_web_size:
397 return llvm::opt::parseArgValue(A.getValue(), lower_ext_max_web_size, Alloc);
398 case OPT_riscv_lower_form_vw_w_with_splat:
399 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", lower_form_vw_w_with_splat, Alloc);
400 case OPT_riscv_lower_fp_repeated_divisors:
401 return llvm::opt::parseArgValue(A.getValue(), lower_fp_repeated_divisors, Alloc);
402 case OPT_riscv_lower_fpimm_cost:
403 return llvm::opt::parseArgValue(A.getValue(), lower_fpimm_cost, Alloc);
404 case OPT_riscv_max_build_ints_cost:
405 return llvm::opt::parseArgValue(A.getValue(), max_build_ints_cost, Alloc);
406 case OPT_riscv_min_jump_table_entries:
407 return llvm::opt::parseArgValue(A.getValue(), min_jump_table_entries, Alloc);
408 case OPT_riscv_mips_ccmov:
409 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", mips_ccmov, Alloc);
410 case OPT_riscv_mips_load_store_pairs:
411 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", mips_load_store_pairs, Alloc);
412 case OPT_riscv_or_like_select:
413 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", or_like_select, Alloc);
414 case OPT_riscv_outliner_regsave:
415 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", outliner_regsave, Alloc);
416 case OPT_riscv_prefer_whole_register_move:
417 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", prefer_whole_register_move, Alloc);
418 case OPT_riscv_reassoc_shl_addi_add:
419 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", reassoc_shl_addi_add, Alloc);
420 case OPT_riscv_regalloc_hints:
421 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", regalloc_hints, Alloc);
422 case OPT_riscv_sched_load_latency:
423 return llvm::opt::parseArgValue(A.getValue(), sched_load_latency, Alloc);
424 case OPT_riscv_sched_mispredict_penalty:
425 return llvm::opt::parseArgValue(A.getValue(), sched_mispredict_penalty, Alloc);
426 case OPT_riscv_select_opt:
427 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", select_opt, Alloc);
428 case OPT_riscv_sextw_removal:
429 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", sextw_removal, Alloc);
430 case OPT_riscv_strip_w_suffix:
431 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", strip_w_suffix, Alloc);
432 case OPT_riscv_use_aa:
433 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", use_aa, Alloc);
434 case OPT_riscv_use_rematerializable_movimm:
435 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", use_rematerializable_movimm, Alloc);
436 case OPT_riscv_v_min_trip_count:
437 return llvm::opt::parseArgValue(A.getValue(), v_min_trip_count, Alloc);
438 case OPT_riscv_v_register_bit_width_lmul:
439 return llvm::opt::parseArgValue(A.getValue(), v_register_bit_width_lmul, Alloc);
440 case OPT_riscv_v_slp_max_vf:
441 return llvm::opt::parseArgValue(A.getValue(), v_slp_max_vf, Alloc);
442 case OPT_riscv_v_vector_bits_max:
443 return llvm::opt::parseArgValue(A.getValue(), v_vector_bits_max, Alloc);
444 case OPT_riscv_v_vector_bits_min:
445 return llvm::opt::parseArgValue(A.getValue(), v_vector_bits_min, Alloc);
446 case OPT_riscv_vector_mask_mutation:
447 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", vector_mask_mutation, Alloc);
448 case OPT_riscv_zilsd_max_reschedule_distance:
449 return llvm::opt::parseArgValue(A.getValue(), zilsd_max_reschedule_distance, Alloc);
450 case OPT_riscv_zilsd_opt:
451 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", zilsd_opt, Alloc);
452 }
453 llvm_unreachable("option without a member");
454}
455#endif // OPTIONS_STRUCT_DEFS
456/////////
457// ValuesCode
458
459#ifdef OPTTABLE_VALUES_CODE
460static llvm::StringRef getOptionValuesCode(unsigned ID) {
461 switch (ID) {
462 }
463 return {};
464}
465#undef OPTTABLE_VALUES_CODE
466#endif // OPTTABLE_VALUES_CODE
467/////////
468// Groups
469
470#ifdef OPTION
471
472//////////
473// Options
474
475OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
476OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
477OPTION(1, 24 /* -riscv-br-merging-base-cost */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 52, 0, 0, 0, 0)
478OPTION(1, 415 /* -riscv-br-merging-likely-bias */, anonymous_2, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 445, 0, 0, 0, 0)
479OPTION(1, 837 /* -riscv-br-merging-unlikely-bias */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 869, 0, 0, 0, 0)
480OPTION(1, 1269 /* -riscv-constant-pool-for-large-ints */, anonymous_20, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1305, 0, 0, 0, 0)
481OPTION(1, 1351 /* -riscv-cost-per-use */, anonymous_18, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1371, 0, 0, 0, 0)
482OPTION(1, 1373 /* -riscv-enable-cfi-instr-inserter */, anonymous_28, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1406, 0, 0, 0, 0)
483OPTION(1, 1449 /* -riscv-enable-copy-propagation */, anonymous_29, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1480, 0, 0, 0, 0)
484OPTION(1, 1531 /* -riscv-enable-copyelim */, anonymous_30, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1554, 0, 0, 0, 0)
485OPTION(1, 1597 /* -riscv-enable-dead-defs */, anonymous_31, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1621, 0, 0, 0, 0)
486OPTION(1, 1713 /* -riscv-enable-global-merge */, anonymous_32, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1740, 0, 0, 0, 0)
487OPTION(1, 1769 /* -riscv-enable-loop-data-prefetch */, anonymous_33, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1802, 0, 0, 0, 0)
488OPTION(1, 1837 /* -riscv-enable-machine-combiner */, anonymous_34, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1868, 0, 0, 0, 0)
489OPTION(1, 1901 /* -riscv-enable-sink-fold */, anonymous_35, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1925, 0, 0, 0, 0)
490OPTION(1, 1974 /* -riscv-force-machine-combiner-strategy */, anonymous_12, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2013, 0, 2100, 2118, 0)
491OPTION(1, 2134 /* -riscv-frm-insert-opt */, anonymous_10, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2156, 0, 0, 0, 0)
492OPTION(1, 2187 /* -riscv-insert-vsetvli-whole-vector-register-move-valid-vtype */, anonymous_11, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2248, 0, 0, 0, 0)
493OPTION(1, 2325 /* -riscv-landing-pad-label */, anonymous_9, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2350, 0, 0, 0, 0)
494OPTION(1, 2391 /* -riscv-load-store-scan-limit */, anonymous_15, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1371, 0, 0, 0, 0)
495OPTION(1, 2420 /* -riscv-lower-ext-max-web-size */, anonymous_4, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2450, 0, 0, 0, 0)
496OPTION(1, 2559 /* -riscv-lower-form-vw-w-with-splat */, anonymous_5, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2593, 0, 0, 0, 0)
497OPTION(1, 2669 /* -riscv-lower-fp-repeated-divisors */, anonymous_6, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2703, 0, 0, 0, 0)
498OPTION(1, 2815 /* -riscv-lower-fpimm-cost */, anonymous_7, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2839, 0, 0, 0, 0)
499OPTION(1, 2942 /* -riscv-max-build-ints-cost */, anonymous_21, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 2969, 0, 0, 0, 0)
500OPTION(1, 3013 /* -riscv-min-jump-table-entries */, anonymous_22, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3043, 0, 0, 0, 0)
501OPTION(1, 3102 /* -riscv-mips-ccmov */, anonymous_23, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3120, 0, 0, 0, 0)
502OPTION(1, 3149 /* -riscv-mips-load-store-pairs */, anonymous_24, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3178, 0, 0, 0, 0)
503OPTION(1, 3223 /* -riscv-or-like-select */, anonymous_40, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1371, 0, 0, 0, 0)
504OPTION(1, 3245 /* -riscv-outliner-regsave */, anonymous_13, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3269, 0, 0, 0, 0)
505OPTION(1, 3385 /* -riscv-prefer-whole-register-move */, anonymous_14, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3419, 0, 0, 0, 0)
506OPTION(1, 3467 /* -riscv-reassoc-shl-addi-add */, anonymous_8, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3495, 0, 0, 0, 0)
507OPTION(1, 3565 /* -riscv-regalloc-hints */, anonymous_19, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3587, 0, 0, 0, 0)
508OPTION(1, 3636 /* -riscv-sched-load-latency */, anonymous_25, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3662, 0, 0, 0, 0)
509OPTION(1, 3774 /* -riscv-sched-mispredict-penalty */, anonymous_26, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3806, 0, 0, 0, 0)
510OPTION(1, 3924 /* -riscv-select-opt */, anonymous_36, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 3942, 0, 0, 0, 0)
511OPTION(1, 3980 /* -riscv-sextw-removal */, anonymous_16, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4001, 0, 0, 0, 0)
512OPTION(1, 4026 /* -riscv-strip-w-suffix */, anonymous_17, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4048, 0, 0, 0, 0)
513OPTION(1, 4070 /* -riscv-use-aa */, anonymous_27, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4084, 0, 0, 0, 0)
514OPTION(1, 4120 /* -riscv-use-rematerializable-movimm */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4155, 0, 0, 0, 0)
515OPTION(1, 4239 /* -riscv-v-min-trip-count */, anonymous_41, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4263, 0, 0, 0, 0)
516OPTION(1, 4345 /* -riscv-v-register-bit-width-lmul */, anonymous_42, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4378, 0, 0, 0, 0)
517OPTION(1, 4504 /* -riscv-v-slp-max-vf */, anonymous_43, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4524, 0, 0, 0, 0)
518OPTION(1, 4613 /* -riscv-v-vector-bits-max */, anonymous_37, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4638, 0, 0, 0, 0)
519OPTION(1, 4741 /* -riscv-v-vector-bits-min */, anonymous_38, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 4766, 0, 0, 0, 0)
520OPTION(1, 4988 /* -riscv-vector-mask-mutation */, anonymous_39, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 5016, 0, 0, 0, 0)
521OPTION(1, 5059 /* -riscv-zilsd-max-reschedule-distance */, anonymous_44, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 5096, 0, 0, 0, 0)
522OPTION(1, 5154 /* -riscv-zilsd-opt */, anonymous_45, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 5171, 0, 0, 0, 0)
523#endif // OPTION
524
525#ifdef SIMPLE_ENUM_VALUE_TABLE
526
527struct SimpleEnumValue {
528 const char *Name;
529 unsigned Value;
530};
531
532struct SimpleEnumValueTable {
533 const SimpleEnumValue *Table;
534 unsigned Size;
535};
536static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
537static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
538#endif // SIMPLE_ENUM_VALUE_TABLE
539