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