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 const llvm::opt::OptTable &optTable();
159 /// Sets the member that \p A names, allocating a list from \p Alloc.
160 /// Returns false if the value is invalid.
161 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
162
163private:
164 friend class llvm::cl::LibraryOptionsContext;
165 friend class llvm::opt::LibraryOptionsParser;
166
167 static const CGDataOptions Default;
168};
169} // namespace llvm
170#endif // OPTIONS_STRUCT_DECL
171
172#ifdef OPTIONS_STRUCT_DEFS
173#undef OPTIONS_STRUCT_DEFS
174LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::CGDataOptions llvm::CGDataOptions::Default;
175
176const llvm::opt::OptTable &llvm::CGDataOptions::optTable() {
177 static const llvm::opt::LibraryOptTable T(optionTables());
178 return T;
179}
180
181bool llvm::CGDataOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
182 switch (A.getOption().getID()) {
183 case OPT_codegen_data_generate:
184 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", codegen_data_generate, Alloc);
185 case OPT_codegen_data_thinlto_two_rounds:
186 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", codegen_data_thinlto_two_rounds, Alloc);
187 case OPT_codegen_data_use_path:
188 return llvm::opt::parseArgValue(A.getValue(), codegen_data_use_path, Alloc);
189 case OPT_global_merging_call_overhead:
190 return llvm::opt::parseArgValue(A.getValue(), global_merging_call_overhead, Alloc);
191 case OPT_global_merging_extra_threshold:
192 return llvm::opt::parseArgValue(A.getValue(), global_merging_extra_threshold, Alloc);
193 case OPT_global_merging_inst_overhead:
194 return llvm::opt::parseArgValue(A.getValue(), global_merging_inst_overhead, Alloc);
195 case OPT_global_merging_max_params:
196 return llvm::opt::parseArgValue(A.getValue(), global_merging_max_params, Alloc);
197 case OPT_global_merging_min_instrs:
198 return llvm::opt::parseArgValue(A.getValue(), global_merging_min_instrs, Alloc);
199 case OPT_global_merging_min_merges:
200 return llvm::opt::parseArgValue(A.getValue(), global_merging_min_merges, Alloc);
201 case OPT_global_merging_param_overhead:
202 return llvm::opt::parseArgValue(A.getValue(), global_merging_param_overhead, Alloc);
203 case OPT_global_merging_skip_no_params:
204 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", global_merging_skip_no_params, Alloc);
205 case OPT_indexed_codegen_data_lazy_loading:
206 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", indexed_codegen_data_lazy_loading, Alloc);
207 case OPT_indexed_codegen_data_read_function_map_names:
208 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", indexed_codegen_data_read_function_map_names, Alloc);
209 }
210 llvm_unreachable("option without a member");
211}
212#endif // OPTIONS_STRUCT_DEFS
213/////////
214// ValuesCode
215
216#ifdef OPTTABLE_VALUES_CODE
217static llvm::StringRef getOptionValuesCode(unsigned ID) {
218 switch (ID) {
219 }
220 return {};
221}
222#undef OPTTABLE_VALUES_CODE
223#endif // OPTTABLE_VALUES_CODE
224/////////
225// Groups
226
227#ifdef OPTION
228
229//////////
230// Options
231
232OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
233OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
234OPTION(1, 24 /* -codegen-data-generate */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 47, 0, 0, 0, 0)
235OPTION(1, 86 /* -codegen-data-thinlto-two-rounds */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 119, 0, 0, 0, 0)
236OPTION(1, 276 /* -codegen-data-use-path */, anonymous_2, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 299, 0, 0, 0, 0)
237OPTION(1, 339 /* -global-merging-call-overhead */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 369, 0, 0, 0, 0)
238OPTION(1, 445 /* -global-merging-extra-threshold */, anonymous_4, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 477, 0, 0, 0, 0)
239OPTION(1, 568 /* -global-merging-inst-overhead */, anonymous_5, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 598, 0, 0, 0, 0)
240OPTION(1, 686 /* -global-merging-max-params */, anonymous_6, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 713, 0, 0, 0, 0)
241OPTION(1, 777 /* -global-merging-min-instrs */, anonymous_7, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 804, 0, 0, 0, 0)
242OPTION(1, 866 /* -global-merging-min-merges */, anonymous_8, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 893, 0, 0, 0, 0)
243OPTION(1, 969 /* -global-merging-param-overhead */, anonymous_9, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1000, 0, 0, 0, 0)
244OPTION(1, 1072 /* -global-merging-skip-no-params */, anonymous_10, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1103, 0, 0, 0, 0)
245OPTION(1, 1145 /* -indexed-codegen-data-lazy-loading */, anonymous_11, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1180, 0, 0, 0, 0)
246OPTION(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)
247#endif // OPTION
248
249#ifdef SIMPLE_ENUM_VALUE_TABLE
250
251struct SimpleEnumValue {
252 const char *Name;
253 unsigned Value;
254};
255
256struct SimpleEnumValueTable {
257 const SimpleEnumValue *Table;
258 unsigned Size;
259};
260static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
261static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
262#endif // SIMPLE_ENUM_VALUE_TABLE
263