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_auto_upgrade_debug_info,
19 OPT_disable_auto_upgrade_debug_info,
20 OPT_disable_i2p_p2i_opt,
21 OPT_elide_all_zero_branch_weights,
22 OPT_i2p_p2i_opt,
23 OPT_non_global_value_max_name_size,
24 OPT_pick_merged_source_locations,
25 OPT_preserve_ll_uselistorder,
26 OPT_print_addrspace_name,
27 OPT_print_inst_addrs,
28 OPT_print_inst_debug_locs,
29 OPT_print_prof_data,
30 OPT_safepoint_ir_verifier_print_only,
31 OPT_use_constant_int_for_fixed_length_splat,
32 OPT_use_constant_int_for_scalable_splat,
33 OPT_verify_noalias_scope_decl_dom,
34};
35} // namespace
36
37static llvm::opt::OptTable::Tables optionTables() {
38 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
39 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
40 llvm::opt::RenderSeparate;
41
42#ifdef __GNUC__
43#pragma GCC diagnostic push
44#pragma GCC diagnostic ignored "-Woverlength-strings"
45#endif
46static constexpr char OptionStrTableStorage[] =
47 "\0"
48 "-\0"
49 "--\0"
50 "<input>\0"
51 "<unknown>\0"
52 "-auto-upgrade-debug-info\0"
53 "Autoupgrade debug info\0"
54 "-disable-auto-upgrade-debug-info\0"
55 "false\0"
56 "\0"
57 "-disable-i2p-p2i-opt\0"
58 "-elide-all-zero-branch-weights\0"
59 "\0"
60 "\0"
61 "-i2p-p2i-opt\0"
62 "Enable inttoptr/ptrtoint roundtrip optimization\0"
63 "-non-global-value-max-name-size\0"
64 "Maximum size for the name of non-global values\0"
65 "-pick-merged-source-locations\0"
66 "Preserve line and column number when merging locations\0"
67 "-preserve-ll-uselistorder\0"
68 "Preserve use-list order when writing LLVM assembly\0"
69 "-print-addrspace-name\0"
70 "Print address space names\0"
71 "-print-inst-addrs\0"
72 "Print addresses of instructions when dumping\0"
73 "-print-inst-debug-locs\0"
74 "Pretty print debug locations of instructions when dumping\0"
75 "-print-prof-data\0"
76 "Pretty print perf data (branch weights, etc) when dumping\0"
77 "-safepoint-ir-verifier-print-only\0"
78 "-use-constant-int-for-fixed-length-splat\0"
79 "Use ConstantInt's native fixed-length vector splat support\0"
80 "-use-constant-int-for-scalable-splat\0"
81 "Use ConstantInt's native scalable vector splat support\0"
82 "-verify-noalias-scope-decl-dom\0"
83 "Ensure that llvm.experimental.noalias.scope.decl for identical scopes are not dominating\0"
84 ;
85#ifdef __GNUC__
86#pragma GCC diagnostic pop
87#endif
88
89static constexpr llvm::StringTable
90OptionStrTable = OptionStrTableStorage;
91
92 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
93 0 /* prefixes */,
94 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
95 };
96
97 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
98 {0, 0},
99 };
100
101 static constexpr unsigned OptionSubCommandIDsTable[] = {
102 0 /* subcommands */
103 };
104
105 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
106 {0, 0, 0, 0, 0, 0, 0, 0},
107 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
108 {0, 105, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
109 };
110
111 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
112 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
113 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
114 {24 /* -auto-upgrade-debug-info */, 49, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
115 {72 /* -disable-auto-upgrade-debug-info */, 0, 0, OPT_auto_upgrade_debug_info, 2, 1, llvm::opt::Option::FlagClass},
116 {112 /* -disable-i2p-p2i-opt */, 0, 0, OPT_i2p_p2i_opt, 2, 1, llvm::opt::Option::FlagClass},
117 {133 /* -elide-all-zero-branch-weights */, 164, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
118 {166 /* -i2p-p2i-opt */, 179, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
119 {227 /* -non-global-value-max-name-size */, 259, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
120 {306 /* -pick-merged-source-locations */, 336, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
121 {391 /* -preserve-ll-uselistorder */, 417, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
122 {468 /* -print-addrspace-name */, 490, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
123 {516 /* -print-inst-addrs */, 534, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
124 {579 /* -print-inst-debug-locs */, 602, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
125 {660 /* -print-prof-data */, 677, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
126 {735 /* -safepoint-ir-verifier-print-only */, 164, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
127 {769 /* -use-constant-int-for-fixed-length-splat */, 810, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
128 {869 /* -use-constant-int-for-scalable-splat */, 906, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
129 {961 /* -verify-noalias-scope-decl-dom */, 992, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
130 };
131
132 return {OptionStrTable, OptionPrefixesTable,
133 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
134}
135#undef OPTTABLE_CODE
136#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
137
138
139#ifdef OPTIONS_STRUCT_DECL
140#undef OPTIONS_STRUCT_DECL
141#include "llvm/ADT/ArrayRef.h"
142#include "llvm/ADT/BoolOrDefault.h"
143#include "llvm/ADT/StringRef.h"
144#include "llvm/Support/Allocator.h"
145#include "llvm/Support/LibraryOptionsContext.h"
146
147namespace llvm {
148namespace opt {
149class Arg;
150class LibraryOptionsParser;
151class OptTable;
152} // namespace opt
153} // namespace llvm
154
155namespace llvm {
156struct IROptions {
157 llvm::BoolOrDefault preserve_ll_uselistorder{llvm::BoolOrDefault::Default};
158 bool print_addrspace_name{false};
159 bool print_inst_addrs{false};
160 bool print_inst_debug_locs{false};
161 bool print_prof_data{false};
162 bool auto_upgrade_debug_info{true};
163 bool use_constant_int_for_fixed_length_splat{false};
164 bool use_constant_int_for_scalable_splat{false};
165 bool pick_merged_source_locations{false};
166 int non_global_value_max_name_size{1024};
167 bool i2p_p2i_opt{true};
168 bool elide_all_zero_branch_weights{ElideAllZeroBranchWeightsDefault};
169 bool safepoint_ir_verifier_print_only{false};
170 bool verify_noalias_scope_decl_dom{false};
171
172 static const llvm::opt::OptTable &optTable();
173 /// Sets the member that \p A names, allocating a list from \p Alloc.
174 /// Returns false if the value is invalid.
175 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
176
177private:
178 friend class llvm::cl::LibraryOptionsContext;
179 friend class llvm::opt::LibraryOptionsParser;
180
181 static const IROptions Default;
182};
183} // namespace llvm
184#endif // OPTIONS_STRUCT_DECL
185
186#ifdef OPTIONS_STRUCT_DEFS
187#undef OPTIONS_STRUCT_DEFS
188LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::IROptions llvm::IROptions::Default;
189
190const llvm::opt::OptTable &llvm::IROptions::optTable() {
191 static const llvm::opt::LibraryOptTable T(optionTables());
192 return T;
193}
194
195bool llvm::IROptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
196 switch (A.getOption().getID()) {
197 case OPT_auto_upgrade_debug_info:
198 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", auto_upgrade_debug_info, Alloc);
199 case OPT_elide_all_zero_branch_weights:
200 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", elide_all_zero_branch_weights, Alloc);
201 case OPT_i2p_p2i_opt:
202 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", i2p_p2i_opt, Alloc);
203 case OPT_non_global_value_max_name_size:
204 return llvm::opt::parseArgValue(A.getValue(), non_global_value_max_name_size, Alloc);
205 case OPT_pick_merged_source_locations:
206 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", pick_merged_source_locations, Alloc);
207 case OPT_preserve_ll_uselistorder:
208 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", preserve_ll_uselistorder, Alloc);
209 case OPT_print_addrspace_name:
210 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_addrspace_name, Alloc);
211 case OPT_print_inst_addrs:
212 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_inst_addrs, Alloc);
213 case OPT_print_inst_debug_locs:
214 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_inst_debug_locs, Alloc);
215 case OPT_print_prof_data:
216 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", print_prof_data, Alloc);
217 case OPT_safepoint_ir_verifier_print_only:
218 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", safepoint_ir_verifier_print_only, Alloc);
219 case OPT_use_constant_int_for_fixed_length_splat:
220 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", use_constant_int_for_fixed_length_splat, Alloc);
221 case OPT_use_constant_int_for_scalable_splat:
222 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", use_constant_int_for_scalable_splat, Alloc);
223 case OPT_verify_noalias_scope_decl_dom:
224 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", verify_noalias_scope_decl_dom, Alloc);
225 }
226 llvm_unreachable("option without a member");
227}
228#endif // OPTIONS_STRUCT_DEFS
229/////////
230// ValuesCode
231
232#ifdef OPTTABLE_VALUES_CODE
233static llvm::StringRef getOptionValuesCode(unsigned ID) {
234 switch (ID) {
235 }
236 return {};
237}
238#undef OPTTABLE_VALUES_CODE
239#endif // OPTTABLE_VALUES_CODE
240/////////
241// Groups
242
243#ifdef OPTION
244
245//////////
246// Options
247
248OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
249OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
250OPTION(1, 24 /* -auto-upgrade-debug-info */, anonymous_5, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 49, 0, 0, 0, 0)
251OPTION(1, 72 /* -disable-auto-upgrade-debug-info */, anonymous_14, Flag, INVALID, INVALID, 105, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
252OPTION(1, 112 /* -disable-i2p-p2i-opt */, anonymous_15, Flag, INVALID, INVALID, 105, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
253OPTION(1, 133 /* -elide-all-zero-branch-weights */, anonymous_11, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 164, 0, 0, 0, 0)
254OPTION(1, 166 /* -i2p-p2i-opt */, anonymous_10, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 179, 0, 0, 0, 0)
255OPTION(1, 227 /* -non-global-value-max-name-size */, anonymous_9, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 259, 0, 0, 0, 0)
256OPTION(1, 306 /* -pick-merged-source-locations */, anonymous_8, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 336, 0, 0, 0, 0)
257OPTION(1, 391 /* -preserve-ll-uselistorder */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 417, 0, 0, 0, 0)
258OPTION(1, 468 /* -print-addrspace-name */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 490, 0, 0, 0, 0)
259OPTION(1, 516 /* -print-inst-addrs */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 534, 0, 0, 0, 0)
260OPTION(1, 579 /* -print-inst-debug-locs */, anonymous_3, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 602, 0, 0, 0, 0)
261OPTION(1, 660 /* -print-prof-data */, anonymous_4, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 677, 0, 0, 0, 0)
262OPTION(1, 735 /* -safepoint-ir-verifier-print-only */, anonymous_12, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 164, 0, 0, 0, 0)
263OPTION(1, 769 /* -use-constant-int-for-fixed-length-splat */, anonymous_6, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 810, 0, 0, 0, 0)
264OPTION(1, 869 /* -use-constant-int-for-scalable-splat */, anonymous_7, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 906, 0, 0, 0, 0)
265OPTION(1, 961 /* -verify-noalias-scope-decl-dom */, anonymous_13, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 992, 0, 0, 0, 0)
266#endif // OPTION
267
268#ifdef SIMPLE_ENUM_VALUE_TABLE
269
270struct SimpleEnumValue {
271 const char *Name;
272 unsigned Value;
273};
274
275struct SimpleEnumValueTable {
276 const SimpleEnumValue *Table;
277 unsigned Size;
278};
279static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
280static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
281#endif // SIMPLE_ENUM_VALUE_TABLE
282