Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: src/IceClFlags.h

Issue 1527173002: cleanup doxygen for IceClFlags.h (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceClFlagsExtra.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- C++ -*-===// 1 //===- subzero/src/IceClFlags.h - Cl Flags for translation ------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
11 /// \brief Declares command line flags controlling translation. 11 /// \brief Declares Ice::ClFlags which implements command line processing.
12 /// 12 ///
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef SUBZERO_SRC_ICECLFLAGS_H 15 #ifndef SUBZERO_SRC_ICECLFLAGS_H
16 #define SUBZERO_SRC_ICECLFLAGS_H 16 #define SUBZERO_SRC_ICECLFLAGS_H
17 17
18 #include "IceDefs.h" 18 #include "IceDefs.h"
19 #include "IceTypes.h" 19 #include "IceTypes.h"
20 20
21 namespace Ice { 21 namespace Ice {
22 22
23 class ClFlagsExtra; 23 class ClFlagsExtra;
24 24
25 /// Define variables which configure translation and related support functions.
25 class ClFlags { 26 class ClFlags {
26 ClFlags(const ClFlags &) = delete; 27 ClFlags(const ClFlags &) = delete;
27 ClFlags &operator=(const ClFlags &) = delete; 28 ClFlags &operator=(const ClFlags &) = delete;
28 29
29 public: 30 public:
31 /// User defined constructor.
30 ClFlags() { resetClFlags(*this); } 32 ClFlags() { resetClFlags(*this); }
31 33
34 /// \brief Parse commmand line options for Subzero.
35 ///
36 /// This is done use cl::ParseCommandLineOptions() and the static variables of
37 /// type cl::opt defined in IceClFlags.cpp
32 static void parseFlags(int argc, char *argv[]); 38 static void parseFlags(int argc, char *argv[]);
39 /// Reset all configuration options to their nominal values.
33 static void resetClFlags(ClFlags &OutFlags); 40 static void resetClFlags(ClFlags &OutFlags);
41 /// \brief Retrieve the configuration option state
42 ///
43 /// This is defined by static variables
44 /// anonymous_namespace{IceClFlags.cpp}::AllowErrorRecovery,
45 /// anonymous_namespace{IceClFlags.cpp}::AllowIacaMarks,
46 /// ...
34 static void getParsedClFlags(ClFlags &OutFlags); 47 static void getParsedClFlags(ClFlags &OutFlags);
48 /// Retrieve the extra configuration options state.
35 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra); 49 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra);
36 50
37 // bool accessors. 51 // bool accessors.
38 52
53 /// Get the value of ClFlags::AllowErrorRecovery
39 bool getAllowErrorRecovery() const { return AllowErrorRecovery; } 54 bool getAllowErrorRecovery() const { return AllowErrorRecovery; }
55 /// Set ClFlags::AllowErrorRecovery to a new value
40 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; } 56 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; }
41 57
58 /// Get the value of ClFlags::AllowExternDefinedSymbols
42 bool getAllowExternDefinedSymbols() const { 59 bool getAllowExternDefinedSymbols() const {
43 return AllowExternDefinedSymbols; 60 return AllowExternDefinedSymbols;
44 } 61 }
62 /// Set ClFlags::AllowExternDefinedSymbols to a new value
45 void setAllowExternDefinedSymbols(bool NewValue) { 63 void setAllowExternDefinedSymbols(bool NewValue) {
46 AllowExternDefinedSymbols = NewValue; 64 AllowExternDefinedSymbols = NewValue;
47 } 65 }
48 66
67 /// Get the value of ClFlags::AllowIacaMarks
49 bool getAllowIacaMarks() const { return AllowIacaMarks; } 68 bool getAllowIacaMarks() const { return AllowIacaMarks; }
69 /// Set ClFlags::AllowIacaMarks to a new value
50 void setAllowIacaMarks(bool NewValue) { AllowIacaMarks = NewValue; } 70 void setAllowIacaMarks(bool NewValue) { AllowIacaMarks = NewValue; }
51 71
72 /// Get the value of ClFlags::AllowUninitializedGlobals
52 bool getAllowUninitializedGlobals() const { 73 bool getAllowUninitializedGlobals() const {
53 return AllowUninitializedGlobals; 74 return AllowUninitializedGlobals;
54 } 75 }
76 /// Set ClFlags::AllowUninitializedGlobals to a new value
55 void setAllowUninitializedGlobals(bool NewValue) { 77 void setAllowUninitializedGlobals(bool NewValue) {
56 AllowUninitializedGlobals = NewValue; 78 AllowUninitializedGlobals = NewValue;
57 } 79 }
58 80
81 /// Get the value of ClFlags::DataSections
59 bool getDataSections() const { return DataSections; } 82 bool getDataSections() const { return DataSections; }
83 /// Set ClFlags::DataSections to a new value
60 void setDataSections(bool NewValue) { DataSections = NewValue; } 84 void setDataSections(bool NewValue) { DataSections = NewValue; }
61 85
86 /// Get the value of ClFlags::DecorateAsm
62 bool getDecorateAsm() const { return DecorateAsm; } 87 bool getDecorateAsm() const { return DecorateAsm; }
88 /// Set ClFlags::DecorateAsm to a new value
63 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; } 89 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; }
64 90
91 /// Get the value of ClFlags::DisableHybridAssembly
65 bool getDisableHybridAssembly() const { return DisableHybridAssembly; } 92 bool getDisableHybridAssembly() const { return DisableHybridAssembly; }
93 /// Set ClFlags::DisableHybridAssembly to a new value
66 void setDisableHybridAssembly(bool NewValue) { 94 void setDisableHybridAssembly(bool NewValue) {
67 DisableHybridAssembly = NewValue; 95 DisableHybridAssembly = NewValue;
68 } 96 }
69 97
98 /// Get the value of ClFlags::DisableInternal
70 bool getDisableInternal() const { return DisableInternal; } 99 bool getDisableInternal() const { return DisableInternal; }
100 /// Set ClFlags::DisableInternal to a new value
71 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; } 101 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; }
72 102
103 /// Get the value of ClFlags::DisableTranslation
73 bool getDisableTranslation() const { return DisableTranslation; } 104 bool getDisableTranslation() const { return DisableTranslation; }
105 /// Set ClFlags::DisableTranslation to a new value
74 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; } 106 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; }
75 107
108 /// Get the value of ClFlags::DumpStats
76 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; } 109 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; }
110 /// Set ClFlags::DumpStats to a new value
77 void setDumpStats(bool NewValue) { DumpStats = NewValue; } 111 void setDumpStats(bool NewValue) { DumpStats = NewValue; }
78 112
113 /// Get the value of ClFlags::EnableBlockProfile
79 bool getEnableBlockProfile() const { return EnableBlockProfile; } 114 bool getEnableBlockProfile() const { return EnableBlockProfile; }
115 /// Set ClFlags::EnableBlockProfile to a new value
80 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; } 116 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; }
81 117
118 /// Get the value of ClFlags::ForceMemIntrinOpt
82 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; } 119 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; }
120 /// Set ClFlags::ForceMemIntrinOpt to a new value
83 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; } 121 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; }
84 122
123 /// Get the value of ClFlags::FunctionSections
85 bool getFunctionSections() const { return FunctionSections; } 124 bool getFunctionSections() const { return FunctionSections; }
125 /// Set ClFlags::FunctionSections to a new value
86 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } 126 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; }
87 127
128 /// \brief Get the value of ClFlags::GenerateUnitTestMessages
129 ///
130 /// Note: If dump routines have been turned off, the error messages
131 /// will not be readable. Hence, turn off.
88 bool getGenerateUnitTestMessages() const { 132 bool getGenerateUnitTestMessages() const {
89 // Note: If dump routines have been turned off, the error messages will not
90 // be readable. Hence, turn off.
91 return !BuildDefs::dump() || GenerateUnitTestMessages; 133 return !BuildDefs::dump() || GenerateUnitTestMessages;
92 } 134 }
135 /// Set ClFlags::GenerateUnitTestMessages to a new value
93 void setGenerateUnitTestMessages(bool NewValue) { 136 void setGenerateUnitTestMessages(bool NewValue) {
94 GenerateUnitTestMessages = NewValue; 137 GenerateUnitTestMessages = NewValue;
95 } 138 }
96 139
140 /// Get the value of ClFlags::MockBoundsCheck
97 bool getMockBoundsCheck() const { return MockBoundsCheck; } 141 bool getMockBoundsCheck() const { return MockBoundsCheck; }
142 /// Set ClFlags::MockBoundsCheck to a new value
98 void setMockBoundsCheck(bool NewValue) { MockBoundsCheck = NewValue; } 143 void setMockBoundsCheck(bool NewValue) { MockBoundsCheck = NewValue; }
99 144
145 /// Get the value of ClFlags::PhiEdgeSplit
100 bool getPhiEdgeSplit() const { return PhiEdgeSplit; } 146 bool getPhiEdgeSplit() const { return PhiEdgeSplit; }
147 /// Set ClFlags::PhiEdgeSplit to a new value
101 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; } 148 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; }
102 149
150 /// Get the value of ClFlags::RandomNopInsertion
103 bool shouldDoNopInsertion() const { return RandomNopInsertion; } 151 bool shouldDoNopInsertion() const { return RandomNopInsertion; }
152 /// Set ClFlags::RandomNopInsertion to a new value
104 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; } 153 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; }
105 154
155 /// Get the value of ClFlags::RandomRegAlloc
106 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; } 156 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; }
157 /// Set ClFlags::RandomRegAlloc to a new value
107 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; } 158 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; }
108 159
160 /// Get the value of ClFlags::RepeatRegAlloc
109 bool shouldRepeatRegAlloc() const { return RepeatRegAlloc; } 161 bool shouldRepeatRegAlloc() const { return RepeatRegAlloc; }
162 /// Set ClFlags::RepeatRegAlloc to a new value
110 void setShouldRepeatRegAlloc(bool NewValue) { RepeatRegAlloc = NewValue; } 163 void setShouldRepeatRegAlloc(bool NewValue) { RepeatRegAlloc = NewValue; }
111 164
165 /// Get the value of ClFlags::SkipUnimplemented
112 bool getSkipUnimplemented() const { return SkipUnimplemented; } 166 bool getSkipUnimplemented() const { return SkipUnimplemented; }
167 /// Set ClFlags::SkipUnimplemented to a new value
113 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; } 168 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; }
114 169
170 /// Get the value of ClFlags::SubzeroTimingEnabled
115 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; } 171 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; }
172 /// Set ClFlags::SubzeroTimingEnableds to a new value
116 void setSubzeroTimingEnabled(bool NewValue) { 173 void setSubzeroTimingEnabled(bool NewValue) {
117 SubzeroTimingEnabled = NewValue; 174 SubzeroTimingEnabled = NewValue;
118 } 175 }
119 176
177 /// Get the value of ClFlags::TimeEachFunction
120 bool getTimeEachFunction() const { 178 bool getTimeEachFunction() const {
121 return BuildDefs::dump() && TimeEachFunction; 179 return BuildDefs::dump() && TimeEachFunction;
122 } 180 }
181 /// Set ClFlags::TimeEachFunction to a new value
123 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } 182 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; }
124 183
184 /// Get the value of ClFlags::UseSandboxing
125 bool getUseSandboxing() const { return UseSandboxing; } 185 bool getUseSandboxing() const { return UseSandboxing; }
186 /// Set ClFlags::UseSandboxing to a new value
126 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } 187 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; }
127 188
128 // Enum and integer accessors. 189 // Enum and integer accessors.
190 /// Get the value of ClFlags::Opt
129 OptLevel getOptLevel() const { return Opt; } 191 OptLevel getOptLevel() const { return Opt; }
192 /// Set ClFlags::Opt to a new value
130 void setOptLevel(OptLevel NewValue) { Opt = NewValue; } 193 void setOptLevel(OptLevel NewValue) { Opt = NewValue; }
131 194
195 /// Get the value of ClFlags::OutFileType
132 FileType getOutFileType() const { return OutFileType; } 196 FileType getOutFileType() const { return OutFileType; }
197 /// Set ClFlags::OutFileType to a new value
133 void setOutFileType(FileType NewValue) { OutFileType = NewValue; } 198 void setOutFileType(FileType NewValue) { OutFileType = NewValue; }
134 199
200 /// Get the value of ClFlags::RandomMaxNopsPerInstruction
135 int getMaxNopsPerInstruction() const { return RandomMaxNopsPerInstruction; } 201 int getMaxNopsPerInstruction() const { return RandomMaxNopsPerInstruction; }
202 /// Set ClFlags::RandomMaxNopsPerInstruction to a new value
136 void setMaxNopsPerInstruction(int NewValue) { 203 void setMaxNopsPerInstruction(int NewValue) {
137 RandomMaxNopsPerInstruction = NewValue; 204 RandomMaxNopsPerInstruction = NewValue;
138 } 205 }
139 206
207 /// Get the value of ClFlags::RandomNopProbabilityAsPercentage
140 int getNopProbabilityAsPercentage() const { 208 int getNopProbabilityAsPercentage() const {
141 return RandomNopProbabilityAsPercentage; 209 return RandomNopProbabilityAsPercentage;
142 } 210 }
211 /// Set ClFlags::RandomNopProbabilityAsPercentage to a new value
143 void setNopProbabilityAsPercentage(int NewValue) { 212 void setNopProbabilityAsPercentage(int NewValue) {
144 RandomNopProbabilityAsPercentage = NewValue; 213 RandomNopProbabilityAsPercentage = NewValue;
145 } 214 }
146 215
216 /// Get the value of ClFlags::TArch
147 TargetArch getTargetArch() const { return TArch; } 217 TargetArch getTargetArch() const { return TArch; }
218 /// Set ClFlags::TArch to a new value
148 void setTargetArch(TargetArch NewValue) { TArch = NewValue; } 219 void setTargetArch(TargetArch NewValue) { TArch = NewValue; }
149 220
221 /// Get the value of ClFlags::TInstrSet
150 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; } 222 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; }
223 /// Set ClFlags::TInstrSet to a new value
151 void setTargetInstructionSet(TargetInstructionSet NewValue) { 224 void setTargetInstructionSet(TargetInstructionSet NewValue) {
152 TInstrSet = NewValue; 225 TInstrSet = NewValue;
153 } 226 }
227
228 /// \brief Get the value of ClFlags::TestStackExtra
229 ///
230 /// Always 0 if BuildDefs::minimal()
154 uint32_t getTestStackExtra() const { 231 uint32_t getTestStackExtra() const {
155 return BuildDefs::minimal() ? 0 : TestStackExtra; 232 return BuildDefs::minimal() ? 0 : TestStackExtra;
156 } 233 }
234 /// \brief Set ClFlags::TestStackExtra to a new value
235 ///
236 /// Always 0 if BuildDefs::minimal()
157 void setTestStackExtra(uint32_t NewValue) { 237 void setTestStackExtra(uint32_t NewValue) {
158 if (BuildDefs::minimal()) 238 if (BuildDefs::minimal())
159 return; 239 return;
160 TestStackExtra = NewValue; 240 TestStackExtra = NewValue;
161 } 241 }
162 242
243 /// \brief Get the value of ClFlags::VMask
244 ///
245 /// None if BuildDefs::dump()
163 VerboseMask getVerbose() const { 246 VerboseMask getVerbose() const {
164 return BuildDefs::dump() ? VMask : (VerboseMask)IceV_None; 247 return BuildDefs::dump() ? VMask : (VerboseMask)IceV_None;
165 } 248 }
249 /// \brief Set ClFlags::VMask to a new value
250 ///
251 /// None if BuildDefs::dump()
166 void setVerbose(VerboseMask NewValue) { VMask = NewValue; } 252 void setVerbose(VerboseMask NewValue) { VMask = NewValue; }
167 253
254 /// Set ClFlags::RandomizeAndPoolImmediatesOption to a new value
168 void 255 void
169 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) { 256 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) {
170 RandomizeAndPoolImmediatesOption = Option; 257 RandomizeAndPoolImmediatesOption = Option;
171 } 258 }
259 /// Get the value of ClFlags::RandomizeAndPoolImmediatesOption
172 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const { 260 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const {
173 return RandomizeAndPoolImmediatesOption; 261 return RandomizeAndPoolImmediatesOption;
174 } 262 }
175 263
264 /// Set ClFlags::RandomizeAndPoolImmediatesThreshold to a new value
176 void setRandomizeAndPoolImmediatesThreshold(uint32_t Threshold) { 265 void setRandomizeAndPoolImmediatesThreshold(uint32_t Threshold) {
177 RandomizeAndPoolImmediatesThreshold = Threshold; 266 RandomizeAndPoolImmediatesThreshold = Threshold;
178 } 267 }
268 /// Get the value of ClFlags::RandomizeAndPoolImmediatesThreshold
179 uint32_t getRandomizeAndPoolImmediatesThreshold() const { 269 uint32_t getRandomizeAndPoolImmediatesThreshold() const {
180 return RandomizeAndPoolImmediatesThreshold; 270 return RandomizeAndPoolImmediatesThreshold;
181 } 271 }
182 272
273 /// Get the value of ClFlags::ReorderBasicBlocks
183 bool shouldReorderBasicBlocks() const { return ReorderBasicBlocks; } 274 bool shouldReorderBasicBlocks() const { return ReorderBasicBlocks; }
275 /// Set ClFlags::ReorderBasicBlocks to a new value
184 void setShouldReorderBasicBlocks(bool NewValue) { 276 void setShouldReorderBasicBlocks(bool NewValue) {
185 ReorderBasicBlocks = NewValue; 277 ReorderBasicBlocks = NewValue;
186 } 278 }
187 279
280 /// Set ClFlags::ReorderFunctions to a new value
188 void setShouldReorderFunctions(bool Option) { ReorderFunctions = Option; } 281 void setShouldReorderFunctions(bool Option) { ReorderFunctions = Option; }
282 /// Get the value of ClFlags::ReorderFunctions
189 bool shouldReorderFunctions() const { return ReorderFunctions; } 283 bool shouldReorderFunctions() const { return ReorderFunctions; }
190 284
285 /// Set ClFlags::ReorderFunctionsWindowSize to a new value
191 void setReorderFunctionsWindowSize(uint32_t Size) { 286 void setReorderFunctionsWindowSize(uint32_t Size) {
192 ReorderFunctionsWindowSize = Size; 287 ReorderFunctionsWindowSize = Size;
193 } 288 }
289 /// Get the value of ClFlags::ReorderFunctionsWindowSize
194 uint32_t getReorderFunctionsWindowSize() const { 290 uint32_t getReorderFunctionsWindowSize() const {
195 return ReorderFunctionsWindowSize; 291 return ReorderFunctionsWindowSize;
196 } 292 }
197 293
294 /// Set ClFlags::ReorderGlobalVariables to a new value
198 void setShouldReorderGlobalVariables(bool Option) { 295 void setShouldReorderGlobalVariables(bool Option) {
199 ReorderGlobalVariables = Option; 296 ReorderGlobalVariables = Option;
200 } 297 }
298 /// Get the value of ClFlags::ReorderGlobalVariables
201 bool shouldReorderGlobalVariables() const { return ReorderGlobalVariables; } 299 bool shouldReorderGlobalVariables() const { return ReorderGlobalVariables; }
202 300
301 /// Set ClFlags::ReorderPooledConstants to a new value
203 void setShouldReorderPooledConstants(bool Option) { 302 void setShouldReorderPooledConstants(bool Option) {
204 ReorderPooledConstants = Option; 303 ReorderPooledConstants = Option;
205 } 304 }
305 /// Get the value of ClFlags::ReorderPooledConstants
206 bool shouldReorderPooledConstants() const { return ReorderPooledConstants; } 306 bool shouldReorderPooledConstants() const { return ReorderPooledConstants; }
207 307
208 // IceString accessors. 308 // IceString accessors.
209 309
310 /// Get the value of ClFlags::DefaultFunctionPrefix
210 const IceString &getDefaultFunctionPrefix() const { 311 const IceString &getDefaultFunctionPrefix() const {
211 return DefaultFunctionPrefix; 312 return DefaultFunctionPrefix;
212 } 313 }
314 /// Set ClFlags::DefaultFunctionPrefix to a new value
213 void setDefaultFunctionPrefix(const IceString &NewValue) { 315 void setDefaultFunctionPrefix(const IceString &NewValue) {
214 DefaultFunctionPrefix = NewValue; 316 DefaultFunctionPrefix = NewValue;
215 } 317 }
216 318
319 /// Get the value of ClFlags::DefaultGlobalPrefix
217 const IceString &getDefaultGlobalPrefix() const { 320 const IceString &getDefaultGlobalPrefix() const {
218 return DefaultGlobalPrefix; 321 return DefaultGlobalPrefix;
219 } 322 }
323 /// Set ClFlags::DefaultGlobalPrefix to a new value
220 void setDefaultGlobalPrefix(const IceString &NewValue) { 324 void setDefaultGlobalPrefix(const IceString &NewValue) {
221 DefaultGlobalPrefix = NewValue; 325 DefaultGlobalPrefix = NewValue;
222 } 326 }
223 327
328 /// Get the value of ClFlags::TestPrefix
224 const IceString &getTestPrefix() const { return TestPrefix; } 329 const IceString &getTestPrefix() const { return TestPrefix; }
330 /// Set ClFlags::TestPrefix to a new value
225 void setTestPrefix(const IceString &NewValue) { TestPrefix = NewValue; } 331 void setTestPrefix(const IceString &NewValue) { TestPrefix = NewValue; }
226 332
333 /// Get the value of ClFlags::TimingFocusOn
227 const IceString &getTimingFocusOn() const { return TimingFocusOn; } 334 const IceString &getTimingFocusOn() const { return TimingFocusOn; }
335 /// Set ClFlags::TimingFocusOn to a new value
228 void setTimingFocusOn(const IceString &NewValue) { TimingFocusOn = NewValue; } 336 void setTimingFocusOn(const IceString &NewValue) { TimingFocusOn = NewValue; }
229 337
338 /// Get the value of ClFlags::TranslateOnly
230 const IceString &getTranslateOnly() const { return TranslateOnly; } 339 const IceString &getTranslateOnly() const { return TranslateOnly; }
340 /// Set ClFlags::TranslateOnly to a new value
231 void setTranslateOnly(const IceString &NewValue) { TranslateOnly = NewValue; } 341 void setTranslateOnly(const IceString &NewValue) { TranslateOnly = NewValue; }
232 342
343 /// Get the value of ClFlags::VerboseFocusOn
233 const IceString &getVerboseFocusOn() const { return VerboseFocusOn; } 344 const IceString &getVerboseFocusOn() const { return VerboseFocusOn; }
345 /// Set ClFlags::VerboseFocusOns to a new value
234 void setVerboseFocusOn(const IceString &NewValue) { 346 void setVerboseFocusOn(const IceString &NewValue) {
235 VerboseFocusOn = NewValue; 347 VerboseFocusOn = NewValue;
236 } 348 }
237 349
238 // size_t and 64-bit accessors. 350 // size_t and 64-bit accessors.
239 351
352 /// Get the value of ClFlags::NumTranslationThreads
240 size_t getNumTranslationThreads() const { return NumTranslationThreads; } 353 size_t getNumTranslationThreads() const { return NumTranslationThreads; }
241 bool isSequential() const { return NumTranslationThreads == 0; } 354 bool isSequential() const { return NumTranslationThreads == 0; }
355 /// Set ClFlags::NumTranslationThreads to a new value
242 void setNumTranslationThreads(size_t NewValue) { 356 void setNumTranslationThreads(size_t NewValue) {
243 NumTranslationThreads = NewValue; 357 NumTranslationThreads = NewValue;
244 } 358 }
245 359
360 /// Get the value of ClFlags::RandomSeed
246 uint64_t getRandomSeed() const { return RandomSeed; } 361 uint64_t getRandomSeed() const { return RandomSeed; }
362 /// Set ClFlags::RandomSeed to a new value
247 void setRandomSeed(size_t NewValue) { RandomSeed = NewValue; } 363 void setRandomSeed(size_t NewValue) { RandomSeed = NewValue; }
248 364
249 private: 365 private:
366 /// see anonymous_namespace{IceClFlags.cpp}::AllowErrorRecovery
250 bool AllowErrorRecovery; 367 bool AllowErrorRecovery;
368 /// see anonymous_namespace{IceClFlags.cpp}::AllowExternDefinedSymbols
251 bool AllowExternDefinedSymbols; 369 bool AllowExternDefinedSymbols;
370 /// see anonymous_namespace{IceClFlags.cpp}::AllowIacaMarks
252 bool AllowIacaMarks; 371 bool AllowIacaMarks;
372 /// see anonymous_namespace{IceClFlags.cpp}::AllowUninitializedGlobals
253 bool AllowUninitializedGlobals; 373 bool AllowUninitializedGlobals;
374 /// see anonymous_namespace{IceClFlags.cpp}::DataSections
254 bool DataSections; 375 bool DataSections;
376 /// see anonymous_namespace{IceClFlags.cpp}::DecorateAsm
255 bool DecorateAsm; 377 bool DecorateAsm;
378 /// see anonymous_namespace{IceClFlags.cpp}::DisableHybridAssembly
256 bool DisableHybridAssembly; 379 bool DisableHybridAssembly;
380 /// see anonymous_namespace{IceClFlags.cpp}::DisableInternal
257 bool DisableInternal; 381 bool DisableInternal;
382 /// see anonymous_namespace{IceClFlags.cpp}::DisableTranslation
258 bool DisableTranslation; 383 bool DisableTranslation;
384 /// see anonymous_namespace{IceClFlags.cpp}::DumpStats
259 bool DumpStats; 385 bool DumpStats;
386 /// see anonymous_namespace{IceClFlags.cpp}::EnableBlockProfile
260 bool EnableBlockProfile; 387 bool EnableBlockProfile;
388 /// see anonymous_namespace{IceClFlags.cpp}::ForceMemIntrinOpt
261 bool ForceMemIntrinOpt; 389 bool ForceMemIntrinOpt;
390 /// see anonymous_namespace{IceClFlags.cpp}::FunctionSections
262 bool FunctionSections; 391 bool FunctionSections;
392 /// Initialized to false; not set by the command line.
263 bool GenerateUnitTestMessages; 393 bool GenerateUnitTestMessages;
394 /// see anonymous_namespace{IceClFlags.cpp}::MockBoundsCheck
264 bool MockBoundsCheck; 395 bool MockBoundsCheck;
396 /// see anonymous_namespace{IceClFlags.cpp}::EnablePhiEdgeSplit
265 bool PhiEdgeSplit; 397 bool PhiEdgeSplit;
398 /// see anonymous_namespace{IceClFlags.cpp}::ShouldDoNopInsertion
266 bool RandomNopInsertion; 399 bool RandomNopInsertion;
400 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeRegisterAllocation
267 bool RandomRegAlloc; 401 bool RandomRegAlloc;
402 /// see anonymous_namespace{IceClFlags.cpp}::RepeatRegAlloc
268 bool RepeatRegAlloc; 403 bool RepeatRegAlloc;
404 /// see anonymous_namespace{IceClFlags.cpp}::ReorderBasicBlocks
269 bool ReorderBasicBlocks; 405 bool ReorderBasicBlocks;
406 /// see anonymous_namespace{IceClFlags.cpp}::ReorderFunctions
270 bool ReorderFunctions; 407 bool ReorderFunctions;
408 /// see anonymous_namespace{IceClFlags.cpp}::ReorderGlobalVariables
271 bool ReorderGlobalVariables; 409 bool ReorderGlobalVariables;
410 /// see anonymous_namespace{IceClFlags.cpp}::ReorderPooledConstants
272 bool ReorderPooledConstants; 411 bool ReorderPooledConstants;
412 /// see anonymous_namespace{IceClFlags.cpp}::SkipUnimplemented
273 bool SkipUnimplemented; 413 bool SkipUnimplemented;
414 /// see anonymous_namespace{IceClFlags.cpp}::SubzeroTimingEnabled
274 bool SubzeroTimingEnabled; 415 bool SubzeroTimingEnabled;
416 /// see anonymous_namespace{IceClFlags.cpp}::TimeEachFunction
275 bool TimeEachFunction; 417 bool TimeEachFunction;
418 /// see anonymous_namespace{IceClFlags.cpp}::UseSandboxing
276 bool UseSandboxing; 419 bool UseSandboxing;
277 420 /// see anonymous_namespace{IceClFlags.cpp}::OLevel
278 OptLevel Opt; 421 OptLevel Opt;
422 /// see anonymous_namespace{IceClFlags.cpp}::OutFileType
279 FileType OutFileType; 423 FileType OutFileType;
424 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesOption
280 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption; 425 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption;
426 /// see
427 /// anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesThreshold
281 uint32_t RandomizeAndPoolImmediatesThreshold; 428 uint32_t RandomizeAndPoolImmediatesThreshold;
429 /// see anonymous_namespace{IceClFlags.cpp}::MaxNopsPerInstruction
282 int RandomMaxNopsPerInstruction; 430 int RandomMaxNopsPerInstruction;
431 /// see anonymous_namespace{IceClFlags.cpp}::NopProbabilityAsPercentage
283 int RandomNopProbabilityAsPercentage; 432 int RandomNopProbabilityAsPercentage;
433 /// see anonymous_namespace{IceClFlags.cpp}::ReorderFunctionsWindowSize
284 uint32_t ReorderFunctionsWindowSize; 434 uint32_t ReorderFunctionsWindowSize;
435 /// see anonymous_namespace{IceClFlags.cpp}::TargetArch
285 TargetArch TArch; 436 TargetArch TArch;
437 /// see anonymous_namespace{IceClFlags.cpp}::TestStackExtra
286 uint32_t TestStackExtra; 438 uint32_t TestStackExtra;
439 /// see anonymous_namespace{IceClFlags.cpp}::TargetInstructionSet
287 TargetInstructionSet TInstrSet; 440 TargetInstructionSet TInstrSet;
441 /// see anonymous_namespace{IceClFlags.cpp}::VerboseList
288 VerboseMask VMask; 442 VerboseMask VMask;
289 443 /// see anonymous_namespace{IceClFlags.cpp}::DefaultFunctionPrefix
290 IceString DefaultFunctionPrefix; 444 IceString DefaultFunctionPrefix;
445 /// see anonymous_namespace{IceClFlags.cpp}::DefaultGlobalPrefix
291 IceString DefaultGlobalPrefix; 446 IceString DefaultGlobalPrefix;
447 /// see anonymous_namespace{IceClFlags.cpp}::TestPrefix
292 IceString TestPrefix; 448 IceString TestPrefix;
449 /// see anonymous_namespace{IceClFlags.cpp}::TimingFocusOn
293 IceString TimingFocusOn; 450 IceString TimingFocusOn;
451 /// see anonymous_namespace{IceClFlags.cpp}::TranslateOnly
294 IceString TranslateOnly; 452 IceString TranslateOnly;
453 /// see anonymous_namespace{IceClFlags.cpp}::VerboseFocusOn
295 IceString VerboseFocusOn; 454 IceString VerboseFocusOn;
455 /// see anonymous_namespace{IceClFlags.cpp}::NumThreads
296 456
297 size_t NumTranslationThreads; // 0 means completely sequential 457 size_t NumTranslationThreads; // 0 means completely sequential
458 /// see anonymous_namespace{IceClFlags.cpp}::RandomSeed
298 uint64_t RandomSeed; 459 uint64_t RandomSeed;
299 }; 460 };
300 461
301 } // end of namespace Ice 462 } // end of namespace Ice
302 463
303 #endif // SUBZERO_SRC_ICECLFLAGS_H 464 #endif // SUBZERO_SRC_ICECLFLAGS_H
OLDNEW
« no previous file with comments | « no previous file | src/IceClFlagsExtra.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698