Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 class Ice::ClFlags . |
|
Jim Stichnoth
2015/12/17 20:31:07
This comment doesn't seem particularly useful, on
rkotlerimgtec
2015/12/17 22:03:47
The idea is that file may contain the definition o
| |
| 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. | |
|
Jim Stichnoth
2015/12/17 20:31:07
What does "user defined" mean in this context?
rkotlerimgtec
2015/12/17 22:03:48
It means it's not the default one the language sup
| |
| 30 ClFlags() { resetClFlags(*this); } | 32 ClFlags() { resetClFlags(*this); } |
| 31 | 33 |
| 34 /// \brief Parse commmand line options for Subzero | |
|
Jim Stichnoth
2015/12/17 20:31:07
I would be happier if all these \brief description
rkotlerimgtec
2015/12/17 22:03:47
Done.
| |
| 35 /// | |
| 36 /// This is done use cl::ParseCommandLineOptions and the static variables of t ype | |
|
Jim Stichnoth
2015/12/17 20:31:07
s/use/using/ ?
Maybe say cl::ParseCommandLineOpti
rkotlerimgtec
2015/12/17 22:03:48
Done.
| |
| 37 /// cl::opt defined in IceClFlags.cpp | |
|
Jim Stichnoth
2015/12/17 20:31:07
Is there a way to markup IceClFlags.cpp so that a
rkotlerimgtec
2015/12/17 22:03:48
I tried another variant here. Doxygen has lots of
| |
| 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 of type llvm::cl::opt defined in | |
| 44 /// IceClFlags.cpp | |
| 34 static void getParsedClFlags(ClFlags &OutFlags); | 45 static void getParsedClFlags(ClFlags &OutFlags); |
| 46 /// Retrieve the extra configuration options state. | |
| 35 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra); | 47 static void getParsedClFlagsExtra(ClFlagsExtra &OutFlagsExtra); |
| 36 | 48 |
| 37 // bool accessors. | 49 // bool accessors. |
| 38 | 50 |
| 51 /// Get the value of ClFlags::AllowErrorRecovery | |
| 39 bool getAllowErrorRecovery() const { return AllowErrorRecovery; } | 52 bool getAllowErrorRecovery() const { return AllowErrorRecovery; } |
| 53 /// Set ClFlags::AllowErrorRecovery to a new value | |
| 40 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; } | 54 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; } |
| 41 | 55 |
| 56 /// Get the value of ClFlags::AllowExternDefinedSymbols | |
| 42 bool getAllowExternDefinedSymbols() const { | 57 bool getAllowExternDefinedSymbols() const { |
| 43 return AllowExternDefinedSymbols; | 58 return AllowExternDefinedSymbols; |
| 44 } | 59 } |
| 60 /// Set ClFlags::AllowExternDefinedSymbols to a new value | |
| 45 void setAllowExternDefinedSymbols(bool NewValue) { | 61 void setAllowExternDefinedSymbols(bool NewValue) { |
| 46 AllowExternDefinedSymbols = NewValue; | 62 AllowExternDefinedSymbols = NewValue; |
| 47 } | 63 } |
| 48 | 64 |
| 65 /// Get the value of ClFlags::AllowIacaMarks | |
| 49 bool getAllowIacaMarks() const { return AllowIacaMarks; } | 66 bool getAllowIacaMarks() const { return AllowIacaMarks; } |
| 67 /// Set ClFlags::AllowIacaMarks to a new value | |
| 50 void setAllowIacaMarks(bool NewValue) { AllowIacaMarks = NewValue; } | 68 void setAllowIacaMarks(bool NewValue) { AllowIacaMarks = NewValue; } |
| 51 | 69 |
| 70 /// Get the value of ClFlags::AllowUninitializedGlobals | |
| 52 bool getAllowUninitializedGlobals() const { | 71 bool getAllowUninitializedGlobals() const { |
| 53 return AllowUninitializedGlobals; | 72 return AllowUninitializedGlobals; |
| 54 } | 73 } |
| 74 /// Set ClFlags::AllowUninitializedGlobals to a new value | |
| 55 void setAllowUninitializedGlobals(bool NewValue) { | 75 void setAllowUninitializedGlobals(bool NewValue) { |
| 56 AllowUninitializedGlobals = NewValue; | 76 AllowUninitializedGlobals = NewValue; |
| 57 } | 77 } |
| 58 | 78 |
| 79 /// Get the value of ClFlags::DataSections | |
| 59 bool getDataSections() const { return DataSections; } | 80 bool getDataSections() const { return DataSections; } |
| 81 /// Set ClFlags::DataSections to a new value | |
| 60 void setDataSections(bool NewValue) { DataSections = NewValue; } | 82 void setDataSections(bool NewValue) { DataSections = NewValue; } |
| 61 | 83 |
| 84 /// Get the value of ClFlags::DecorateAsm | |
| 62 bool getDecorateAsm() const { return DecorateAsm; } | 85 bool getDecorateAsm() const { return DecorateAsm; } |
| 86 /// Set ClFlags::DecorateAsm to a new value | |
| 63 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; } | 87 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; } |
| 64 | 88 |
| 89 /// Get the value of ClFlags::DisableHybridAssembly | |
| 65 bool getDisableHybridAssembly() const { return DisableHybridAssembly; } | 90 bool getDisableHybridAssembly() const { return DisableHybridAssembly; } |
| 91 /// Set ClFlags::DisableHybridAssembly to a new value | |
| 66 void setDisableHybridAssembly(bool NewValue) { | 92 void setDisableHybridAssembly(bool NewValue) { |
| 67 DisableHybridAssembly = NewValue; | 93 DisableHybridAssembly = NewValue; |
| 68 } | 94 } |
| 69 | 95 |
| 96 /// Get the value of ClFlags::DisableInternal | |
| 70 bool getDisableInternal() const { return DisableInternal; } | 97 bool getDisableInternal() const { return DisableInternal; } |
| 98 /// Set ClFlags::DisableInternal to a new value | |
| 71 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; } | 99 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; } |
| 72 | 100 |
| 101 /// Get the value of ClFlags::DisableTranslation | |
| 73 bool getDisableTranslation() const { return DisableTranslation; } | 102 bool getDisableTranslation() const { return DisableTranslation; } |
| 103 /// Set ClFlags::DisableTranslation to a new value | |
| 74 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; } | 104 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; } |
| 75 | 105 |
| 106 /// Get the value of ClFlags::DumpStats | |
| 76 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; } | 107 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; } |
| 108 /// Set ClFlags::DumpStats to a new value | |
| 77 void setDumpStats(bool NewValue) { DumpStats = NewValue; } | 109 void setDumpStats(bool NewValue) { DumpStats = NewValue; } |
| 78 | 110 |
| 111 /// Get the value of ClFlags::EnableBlockProfile | |
| 79 bool getEnableBlockProfile() const { return EnableBlockProfile; } | 112 bool getEnableBlockProfile() const { return EnableBlockProfile; } |
| 113 /// Set ClFlags::EnableBlockProfile to a new value | |
| 80 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; } | 114 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; } |
| 81 | 115 |
| 116 /// Get the value of ClFlags::ForceMemIntrinOpt | |
| 82 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; } | 117 bool getForceMemIntrinOpt() const { return ForceMemIntrinOpt; } |
| 118 /// Set ClFlags::ForceMemIntrinOpt to a new value | |
| 83 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; } | 119 void setForceMemIntrinOpt(bool NewValue) { ForceMemIntrinOpt = NewValue; } |
| 84 | 120 |
| 121 /// Get the value of ClFlags::FunctionSections | |
| 85 bool getFunctionSections() const { return FunctionSections; } | 122 bool getFunctionSections() const { return FunctionSections; } |
| 123 /// Set ClFlags::FunctionSections to a new value | |
| 86 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } | 124 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } |
| 87 | 125 |
| 126 /// \brief Get the value of ClFlags::GenerateUnitTestMessages | |
| 127 /// | |
| 128 /// Note: If dump routines have been turned off, the error messages | |
| 129 /// will not be readable. Hence, turn off. | |
| 88 bool getGenerateUnitTestMessages() const { | 130 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; | 131 return !BuildDefs::dump() || GenerateUnitTestMessages; |
| 92 } | 132 } |
| 133 /// Set ClFlags::GenerateUnitTestMessages to a new value | |
| 93 void setGenerateUnitTestMessages(bool NewValue) { | 134 void setGenerateUnitTestMessages(bool NewValue) { |
| 94 GenerateUnitTestMessages = NewValue; | 135 GenerateUnitTestMessages = NewValue; |
| 95 } | 136 } |
| 96 | 137 |
| 138 /// Get the value of ClFlags::MockBoundsCheck | |
| 97 bool getMockBoundsCheck() const { return MockBoundsCheck; } | 139 bool getMockBoundsCheck() const { return MockBoundsCheck; } |
| 140 /// Set ClFlags::MockBoundsCheck to a new value | |
| 98 void setMockBoundsCheck(bool NewValue) { MockBoundsCheck = NewValue; } | 141 void setMockBoundsCheck(bool NewValue) { MockBoundsCheck = NewValue; } |
| 99 | 142 |
| 143 /// Get the value of ClFlags::PhiEdgeSplit | |
| 100 bool getPhiEdgeSplit() const { return PhiEdgeSplit; } | 144 bool getPhiEdgeSplit() const { return PhiEdgeSplit; } |
| 145 /// Set ClFlags::PhiEdgeSplit to a new value | |
| 101 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; } | 146 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; } |
| 102 | 147 |
| 148 /// Get the value of ClFlags::RandomNopInsertion | |
| 103 bool shouldDoNopInsertion() const { return RandomNopInsertion; } | 149 bool shouldDoNopInsertion() const { return RandomNopInsertion; } |
| 150 /// Set ClFlags::RandomNopInsertion to a new value | |
| 104 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; } | 151 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; } |
| 105 | 152 |
| 153 /// Get the value of ClFlags::RandomRegAlloc | |
| 106 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; } | 154 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; } |
| 155 /// Set ClFlags::RandomRegAlloc to a new value | |
| 107 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; } | 156 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; } |
| 108 | 157 |
| 158 /// Get the value of ClFlags::RepeatRegAlloc | |
| 109 bool shouldRepeatRegAlloc() const { return RepeatRegAlloc; } | 159 bool shouldRepeatRegAlloc() const { return RepeatRegAlloc; } |
| 160 /// Set ClFlags::RepeatRegAlloc to a new value | |
| 110 void setShouldRepeatRegAlloc(bool NewValue) { RepeatRegAlloc = NewValue; } | 161 void setShouldRepeatRegAlloc(bool NewValue) { RepeatRegAlloc = NewValue; } |
| 111 | 162 |
| 163 /// Get the value of ClFlags::SkipUnimplemented | |
| 112 bool getSkipUnimplemented() const { return SkipUnimplemented; } | 164 bool getSkipUnimplemented() const { return SkipUnimplemented; } |
| 165 /// Set ClFlags::SkipUnimplemented to a new value | |
| 113 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; } | 166 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; } |
| 114 | 167 |
| 168 /// Get the value of ClFlags::SubzeroTimingEnabled | |
| 115 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; } | 169 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; } |
| 170 /// Set ClFlags::SubzeroTimingEnableds to a new value | |
| 116 void setSubzeroTimingEnabled(bool NewValue) { | 171 void setSubzeroTimingEnabled(bool NewValue) { |
| 117 SubzeroTimingEnabled = NewValue; | 172 SubzeroTimingEnabled = NewValue; |
| 118 } | 173 } |
| 119 | 174 |
| 175 /// Get the value of ClFlags::TimeEachFunction | |
| 120 bool getTimeEachFunction() const { | 176 bool getTimeEachFunction() const { |
| 121 return BuildDefs::dump() && TimeEachFunction; | 177 return BuildDefs::dump() && TimeEachFunction; |
| 122 } | 178 } |
| 179 /// Set ClFlags::TimeEachFunction to a new value | |
| 123 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } | 180 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } |
| 124 | 181 |
| 182 /// Get the value of ClFlags::UseSandboxing | |
| 125 bool getUseSandboxing() const { return UseSandboxing; } | 183 bool getUseSandboxing() const { return UseSandboxing; } |
| 184 /// Set ClFlags::UseSandboxing to a new value | |
| 126 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } | 185 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } |
| 127 | 186 |
| 128 // Enum and integer accessors. | 187 // Enum and integer accessors. |
| 188 /// Get the value of ClFlags::Opt | |
| 129 OptLevel getOptLevel() const { return Opt; } | 189 OptLevel getOptLevel() const { return Opt; } |
| 190 /// Set ClFlags::Opt to a new value | |
| 130 void setOptLevel(OptLevel NewValue) { Opt = NewValue; } | 191 void setOptLevel(OptLevel NewValue) { Opt = NewValue; } |
| 131 | 192 |
| 193 /// Get the value of ClFlags::OutFileType | |
| 132 FileType getOutFileType() const { return OutFileType; } | 194 FileType getOutFileType() const { return OutFileType; } |
| 195 /// Set ClFlags::OutFileType to a new value | |
| 133 void setOutFileType(FileType NewValue) { OutFileType = NewValue; } | 196 void setOutFileType(FileType NewValue) { OutFileType = NewValue; } |
| 134 | 197 |
| 198 /// Get the value of ClFlags::RandomMaxNopsPerInstruction | |
| 135 int getMaxNopsPerInstruction() const { return RandomMaxNopsPerInstruction; } | 199 int getMaxNopsPerInstruction() const { return RandomMaxNopsPerInstruction; } |
| 200 /// Set ClFlags::RandomMaxNopsPerInstruction to a new value | |
| 136 void setMaxNopsPerInstruction(int NewValue) { | 201 void setMaxNopsPerInstruction(int NewValue) { |
| 137 RandomMaxNopsPerInstruction = NewValue; | 202 RandomMaxNopsPerInstruction = NewValue; |
| 138 } | 203 } |
| 139 | 204 |
| 205 /// Get the value of ClFlags::RandomNopProbabilityAsPercentage | |
| 140 int getNopProbabilityAsPercentage() const { | 206 int getNopProbabilityAsPercentage() const { |
| 141 return RandomNopProbabilityAsPercentage; | 207 return RandomNopProbabilityAsPercentage; |
| 142 } | 208 } |
| 209 /// Set ClFlags::RandomNopProbabilityAsPercentage to a new value | |
| 143 void setNopProbabilityAsPercentage(int NewValue) { | 210 void setNopProbabilityAsPercentage(int NewValue) { |
| 144 RandomNopProbabilityAsPercentage = NewValue; | 211 RandomNopProbabilityAsPercentage = NewValue; |
| 145 } | 212 } |
| 146 | 213 |
| 214 /// Get the value of ClFlags::TArch | |
| 147 TargetArch getTargetArch() const { return TArch; } | 215 TargetArch getTargetArch() const { return TArch; } |
| 216 /// Set ClFlags::TArch to a new value | |
| 148 void setTargetArch(TargetArch NewValue) { TArch = NewValue; } | 217 void setTargetArch(TargetArch NewValue) { TArch = NewValue; } |
| 149 | 218 |
| 219 /// Get the value of ClFlags::TInstrSet | |
| 150 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; } | 220 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; } |
| 221 /// Set ClFlags::TInstrSet to a new value | |
| 151 void setTargetInstructionSet(TargetInstructionSet NewValue) { | 222 void setTargetInstructionSet(TargetInstructionSet NewValue) { |
| 152 TInstrSet = NewValue; | 223 TInstrSet = NewValue; |
| 153 } | 224 } |
| 225 | |
| 226 /// \brief Get the value of ClFlags::TestStackExtra | |
| 227 /// | |
| 228 /// Always 0 if BuildDefs::minimal() | |
| 154 uint32_t getTestStackExtra() const { | 229 uint32_t getTestStackExtra() const { |
| 155 return BuildDefs::minimal() ? 0 : TestStackExtra; | 230 return BuildDefs::minimal() ? 0 : TestStackExtra; |
| 156 } | 231 } |
| 232 /// \brief Set ClFlags::TestStackExtra to a new value | |
| 233 /// | |
| 234 /// Always 0 if BuildDefs::minimal() | |
| 157 void setTestStackExtra(uint32_t NewValue) { | 235 void setTestStackExtra(uint32_t NewValue) { |
| 158 if (BuildDefs::minimal()) | 236 if (BuildDefs::minimal()) |
| 159 return; | 237 return; |
| 160 TestStackExtra = NewValue; | 238 TestStackExtra = NewValue; |
| 161 } | 239 } |
| 162 | 240 |
| 241 /// \brief Get the value of ClFlags::VMask | |
| 242 /// | |
| 243 /// None if BuildDefs::dump() | |
| 163 VerboseMask getVerbose() const { | 244 VerboseMask getVerbose() const { |
| 164 return BuildDefs::dump() ? VMask : (VerboseMask)IceV_None; | 245 return BuildDefs::dump() ? VMask : (VerboseMask)IceV_None; |
| 165 } | 246 } |
| 247 /// \brief Set ClFlags::VMask to a new value | |
| 248 /// | |
| 249 /// None if BuildDefs::dump() | |
| 166 void setVerbose(VerboseMask NewValue) { VMask = NewValue; } | 250 void setVerbose(VerboseMask NewValue) { VMask = NewValue; } |
| 167 | 251 |
| 252 /// Set ClFlags::RandomizeAndPoolImmediatesOption to a new value | |
| 168 void | 253 void |
| 169 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) { | 254 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) { |
| 170 RandomizeAndPoolImmediatesOption = Option; | 255 RandomizeAndPoolImmediatesOption = Option; |
| 171 } | 256 } |
| 257 /// Get the value of ClFlags::RandomizeAndPoolImmediatesOption | |
| 172 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const { | 258 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const { |
| 173 return RandomizeAndPoolImmediatesOption; | 259 return RandomizeAndPoolImmediatesOption; |
| 174 } | 260 } |
| 175 | 261 |
| 262 /// Set ClFlags::RandomizeAndPoolImmediatesThreshold to a new value | |
| 176 void setRandomizeAndPoolImmediatesThreshold(uint32_t Threshold) { | 263 void setRandomizeAndPoolImmediatesThreshold(uint32_t Threshold) { |
| 177 RandomizeAndPoolImmediatesThreshold = Threshold; | 264 RandomizeAndPoolImmediatesThreshold = Threshold; |
| 178 } | 265 } |
| 266 /// Get the value of ClFlags::RandomizeAndPoolImmediatesThreshold | |
| 179 uint32_t getRandomizeAndPoolImmediatesThreshold() const { | 267 uint32_t getRandomizeAndPoolImmediatesThreshold() const { |
| 180 return RandomizeAndPoolImmediatesThreshold; | 268 return RandomizeAndPoolImmediatesThreshold; |
| 181 } | 269 } |
| 182 | 270 |
| 271 /// Get the value of ClFlags::ReorderBasicBlocks | |
| 183 bool shouldReorderBasicBlocks() const { return ReorderBasicBlocks; } | 272 bool shouldReorderBasicBlocks() const { return ReorderBasicBlocks; } |
| 273 /// Set ClFlags::ReorderBasicBlocks to a new value | |
| 184 void setShouldReorderBasicBlocks(bool NewValue) { | 274 void setShouldReorderBasicBlocks(bool NewValue) { |
| 185 ReorderBasicBlocks = NewValue; | 275 ReorderBasicBlocks = NewValue; |
| 186 } | 276 } |
| 187 | 277 |
| 278 /// Set ClFlags::ReorderFunctions to a new value | |
| 188 void setShouldReorderFunctions(bool Option) { ReorderFunctions = Option; } | 279 void setShouldReorderFunctions(bool Option) { ReorderFunctions = Option; } |
| 280 /// Get the value of ClFlags::ReorderFunctions | |
| 189 bool shouldReorderFunctions() const { return ReorderFunctions; } | 281 bool shouldReorderFunctions() const { return ReorderFunctions; } |
| 190 | 282 |
| 283 /// Set ClFlags::ReorderFunctionsWindowSize to a new value | |
| 191 void setReorderFunctionsWindowSize(uint32_t Size) { | 284 void setReorderFunctionsWindowSize(uint32_t Size) { |
| 192 ReorderFunctionsWindowSize = Size; | 285 ReorderFunctionsWindowSize = Size; |
| 193 } | 286 } |
| 287 /// Get the value of ClFlags::ReorderFunctionsWindowSize | |
| 194 uint32_t getReorderFunctionsWindowSize() const { | 288 uint32_t getReorderFunctionsWindowSize() const { |
| 195 return ReorderFunctionsWindowSize; | 289 return ReorderFunctionsWindowSize; |
| 196 } | 290 } |
| 197 | 291 |
| 292 /// Set ClFlags::ReorderGlobalVariables to a new value | |
| 198 void setShouldReorderGlobalVariables(bool Option) { | 293 void setShouldReorderGlobalVariables(bool Option) { |
| 199 ReorderGlobalVariables = Option; | 294 ReorderGlobalVariables = Option; |
| 200 } | 295 } |
| 296 /// Get the value of ClFlags::ReorderGlobalVariables | |
| 201 bool shouldReorderGlobalVariables() const { return ReorderGlobalVariables; } | 297 bool shouldReorderGlobalVariables() const { return ReorderGlobalVariables; } |
| 202 | 298 |
| 299 /// Set ClFlags::ReorderPooledConstants to a new value | |
| 203 void setShouldReorderPooledConstants(bool Option) { | 300 void setShouldReorderPooledConstants(bool Option) { |
| 204 ReorderPooledConstants = Option; | 301 ReorderPooledConstants = Option; |
| 205 } | 302 } |
| 303 /// Get the value of ClFlags::ReorderPooledConstants | |
| 206 bool shouldReorderPooledConstants() const { return ReorderPooledConstants; } | 304 bool shouldReorderPooledConstants() const { return ReorderPooledConstants; } |
| 207 | 305 |
| 208 // IceString accessors. | 306 // IceString accessors. |
| 209 | 307 |
| 308 /// Get the value of ClFlags::DefaultFunctionPrefix | |
| 210 const IceString &getDefaultFunctionPrefix() const { | 309 const IceString &getDefaultFunctionPrefix() const { |
| 211 return DefaultFunctionPrefix; | 310 return DefaultFunctionPrefix; |
| 212 } | 311 } |
| 312 /// Set ClFlags::DefaultFunctionPrefix to a new value | |
| 213 void setDefaultFunctionPrefix(const IceString &NewValue) { | 313 void setDefaultFunctionPrefix(const IceString &NewValue) { |
| 214 DefaultFunctionPrefix = NewValue; | 314 DefaultFunctionPrefix = NewValue; |
| 215 } | 315 } |
| 216 | 316 |
| 317 /// Get the value of ClFlags::DefaultGlobalPrefix | |
| 217 const IceString &getDefaultGlobalPrefix() const { | 318 const IceString &getDefaultGlobalPrefix() const { |
| 218 return DefaultGlobalPrefix; | 319 return DefaultGlobalPrefix; |
| 219 } | 320 } |
| 321 /// Set ClFlags::DefaultGlobalPrefix to a new value | |
| 220 void setDefaultGlobalPrefix(const IceString &NewValue) { | 322 void setDefaultGlobalPrefix(const IceString &NewValue) { |
| 221 DefaultGlobalPrefix = NewValue; | 323 DefaultGlobalPrefix = NewValue; |
| 222 } | 324 } |
| 223 | 325 |
| 326 /// Get the value of ClFlags::TestPrefix | |
| 224 const IceString &getTestPrefix() const { return TestPrefix; } | 327 const IceString &getTestPrefix() const { return TestPrefix; } |
| 328 /// Set ClFlags::TestPrefix to a new value | |
| 225 void setTestPrefix(const IceString &NewValue) { TestPrefix = NewValue; } | 329 void setTestPrefix(const IceString &NewValue) { TestPrefix = NewValue; } |
| 226 | 330 |
| 331 /// Get the value of ClFlags::TimingFocusOn | |
| 227 const IceString &getTimingFocusOn() const { return TimingFocusOn; } | 332 const IceString &getTimingFocusOn() const { return TimingFocusOn; } |
| 333 /// Set ClFlags::TimingFocusOn to a new value | |
| 228 void setTimingFocusOn(const IceString &NewValue) { TimingFocusOn = NewValue; } | 334 void setTimingFocusOn(const IceString &NewValue) { TimingFocusOn = NewValue; } |
| 229 | 335 |
| 336 /// Get the value of ClFlags::TranslateOnly | |
| 230 const IceString &getTranslateOnly() const { return TranslateOnly; } | 337 const IceString &getTranslateOnly() const { return TranslateOnly; } |
| 338 /// Set ClFlags::TranslateOnly to a new value | |
| 231 void setTranslateOnly(const IceString &NewValue) { TranslateOnly = NewValue; } | 339 void setTranslateOnly(const IceString &NewValue) { TranslateOnly = NewValue; } |
| 232 | 340 |
| 341 /// Get the value of ClFlags::VerboseFocusOn | |
| 233 const IceString &getVerboseFocusOn() const { return VerboseFocusOn; } | 342 const IceString &getVerboseFocusOn() const { return VerboseFocusOn; } |
| 343 /// Set ClFlags::VerboseFocusOns to a new value | |
| 234 void setVerboseFocusOn(const IceString &NewValue) { | 344 void setVerboseFocusOn(const IceString &NewValue) { |
| 235 VerboseFocusOn = NewValue; | 345 VerboseFocusOn = NewValue; |
| 236 } | 346 } |
| 237 | 347 |
| 238 // size_t and 64-bit accessors. | 348 // size_t and 64-bit accessors. |
| 239 | 349 |
| 350 /// Get the value of ClFlags::NumTranslationThreads | |
| 240 size_t getNumTranslationThreads() const { return NumTranslationThreads; } | 351 size_t getNumTranslationThreads() const { return NumTranslationThreads; } |
| 241 bool isSequential() const { return NumTranslationThreads == 0; } | 352 bool isSequential() const { return NumTranslationThreads == 0; } |
| 353 /// Set ClFlags::NumTranslationThreads to a new value | |
| 242 void setNumTranslationThreads(size_t NewValue) { | 354 void setNumTranslationThreads(size_t NewValue) { |
| 243 NumTranslationThreads = NewValue; | 355 NumTranslationThreads = NewValue; |
| 244 } | 356 } |
| 245 | 357 |
| 358 /// Get the value of ClFlags::RandomSeed | |
| 246 uint64_t getRandomSeed() const { return RandomSeed; } | 359 uint64_t getRandomSeed() const { return RandomSeed; } |
| 360 /// Set ClFlags::RandomSeed to a new value | |
| 247 void setRandomSeed(size_t NewValue) { RandomSeed = NewValue; } | 361 void setRandomSeed(size_t NewValue) { RandomSeed = NewValue; } |
| 248 | 362 |
| 249 private: | 363 private: |
| 364 /// see anonymous_namespace{IceClFlags.cpp}::AllowErrorRecovery | |
| 250 bool AllowErrorRecovery; | 365 bool AllowErrorRecovery; |
| 366 /// see anonymous_namespace{IceClFlags.cpp}::AllowExternDefinedSymbols | |
| 251 bool AllowExternDefinedSymbols; | 367 bool AllowExternDefinedSymbols; |
| 368 /// see anonymous_namespace{IceClFlags.cpp}::AllowIacaMarks | |
| 252 bool AllowIacaMarks; | 369 bool AllowIacaMarks; |
| 370 /// see anonymous_namespace{IceClFlags.cpp}::AllowUninitializedGlobals | |
| 253 bool AllowUninitializedGlobals; | 371 bool AllowUninitializedGlobals; |
| 372 /// see anonymous_namespace{IceClFlags.cpp}::DataSections | |
| 254 bool DataSections; | 373 bool DataSections; |
| 374 /// see anonymous_namespace{IceClFlags.cpp}::DecorateAsm | |
| 255 bool DecorateAsm; | 375 bool DecorateAsm; |
| 376 /// see anonymous_namespace{IceClFlags.cpp}::DisableHybridAssembly | |
| 256 bool DisableHybridAssembly; | 377 bool DisableHybridAssembly; |
| 378 /// see anonymous_namespace{IceClFlags.cpp}::DisableInternal | |
| 257 bool DisableInternal; | 379 bool DisableInternal; |
| 380 /// see anonymous_namespace{IceClFlags.cpp}::DisableTranslation | |
| 258 bool DisableTranslation; | 381 bool DisableTranslation; |
| 382 /// see anonymous_namespace{IceClFlags.cpp}::DumpStats | |
| 259 bool DumpStats; | 383 bool DumpStats; |
| 384 /// see anonymous_namespace{IceClFlags.cpp}::EnableBlockProfile | |
| 260 bool EnableBlockProfile; | 385 bool EnableBlockProfile; |
| 386 /// see anonymous_namespace{IceClFlags.cpp}::ForceMemIntrinOpt | |
| 261 bool ForceMemIntrinOpt; | 387 bool ForceMemIntrinOpt; |
| 388 /// see anonymous_namespace{IceClFlags.cpp}::FunctionSections | |
| 262 bool FunctionSections; | 389 bool FunctionSections; |
| 390 /// Always false. | |
|
Jim Stichnoth
2015/12/17 20:31:07
I don't think so:
unittest/BitcodeMunge.cpp: Fla
rkotlerimgtec
2015/12/17 22:03:47
Done.
| |
| 263 bool GenerateUnitTestMessages; | 391 bool GenerateUnitTestMessages; |
| 392 /// see anonymous_namespace{IceClFlags.cpp}::MockBoundsCheck | |
| 264 bool MockBoundsCheck; | 393 bool MockBoundsCheck; |
| 394 /// see anonymous_namespace{IceClFlags.cpp}::EnablePhiEdgeSplit | |
| 265 bool PhiEdgeSplit; | 395 bool PhiEdgeSplit; |
| 396 /// see anonymous_namespace{IceClFlags.cpp}::ShouldDoNopInsertion | |
| 266 bool RandomNopInsertion; | 397 bool RandomNopInsertion; |
| 398 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeRegisterAllocation | |
| 267 bool RandomRegAlloc; | 399 bool RandomRegAlloc; |
| 400 /// see anonymous_namespace{IceClFlags.cpp}::RepeatRegAlloc | |
| 268 bool RepeatRegAlloc; | 401 bool RepeatRegAlloc; |
| 402 /// see anonymous_namespace{IceClFlags.cpp}::ReorderBasicBlocks | |
| 269 bool ReorderBasicBlocks; | 403 bool ReorderBasicBlocks; |
| 404 /// see anonymous_namespace{IceClFlags.cpp}::ReorderFunctions | |
| 270 bool ReorderFunctions; | 405 bool ReorderFunctions; |
| 406 /// see anonymous_namespace{IceClFlags.cpp}::ReorderGlobalVariables | |
| 271 bool ReorderGlobalVariables; | 407 bool ReorderGlobalVariables; |
| 408 /// see anonymous_namespace{IceClFlags.cpp}::ReorderPooledConstants | |
| 272 bool ReorderPooledConstants; | 409 bool ReorderPooledConstants; |
| 410 /// see anonymous_namespace{IceClFlags.cpp}::SkipUnimplemented | |
| 273 bool SkipUnimplemented; | 411 bool SkipUnimplemented; |
| 412 /// see anonymous_namespace{IceClFlags.cpp}::SubzeroTimingEnabled | |
| 274 bool SubzeroTimingEnabled; | 413 bool SubzeroTimingEnabled; |
| 414 /// see anonymous_namespace{IceClFlags.cpp}::TimeEachFunction | |
| 275 bool TimeEachFunction; | 415 bool TimeEachFunction; |
| 416 /// see anonymous_namespace{IceClFlags.cpp}::UseSandboxing | |
| 276 bool UseSandboxing; | 417 bool UseSandboxing; |
| 277 | 418 /// see anonymous_namespace{IceClFlags.cpp}::OLevel |
| 278 OptLevel Opt; | 419 OptLevel Opt; |
| 420 /// see anonymous_namespace{IceClFlags.cpp}::OutFileType | |
| 279 FileType OutFileType; | 421 FileType OutFileType; |
| 422 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesOption | |
| 280 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption; | 423 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption; |
| 424 /// see anonymous_namespace{IceClFlags.cpp}::RandomizeAndPoolImmediatesThresho ld | |
|
Jim Stichnoth
2015/12/17 20:31:07
80-col
rkotlerimgtec
2015/12/17 22:03:47
Done.
| |
| 281 uint32_t RandomizeAndPoolImmediatesThreshold; | 425 uint32_t RandomizeAndPoolImmediatesThreshold; |
| 426 /// Always 0 | |
|
Jim Stichnoth
2015/12/17 20:31:07
I think pnacl-sz -max-nops-per-instruction=123 cha
rkotlerimgtec
2015/12/17 22:03:48
Done.
| |
| 282 int RandomMaxNopsPerInstruction; | 427 int RandomMaxNopsPerInstruction; |
| 428 /// Always 0 | |
|
Jim Stichnoth
2015/12/17 20:31:07
Same as above, I think there's another command-lin
rkotlerimgtec
2015/12/17 22:03:48
Done.
| |
| 283 int RandomNopProbabilityAsPercentage; | 429 int RandomNopProbabilityAsPercentage; |
| 430 /// see anonymous_namespace{IceClFlags.cpp}::ReorderFunctionsWindowSize | |
| 284 uint32_t ReorderFunctionsWindowSize; | 431 uint32_t ReorderFunctionsWindowSize; |
| 432 /// see anonymous_namespace{IceClFlags.cpp}::TargetArch | |
| 285 TargetArch TArch; | 433 TargetArch TArch; |
| 434 /// see anonymous_namespace{IceClFlags.cpp}::TestStackExtra | |
| 286 uint32_t TestStackExtra; | 435 uint32_t TestStackExtra; |
| 436 /// see anonymous_namespace{IceClFlags.cpp}::TargetInstructionSet | |
| 287 TargetInstructionSet TInstrSet; | 437 TargetInstructionSet TInstrSet; |
| 438 /// see anonymous_namespace{IceClFlags.cpp}::VerboseList | |
| 288 VerboseMask VMask; | 439 VerboseMask VMask; |
| 289 | 440 /// see anonymous_namespace{IceClFlags.cpp}::DefaultFunctionPrefix |
| 290 IceString DefaultFunctionPrefix; | 441 IceString DefaultFunctionPrefix; |
| 442 /// see anonymous_namespace{IceClFlags.cpp}::DefaultGlobalPrefix | |
| 291 IceString DefaultGlobalPrefix; | 443 IceString DefaultGlobalPrefix; |
| 444 /// see anonymous_namespace{IceClFlags.cpp}::TestPrefix | |
| 292 IceString TestPrefix; | 445 IceString TestPrefix; |
| 446 /// see anonymous_namespace{IceClFlags.cpp}::TimingFocusOn | |
| 293 IceString TimingFocusOn; | 447 IceString TimingFocusOn; |
| 448 /// see anonymous_namespace{IceClFlags.cpp}::TranslateOnly | |
| 294 IceString TranslateOnly; | 449 IceString TranslateOnly; |
| 450 /// see anonymous_namespace{IceClFlags.cpp}::VerboseFocusOn | |
| 295 IceString VerboseFocusOn; | 451 IceString VerboseFocusOn; |
| 452 /// see anonymous_namespace{IceClFlags.cpp}::NumThreads | |
| 296 | 453 |
| 297 size_t NumTranslationThreads; // 0 means completely sequential | 454 size_t NumTranslationThreads; // 0 means completely sequential |
| 455 /// see anonymous_namespace{IceClFlags.cpp}::RandomSeed | |
| 298 uint64_t RandomSeed; | 456 uint64_t RandomSeed; |
| 299 }; | 457 }; |
| 300 | 458 |
| 301 } // end of namespace Ice | 459 } // end of namespace Ice |
| 302 | 460 |
| 303 #endif // SUBZERO_SRC_ICECLFLAGS_H | 461 #endif // SUBZERO_SRC_ICECLFLAGS_H |
| OLD | NEW |