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_disable_sparc_delay_filler,
19 OPT_disable_sparc_leaf_proc,
20 OPT_sparc_bpcc_offset_bits,
21 OPT_sparc_bpr_offset_bits,
22 OPT_sparc_enable_branch_relax,
23 OPT_sparc_reserve_app_registers,
24};
25} // namespace
26
27static llvm::opt::OptTable::Tables optionTables() {
28 using llvm::opt::DefaultVis, llvm::opt::HelpHidden,
29 llvm::opt::RenderAsInput, llvm::opt::RenderJoined,
30 llvm::opt::RenderSeparate;
31
32#ifdef __GNUC__
33#pragma GCC diagnostic push
34#pragma GCC diagnostic ignored "-Woverlength-strings"
35#endif
36static constexpr char OptionStrTableStorage[] =
37 "\0"
38 "-\0"
39 "--\0"
40 "<input>\0"
41 "<unknown>\0"
42 "-disable-sparc-delay-filler\0"
43 "Disable the Sparc delay slot filler\0"
44 "-disable-sparc-leaf-proc\0"
45 "Disable Sparc leaf procedure optimization\0"
46 "-sparc-bpcc-offset-bits\0"
47 "Restrict range of BPcc/FBPfcc instructions (DEBUG)\0"
48 "-sparc-bpr-offset-bits\0"
49 "Restrict range of BPr instructions (DEBUG)\0"
50 "-sparc-enable-branch-relax\0"
51 "Relax out of range conditional branches\0"
52 "-sparc-reserve-app-registers\0"
53 "Reserve application registers (%g2-%g4)\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 /* -disable-sparc-delay-filler */, 52, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
84 {88 /* -disable-sparc-leaf-proc */, 113, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
85 {155 /* -sparc-bpcc-offset-bits */, 179, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
86 {230 /* -sparc-bpr-offset-bits */, 253, 0, 0, 1, 1, llvm::opt::Option::SeparateOrEqClass},
87 {296 /* -sparc-enable-branch-relax */, 323, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
88 {363 /* -sparc-reserve-app-registers */, 392, 0, 0, 1, 1, llvm::opt::Option::FlagOrEqClass},
89 };
90
91 return {OptionStrTable, OptionPrefixesTable,
92 OptionInfoTable, OptionInfoExtrasTable, OptionHelpTextVariantsTable, {}, OptionSubCommandIDsTable};
93}
94#undef OPTTABLE_CODE
95#endif // OPTTABLE_CODE || OPTIONS_STRUCT_DEFS
96
97
98#ifdef OPTIONS_STRUCT_DECL
99#undef OPTIONS_STRUCT_DECL
100#include "llvm/ADT/ArrayRef.h"
101#include "llvm/ADT/BoolOrDefault.h"
102#include "llvm/ADT/StringRef.h"
103#include "llvm/Support/Allocator.h"
104#include "llvm/Support/LibraryOptionsContext.h"
105
106namespace llvm {
107namespace opt {
108class Arg;
109class LibraryOptionsParser;
110class OptTable;
111} // namespace opt
112} // namespace llvm
113
114namespace llvm {
115struct SparcOptions {
116 bool disable_sparc_delay_filler{false};
117 bool disable_sparc_leaf_proc{false};
118 unsigned bpcc_offset_bits{19};
119 unsigned bpr_offset_bits{16};
120 bool enable_branch_relax{true};
121 bool reserve_app_registers{false};
122
123 static const llvm::opt::OptTable &optTable();
124 /// Sets the member that \p A names, allocating a list from \p Alloc.
125 /// Returns false if the value is invalid.
126 bool apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc);
127
128private:
129 friend class llvm::cl::LibraryOptionsContext;
130 friend class llvm::opt::LibraryOptionsParser;
131
132 static const SparcOptions Default;
133};
134} // namespace llvm
135#endif // OPTIONS_STRUCT_DECL
136
137#ifdef OPTIONS_STRUCT_DEFS
138#undef OPTIONS_STRUCT_DEFS
139LLVM_REQUIRE_CONSTANT_INITIALIZATION const llvm::SparcOptions llvm::SparcOptions::Default;
140
141const llvm::opt::OptTable &llvm::SparcOptions::optTable() {
142 static const llvm::opt::LibraryOptTable T(optionTables());
143 return T;
144}
145
146bool llvm::SparcOptions::apply(const llvm::opt::Arg &A, llvm::BumpPtrAllocator &Alloc) {
147 switch (A.getOption().getID()) {
148 case OPT_disable_sparc_delay_filler:
149 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", disable_sparc_delay_filler, Alloc);
150 case OPT_disable_sparc_leaf_proc:
151 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", disable_sparc_leaf_proc, Alloc);
152 case OPT_sparc_bpcc_offset_bits:
153 return llvm::opt::parseArgValue(A.getValue(), bpcc_offset_bits, Alloc);
154 case OPT_sparc_bpr_offset_bits:
155 return llvm::opt::parseArgValue(A.getValue(), bpr_offset_bits, Alloc);
156 case OPT_sparc_enable_branch_relax:
157 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", enable_branch_relax, Alloc);
158 case OPT_sparc_reserve_app_registers:
159 return llvm::opt::parseArgValue(A.getNumValues() ? A.getValue() : "true", reserve_app_registers, Alloc);
160 }
161 llvm_unreachable("option without a member");
162}
163#endif // OPTIONS_STRUCT_DEFS
164/////////
165// ValuesCode
166
167#ifdef OPTTABLE_VALUES_CODE
168static llvm::StringRef getOptionValuesCode(unsigned ID) {
169 switch (ID) {
170 }
171 return {};
172}
173#undef OPTTABLE_VALUES_CODE
174#endif // OPTTABLE_VALUES_CODE
175/////////
176// Groups
177
178#ifdef OPTION
179
180//////////
181// Options
182
183OPTION(0, 6 /* <input> */, INPUT, Input, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
184OPTION(0, 14 /* <unknown> */, UNKNOWN, Unknown, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 0, 0, 0, 0, 0)
185OPTION(1, 24 /* -disable-sparc-delay-filler */, anonymous_0, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 52, 0, 0, 0, 0)
186OPTION(1, 88 /* -disable-sparc-leaf-proc */, anonymous_1, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 113, 0, 0, 0, 0)
187OPTION(1, 155 /* -sparc-bpcc-offset-bits */, anonymous_2, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 179, 0, 0, 0, 0)
188OPTION(1, 230 /* -sparc-bpr-offset-bits */, anonymous_3, SeparateOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 253, 0, 0, 0, 0)
189OPTION(1, 296 /* -sparc-enable-branch-relax */, anonymous_4, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 323, 0, 0, 0, 0)
190OPTION(1, 363 /* -sparc-reserve-app-registers */, anonymous_5, FlagOrEq, INVALID, INVALID, 0, 0, static_cast<unsigned>(DefaultVis), 0, 392, 0, 0, 0, 0)
191#endif // OPTION
192
193#ifdef SIMPLE_ENUM_VALUE_TABLE
194
195struct SimpleEnumValue {
196 const char *Name;
197 unsigned Value;
198};
199
200struct SimpleEnumValueTable {
201 const SimpleEnumValue *Table;
202 unsigned Size;
203};
204static const SimpleEnumValueTable SimpleEnumValueTables[] = {};
205static const unsigned SimpleEnumValueTablesSize = std::size(SimpleEnumValueTables);
206#endif // SIMPLE_ENUM_VALUE_TABLE
207