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 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 const InstCombineCLOptions Default;
169};
170} // namespace llvm
171#endif // OPTIONS_STRUCT_DECL
172
173#ifdef OPTIONS_STRUCT_DEFS
174#undef OPTIONS_STRUCT_DEFS
175LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::InstCombineCLOptions llvm::InstCombineCLOptions::Default;
176
177const llvm::opt::OptTable &llvm::InstCombineCLOptions::optTable() {
178 static const llvm::opt::LibraryOptTable T(optionTables());
179 return T;
180}
181
182bool llvm::InstCombineCLOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
183 switch (A.getOption().getID()) {
184 case OPT_instcombine_code_sinking:
185 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", code_sinking, Alloc);
186 case OPT_instcombine_guard_widening_window:
187 return llvm::opt::parseArgValue(A.getValue(), guard_widening_window, Alloc);
188 case OPT_instcombine_lower_dbg_declare:
189 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", lower_dbg_declare, Alloc);
190 case OPT_instcombine_max_allocsite_removable_users:
191 return llvm::opt::parseArgValue(A.getValue(), max_allocsite_removable_users, Alloc);
192 case OPT_instcombine_max_copied_from_constant_users:
193 return llvm::opt::parseArgValue(A.getValue(), max_copied_from_constant_users, Alloc);
194 case OPT_instcombine_max_num_phis:
195 return llvm::opt::parseArgValue(A.getValue(), max_num_phis, Alloc);
196 case OPT_instcombine_max_sink_users:
197 return llvm::opt::parseArgValue(A.getValue(), max_sink_users, Alloc);
198 case OPT_instcombine_max_type_eval_depth:
199 return llvm::opt::parseArgValue(A.getValue(), max_type_eval_depth, Alloc);
200 case OPT_instcombine_maxarray_size:
201 return llvm::opt::parseArgValue(A.getValue(), maxarray_size, Alloc);
202 case OPT_instcombine_negator_enabled:
203 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", negator_enabled, Alloc);
204 case OPT_instcombine_negator_max_depth:
205 return llvm::opt::parseArgValue(A.getValue(), negator_max_depth, Alloc);
206 case OPT_instcombine_simplify_vector_elts_depth:
207 return llvm::opt::parseArgValue(A.getValue(), simplify_vector_elts_depth, Alloc);
208 case OPT_instcombine_verify_known_bits:
209 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", verify_known_bits, Alloc);
210 }
211 llvm_unreachable("option without a member");
212}
213#endif // OPTIONS_STRUCT_DEFS
214/////////
215// ValuesCode
216
217#ifdef OPTTABLE_VALUES_CODE
218static llvm::StringRef getOptionValuesCode(unsigned ID) {
219 switch (ID) {
220 }
221 return {};
222}
223#undef OPTTABLE_VALUES_CODE
224#endif // OPTTABLE_VALUES_CODE
225/////////
226// Groups
227
228#ifdef OPTION
229
230//////////
231// Options
232
233OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
234OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
235OPTION(1, 24 /* -instcombine-code-sinking */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 50, 0, 0, 0, 0)
236OPTION(1, 70 /* -instcombine-guard-widening-window */, anonymous_1, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 105, 0, 0, 0, 0)
237OPTION(1, 172 /* -instcombine-lower-dbg-declare */, anonymous_2, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 203, 0, 0, 0, 0)
238OPTION(1, 205 /* -instcombine-max-allocsite-removable-users */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 248, 0, 0, 0, 0)
239OPTION(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)
240OPTION(1, 416 /* -instcombine-max-num-phis */, anonymous_5, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 442, 0, 0, 0, 0)
241OPTION(1, 497 /* -instcombine-max-sink-users */, anonymous_6, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 525, 0, 0, 0, 0)
242OPTION(1, 585 /* -instcombine-max-type-eval-depth */, anonymous_7, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 618, 0, 0, 0, 0)
243OPTION(1, 715 /* -instcombine-maxarray-size */, anonymous_8, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 742, 0, 0, 0, 0)
244OPTION(1, 793 /* -instcombine-negator-enabled */, anonymous_9, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 822, 0, 0, 0, 0)
245OPTION(1, 859 /* -instcombine-negator-max-depth */, anonymous_10, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 890, 0, 0, 0, 0)
246OPTION(1, 978 /* -instcombine-simplify-vector-elts-depth */, anonymous_11, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1018, 0, 0, 0, 0)
247OPTION(1, 1086 /* -instcombine-verify-known-bits */, anonymous_12, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 1117, 0, 0, 0, 0)
248#endif // OPTION
249
250#ifdef SIMPLE_ENUM_VALUE_TABLE
251
252struct SimpleEnumValue {
253 const char *Name;
254 unsigned Value;
255};
256
257struct SimpleEnumValueTable {
258 const SimpleEnumValue *Table;
259 unsigned Size;
260};
261static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
262static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
263#endif // SIMPLE_ENUM_VALUE_TABLE
264