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_codegen_data_generate,
19 OPT_codegen_data_thinlto_two_rounds,
20 OPT_codegen_data_use_path,
21 OPT_global_merging_call_overhead,
22 OPT_global_merging_extra_threshold,
23 OPT_global_merging_inst_overhead,
24 OPT_global_merging_max_params,
25 OPT_global_merging_min_instrs,
26 OPT_global_merging_min_merges,
27 OPT_global_merging_param_overhead,
28 OPT_global_merging_skip_no_params,
29 OPT_indexed_codegen_data_lazy_loading,
30 OPT_indexed_codegen_data_read_function_map_names,
31};
32} // namespace
33
34static llvm::opt::OptTable::Tables optionTables() {
35 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
36 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
37 llvm::opt::RenderSeparate;
38
39#ifdef __GNUC__
40#pragma GCC diagnostic push
41#pragma GCC diagnostic ignored "-Woverlength-strings"
42#endif
43static constexpr char OptionStrTableStorage[] =
44 "\0"
45 "-\0"
46 "--\0"
47 "<input>\0"
48 "<unknown>\0"
49 "-codegen-data-generate\0"
50 "Emit CodeGen Data into custom sections\0"
51 "-codegen-data-thinlto-two-rounds\0"
52 "Enable two-round ThinLTO code generation. The first round emits codegen data, while the second round uses the emitted codegen data for further optimizations\0"
53 "-codegen-data-use-path\0"
54 "File path to where .cgdata file is read\0"
55 "-global-merging-call-overhead\0"
56 "The overhead cost associated with each function call when merging functions\0"
57 "-global-merging-extra-threshold\0"
58 "An additional cost threshold that must be exceeded for merging to be considered beneficial\0"
59 "-global-merging-inst-overhead\0"
60 "The overhead cost associated with each instruction when lowering to machine instruction\0"
61 "-global-merging-max-params\0"
62 "The maximum number of parameters allowed when merging functions\0"
63 "-global-merging-min-instrs\0"
64 "The minimum instruction count required when merging functions\0"
65 "-global-merging-min-merges\0"
66 "Minimum number of similar functions with the same hash required for merging\0"
67 "-global-merging-param-overhead\0"
68 "The overhead cost associated with each parameter when merging functions\0"
69 "-global-merging-skip-no-params\0"
70 "Skip merging functions with no parameters\0"
71 "-indexed-codegen-data-lazy-loading\0"
72 "Lazily load indexed CodeGenData. Enable to save memory and time for final consumption of the indexed CodeGenData in production\0"
73 "-indexed-codegen-data-read-function-map-names\0"
74 "Read function map names in indexed CodeGenData. Can be disabled to save memory and time for final consumption of the indexed CodeGenData in production\0"
75 ;
76#ifdef __GNUC__
77#pragma GCC diagnostic pop
78#endif
79
80static constexpr llvm::StringTable
81OptionStrTable = OptionStrTableStorage;
82
83 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
84 0 /* prefixes */,
85 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
86 };
87
88 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
89 {0, 0},
90 };
91
92 static constexpr unsigned OptionSubCommandIDsTable[] = {
93 0 /* subcommands */
94 };
95
96 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
97 {0, 0, 0, 0, 0, 0, 0, 0},
98 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
99 };
100
101 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
102 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
103 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
104 {24 /* -codegen-data-generate */, 47, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
105 {86 /* -codegen-data-thinlto-two-rounds */, 119, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
106 {276 /* -codegen-data-use-path */, 299, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
107 {339 /* -global-merging-call-overhead */, 369, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
108 {445 /* -global-merging-extra-threshold */, 477, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
109 {568 /* -global-merging-inst-overhead */, 598, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
110 {686 /* -global-merging-max-params */, 713, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
111 {777 /* -global-merging-min-instrs */, 804, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
112 {866 /* -global-merging-min-merges */, 893, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
113 {969 /* -global-merging-param-overhead */, 1000, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
114 {1072 /* -global-merging-skip-no-params */, 1103, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
115 {1145 /* -indexed-codegen-data-lazy-loading */, 1180, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
116 {1307 /* -indexed-codegen-data-read-function-map-names */, 1353, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
117 };
118
119 return {OptionStrTable, OptionPrefixesTable,
120 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
121}
122#undef OPTTABLE_CODE
123#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
124
125
126#ifdef OPTIONS_STRUCT_DECL
127#undef OPTIONS_STRUCT_DECL
128#include "llvm/ADT/ArrayRef.h"
129#include "llvm/ADT/BoolOrDefault.h"
130#include "llvm/ADT/StringRef.h"
131#include "llvm/Support/Allocator.h"
132#include "llvm/Support/LibraryOptionsContext.h"
133
134namespace llvm {
135namespace opt {
136class Arg;
137class LibraryOptionsParser;
138class OptTable;
139} // namespace opt
140} // namespace llvm
141
142namespace llvm {
143struct CGDataOptions {
144 bool codegen_data_generate{false};
145 bool codegen_data_thinlto_two_rounds{false};
146 StringRef codegen_data_use_path{};
147 double global_merging_call_overhead{1.0};
148 double global_merging_extra_threshold{0.0};
149 double global_merging_inst_overhead{1.2};
150 unsigned global_merging_max_params{std::numeric_limits<unsigned>::max()};
151 unsigned global_merging_min_instrs{1};
152 unsigned global_merging_min_merges{2};
153 double global_merging_param_overhead{2.0};
154 bool global_merging_skip_no_params{true};
155 bool indexed_codegen_data_lazy_loading{false};
156 bool indexed_codegen_data_read_function_map_names{true};
157
158 static constexpr bool PerContext = true;
159 static const llvm::opt::OptTable &optTable();
160 /// Sets the member that \p A names, allocating a list from \p Alloc.
161 /// Returns false if the value is invalid.
162 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
163
164private:
165 friend class llvm::cl::LibraryOptionsContext;
166 friend class llvm::opt::LibraryOptionsParser;
167
168 static CGDataOptions Global;
169 static const CGDataOptions Default;
170};
171} // namespace llvm
172#endif // OPTIONS_STRUCT_DECL
173
174#ifdef OPTIONS_STRUCT_DEFS
175#undef OPTIONS_STRUCT_DEFS
176llvm::CGDataOptions llvm::CGDataOptions::Global;
177LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::CGDataOptions llvm::CGDataOptions::Default;
178
179const llvm::opt::OptTable &llvm::CGDataOptions::optTable() {
180 static const llvm::opt::LibraryOptTable T(optionTables());
181 return T;
182}
183
184bool llvm::CGDataOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
185 switch (A.getOption().getID()) {
186 case OPT_codegen_data_generate:
187 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", codegen_data_generate, Alloc);
188 case OPT_codegen_data_thinlto_two_rounds:
189 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", codegen_data_thinlto_two_rounds, Alloc);
190 case OPT_codegen_data_use_path:
191 return llvm::opt::parseArgValue(A.getValue(), codegen_data_use_path, Alloc);
192 case OPT_global_merging_call_overhead:
193 return llvm::opt::parseArgValue(A.getValue(), global_merging_call_overhead, Alloc);
194 case OPT_global_merging_extra_threshold:
195 return llvm::opt::parseArgValue(A.getValue(), global_merging_extra_threshold, Alloc);
196 case OPT_global_merging_inst_overhead:
197 return llvm::opt::parseArgValue(A.getValue(), global_merging_inst_overhead, Alloc);
198 case OPT_global_merging_max_params:
199 return llvm::opt::parseArgValue(A.getValue(), global_merging_max_params, Alloc);
200 case OPT_global_merging_min_instrs:
201 return llvm::opt::parseArgValue(A.getValue(), global_merging_min_instrs, Alloc);
202 case OPT_global_merging_min_merges:
203 return llvm::opt::parseArgValue(A.getValue(), global_merging_min_merges, Alloc);
204 case OPT_global_merging_param_overhead:
205 return llvm::opt::parseArgValue(A.getValue(), global_merging_param_overhead, Alloc);
206 case OPT_global_merging_skip_no_params:
207 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", global_merging_skip_no_params, Alloc);
208 case OPT_indexed_codegen_data_lazy_loading:
209 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", indexed_codegen_data_lazy_loading, Alloc);
210 case OPT_indexed_codegen_data_read_function_map_names:
211 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", indexed_codegen_data_read_function_map_names, Alloc);
212 }
213 llvm_unreachable("option without a member");
214}
215#endif // OPTIONS_STRUCT_DEFS
216/////////
217// ValuesCode
218
219#ifdef OPTTABLE_VALUES_CODE
220static llvm::StringRef getOptionValuesCode(unsigned ID) {
221 switch (ID) {
222 }
223 return {};
224}
225#undef OPTTABLE_VALUES_CODE
226#endif // OPTTABLE_VALUES_CODE
227/////////
228// Groups
229
230#ifdef OPTION
231
232//////////
233// Options
234
235OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
236OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
237OPTION(1, 24 /* -codegen-data-generate */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 47, 0, 0, 0, 0)
238OPTION(1, 86 /* -codegen-data-thinlto-two-rounds */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 119, 0, 0, 0, 0)
239OPTION(1, 276 /* -codegen-data-use-path */, anonymous_2, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 299, 0, 0, 0, 0)
240OPTION(1, 339 /* -global-merging-call-overhead */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 369, 0, 0, 0, 0)
241OPTION(1, 445 /* -global-merging-extra-threshold */, anonymous_4, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 477, 0, 0, 0, 0)
242OPTION(1, 568 /* -global-merging-inst-overhead */, anonymous_5, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 598, 0, 0, 0, 0)
243OPTION(1, 686 /* -global-merging-max-params */, anonymous_6, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 713, 0, 0, 0, 0)
244OPTION(1, 777 /* -global-merging-min-instrs */, anonymous_7, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 804, 0, 0, 0, 0)
245OPTION(1, 866 /* -global-merging-min-merges */, anonymous_8, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 893, 0, 0, 0, 0)
246OPTION(1, 969 /* -global-merging-param-overhead */, anonymous_9, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1000, 0, 0, 0, 0)
247OPTION(1, 1072 /* -global-merging-skip-no-params */, anonymous_10, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1103, 0, 0, 0, 0)
248OPTION(1, 1145 /* -indexed-codegen-data-lazy-loading */, anonymous_11, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1180, 0, 0, 0, 0)
249OPTION(1, 1307 /* -indexed-codegen-data-read-function-map-names */, anonymous_12, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1353, 0, 0, 0, 0)
250#endif // OPTION
251
252#ifdef SIMPLE_ENUM_VALUE_TABLE
253
254struct SimpleEnumValue {
255 const char *Name;
256 unsigned Value;
257};
258
259struct SimpleEnumValueTable {
260 const SimpleEnumValue *Table;
261 unsigned Size;
262};
263static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
264static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
265#endif // SIMPLE_ENUM_VALUE_TABLE
266