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_instcombine_code_sinking,
19 OPT_instcombine_guard_widening_window,
20 OPT_instcombine_lower_dbg_declare,
21 OPT_instcombine_max_allocsite_removable_users,
22 OPT_instcombine_max_copied_from_constant_users,
23 OPT_instcombine_max_num_phis,
24 OPT_instcombine_max_sink_users,
25 OPT_instcombine_max_type_eval_depth,
26 OPT_instcombine_maxarray_size,
27 OPT_instcombine_negator_enabled,
28 OPT_instcombine_negator_max_depth,
29 OPT_instcombine_simplify_vector_elts_depth,
30 OPT_instcombine_verify_known_bits,
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 "-instcombine-code-sinking\0"
50 "Enable code sinking\0"
51 "-instcombine-guard-widening-window\0"
52 "How wide an instruction window to bypass looking for another guard\0"
53 "-instcombine-lower-dbg-declare\0"
54 "\0"
55 "\0"
56 "-instcombine-max-allocsite-removable-users\0"
57 "Maximum number of users to visit in alloc-site removability analysis\0"
58 "-instcombine-max-copied-from-constant-users\0"
59 "Maximum users to visit in copy from constant transform\0"
60 "-instcombine-max-num-phis\0"
61 "Maximum number phis to handle in intptr/ptrint folding\0"
62 "-instcombine-max-sink-users\0"
63 "Maximum number of undroppable users for instruction sinking\0"
64 "-instcombine-max-type-eval-depth\0"
65 "Maximum recursion depth when checking whether an expression can be evaluated in a different type\0"
66 "-instcombine-maxarray-size\0"
67 "Maximum array size considered when doing a combine\0"
68 "-instcombine-negator-enabled\0"
69 "Should we attempt to sink negations?\0"
70 "-instcombine-negator-max-depth\0"
71 "What is the maximal lookup depth when trying to check for viability of negation sinking\0"
72 "-instcombine-simplify-vector-elts-depth\0"
73 "Depth limit when simplifying vector instructions and their operands\0"
74 "-instcombine-verify-known-bits\0"
75 "Verify that computeKnownBits() and SimplifyDemandedBits() are consistent\0"
76 ;
77#ifdef __GNUC__
78#pragma GCC diagnostic pop
79#endif
80
81static constexpr llvm::StringTable
82OptionStrTable = OptionStrTableStorage;
83
84 static constexpr llvm::StringTable::Offset OptionPrefixesTable[] = {
85 0 /* prefixes */,
86 2 /* prefixes */, 1 /* '-' */, 3 /* '--' */
87 };
88
89 static constexpr llvm::opt::OptTable::HelpTextVariant OptionHelpTextVariantsTable[] = {
90 {0, 0},
91 };
92
93 static constexpr unsigned OptionSubCommandIDsTable[] = {
94 0 /* subcommands */
95 };
96
97 static constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = {
98 {0, 0, 0, 0, 0, 0, 0, 0},
99 {0, 0, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0},
100 };
101
102 static constexpr llvm::opt::OptTable::Info OptionInfoTable[] = {
103 {6 /* <input> */, 0, 0, 0, 1, 0, llvm::opt::Option::InputClass},
104 {14 /* <unknown> */, 0, 0, 0, 1, 0, llvm::opt::Option::UnknownClass},
105 {24 /* -instcombine-code-sinking */, 50, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
106 {70 /* -instcombine-guard-widening-window */, 105, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
107 {172 /* -instcombine-lower-dbg-declare */, 203, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
108 {205 /* -instcombine-max-allocsite-removable-users */, 248, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
109 {317 /* -instcombine-max-copied-from-constant-users */, 361, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
110 {416 /* -instcombine-max-num-phis */, 442, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
111 {497 /* -instcombine-max-sink-users */, 525, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
112 {585 /* -instcombine-max-type-eval-depth */, 618, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
113 {715 /* -instcombine-maxarray-size */, 742, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
114 {793 /* -instcombine-negator-enabled */, 822, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
115 {859 /* -instcombine-negator-max-depth */, 890, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
116 {978 /* -instcombine-simplify-vector-elts-depth */, 1018, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
117 {1086 /* -instcombine-verify-known-bits */, 1117, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
118 };
119
120 return {OptionStrTable, OptionPrefixesTable,
121 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
122}
123#undef OPTTABLE_CODE
124#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
125
126
127#ifdef OPTIONS_STRUCT_DECL
128#undef OPTIONS_STRUCT_DECL
129#include "llvm/ADT/ArrayRef.h"
130#include "llvm/ADT/BoolOrDefault.h"
131#include "llvm/ADT/StringRef.h"
132#include "llvm/Support/Allocator.h"
133#include "llvm/Support/LibraryOptionsContext.h"
134
135namespace llvm {
136namespace opt {
137class Arg;
138class LibraryOptionsParser;
139class OptTable;
140} // namespace opt
141} // namespace llvm
142
143namespace llvm {
144struct InstCombineCLOptions {
145 bool code_sinking{true};
146 unsigned guard_widening_window{3};
147 bool lower_dbg_declare{true};
148 unsigned max_allocsite_removable_users{2048};
149 unsigned max_copied_from_constant_users{300};
150 unsigned max_num_phis{512};
151 unsigned max_sink_users{32};
152 unsigned max_type_eval_depth{128};
153 unsigned maxarray_size{1024};
154 bool negator_enabled{true};
155 unsigned negator_max_depth{~0U};
156 unsigned simplify_vector_elts_depth{10};
157 bool verify_known_bits{false};
158
159 static constexpr bool PerContext = true;
160 static const llvm::opt::OptTable &optTable();
161 /// Sets the member that \p A names, allocating a list from \p Alloc.
162 /// Returns false if the value is invalid.
163 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
164
165private:
166 friend class llvm::cl::LibraryOptionsContext;
167 friend class llvm::opt::LibraryOptionsParser;
168
169 static InstCombineCLOptions Global;
170 static const InstCombineCLOptions Default;
171};
172} // namespace llvm
173#endif // OPTIONS_STRUCT_DECL
174
175#ifdef OPTIONS_STRUCT_DEFS
176#undef OPTIONS_STRUCT_DEFS
177llvm::InstCombineCLOptions llvm::InstCombineCLOptions::Global;
178LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::InstCombineCLOptions llvm::InstCombineCLOptions::Default;
179
180const llvm::opt::OptTable &llvm::InstCombineCLOptions::optTable() {
181 static const llvm::opt::LibraryOptTable T(optionTables());
182 return T;
183}
184
185bool llvm::InstCombineCLOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
186 switch (A.getOption().getID()) {
187 case OPT_instcombine_code_sinking:
188 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", code_sinking, Alloc);
189 case OPT_instcombine_guard_widening_window:
190 return llvm::opt::parseArgValue(A.getValue(), guard_widening_window, Alloc);
191 case OPT_instcombine_lower_dbg_declare:
192 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", lower_dbg_declare, Alloc);
193 case OPT_instcombine_max_allocsite_removable_users:
194 return llvm::opt::parseArgValue(A.getValue(), max_allocsite_removable_users, Alloc);
195 case OPT_instcombine_max_copied_from_constant_users:
196 return llvm::opt::parseArgValue(A.getValue(), max_copied_from_constant_users, Alloc);
197 case OPT_instcombine_max_num_phis:
198 return llvm::opt::parseArgValue(A.getValue(), max_num_phis, Alloc);
199 case OPT_instcombine_max_sink_users:
200 return llvm::opt::parseArgValue(A.getValue(), max_sink_users, Alloc);
201 case OPT_instcombine_max_type_eval_depth:
202 return llvm::opt::parseArgValue(A.getValue(), max_type_eval_depth, Alloc);
203 case OPT_instcombine_maxarray_size:
204 return llvm::opt::parseArgValue(A.getValue(), maxarray_size, Alloc);
205 case OPT_instcombine_negator_enabled:
206 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", negator_enabled, Alloc);
207 case OPT_instcombine_negator_max_depth:
208 return llvm::opt::parseArgValue(A.getValue(), negator_max_depth, Alloc);
209 case OPT_instcombine_simplify_vector_elts_depth:
210 return llvm::opt::parseArgValue(A.getValue(), simplify_vector_elts_depth, Alloc);
211 case OPT_instcombine_verify_known_bits:
212 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", verify_known_bits, Alloc);
213 }
214 llvm_unreachable("option without a member");
215}
216#endif // OPTIONS_STRUCT_DEFS
217/////////
218// ValuesCode
219
220#ifdef OPTTABLE_VALUES_CODE
221static llvm::StringRef getOptionValuesCode(unsigned ID) {
222 switch (ID) {
223 }
224 return {};
225}
226#undef OPTTABLE_VALUES_CODE
227#endif // OPTTABLE_VALUES_CODE
228/////////
229// Groups
230
231#ifdef OPTION
232
233//////////
234// Options
235
236OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
237OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
238OPTION(1, 24 /* -instcombine-code-sinking */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 50, 0, 0, 0, 0)
239OPTION(1, 70 /* -instcombine-guard-widening-window */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 105, 0, 0, 0, 0)
240OPTION(1, 172 /* -instcombine-lower-dbg-declare */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 203, 0, 0, 0, 0)
241OPTION(1, 205 /* -instcombine-max-allocsite-removable-users */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 248, 0, 0, 0, 0)
242OPTION(1, 317 /* -instcombine-max-copied-from-constant-users */, anonymous_4, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 361, 0, 0, 0, 0)
243OPTION(1, 416 /* -instcombine-max-num-phis */, anonymous_5, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 442, 0, 0, 0, 0)
244OPTION(1, 497 /* -instcombine-max-sink-users */, anonymous_6, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 525, 0, 0, 0, 0)
245OPTION(1, 585 /* -instcombine-max-type-eval-depth */, anonymous_7, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 618, 0, 0, 0, 0)
246OPTION(1, 715 /* -instcombine-maxarray-size */, anonymous_8, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 742, 0, 0, 0, 0)
247OPTION(1, 793 /* -instcombine-negator-enabled */, anonymous_9, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 822, 0, 0, 0, 0)
248OPTION(1, 859 /* -instcombine-negator-max-depth */, anonymous_10, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 890, 0, 0, 0, 0)
249OPTION(1, 978 /* -instcombine-simplify-vector-elts-depth */, anonymous_11, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1018, 0, 0, 0, 0)
250OPTION(1, 1086 /* -instcombine-verify-known-bits */, anonymous_12, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1117, 0, 0, 0, 0)
251#endif // OPTION
252
253#ifdef SIMPLE_ENUM_VALUE_TABLE
254
255struct SimpleEnumValue {
256 const char *Name;
257 unsigned Value;
258};
259
260struct SimpleEnumValueTable {
261 const SimpleEnumValue *Table;
262 unsigned Size;
263};
264static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
265static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
266#endif // SIMPLE_ENUM_VALUE_TABLE
267