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