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 // This file declares command line flags controlling translation. | 10 // This file declares command line flags controlling translation. |
| 11 // | 11 // |
| 12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
| 13 | 13 |
| 14 #ifndef SUBZERO_SRC_ICECLFLAGS_H | 14 #ifndef SUBZERO_SRC_ICECLFLAGS_H |
| 15 #define SUBZERO_SRC_ICECLFLAGS_H | 15 #define SUBZERO_SRC_ICECLFLAGS_H |
| 16 | 16 |
| 17 #include "IceTypes.def" | 17 #include "IceTypes.def" |
| 18 | 18 |
| 19 namespace Ice { | 19 namespace Ice { |
| 20 | 20 |
| 21 class ClFlags { | 21 class ClFlags { |
|
Jim Stichnoth
2015/02/05 22:30:09
Since this is becoming a proper class, disable def
Karl
2015/02/05 23:57:38
Done.
| |
| 22 public: | 22 public: |
| 23 ClFlags() | 23 ClFlags() |
| 24 : DisableInternal(false), SubzeroTimingEnabled(false), | 24 : DisableInternal(false), SubzeroTimingEnabled(false), |
| 25 DisableTranslation(false), FunctionSections(false), DataSections(false), | 25 DisableTranslation(false), FunctionSections(false), DataSections(false), |
| 26 UseELFWriter(false), UseIntegratedAssembler(false), | 26 UseELFWriter(false), UseIntegratedAssembler(false), |
| 27 UseSandboxing(false), PhiEdgeSplit(false), DecorateAsm(false), | 27 UseSandboxing(false), PhiEdgeSplit(false), DecorateAsm(false), |
| 28 DumpStats(false), AllowUninitializedGlobals(false), | 28 DumpStats(false), AllowUninitializedGlobals(false), |
| 29 TimeEachFunction(false), DisableIRGeneration(false), | 29 TimeEachFunction(false), DisableIRGeneration(false), |
| 30 AllowErrorRecovery(false), StubConstantCalls(false), | 30 AllowErrorRecovery(false), StubConstantCalls(false), |
| 31 GenerateUnitTestMessages(false), NumTranslationThreads(0), | 31 GenerateUnitTestMessages(false), NumTranslationThreads(0), |
| 32 DefaultGlobalPrefix(""), DefaultFunctionPrefix(""), TimingFocusOn(""), | 32 DefaultGlobalPrefix(""), DefaultFunctionPrefix(""), TimingFocusOn(""), |
| 33 VerboseFocusOn(""), TranslateOnly("") {} | 33 VerboseFocusOn(""), TranslateOnly("") {} |
| 34 | |
| 35 bool getDisableInternal() const { return DisableInternal; } | |
| 36 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; } | |
| 37 | |
| 38 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; } | |
| 39 void setSubzeroTimingEnabled(bool NewValue) { | |
| 40 SubzeroTimingEnabled = NewValue; | |
| 41 } | |
| 42 | |
| 43 bool getDisableTranslation() const { return DisableTranslation; } | |
| 44 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; } | |
| 45 | |
| 46 bool getFunctionSections() const { return FunctionSections; } | |
| 47 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } | |
| 48 | |
| 49 bool getDataSections() const { return DataSections; } | |
| 50 void setDataSections(bool NewValue) { DataSections = NewValue; } | |
| 51 | |
| 52 bool getUseELFWriter() const { return UseELFWriter; } | |
| 53 void setUseELFWriter(bool NewValue) { UseELFWriter = NewValue; } | |
| 54 | |
| 55 bool getUseIntegratedAssembler() const { return UseIntegratedAssembler; } | |
| 56 void setUseIntegratedAssembler(bool NewValue) { | |
| 57 UseIntegratedAssembler = NewValue; | |
| 58 } | |
| 59 | |
| 60 bool getUseSandboxing() const { return UseSandboxing; } | |
| 61 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } | |
| 62 | |
| 63 bool getPhiEdgeSplit() const { return PhiEdgeSplit; } | |
| 64 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; } | |
| 65 | |
| 66 bool getDecorateAsm() const { return DecorateAsm; } | |
| 67 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; } | |
| 68 | |
| 69 bool getDumpStats() const { return DumpStats; } | |
| 70 void setDumpStats(bool NewValue) { DumpStats = NewValue; } | |
| 71 | |
| 72 bool getAllowUninitializedGlobals() const { | |
| 73 return AllowUninitializedGlobals; | |
| 74 } | |
| 75 void setAllowUninitializedGlobals(bool NewValue) { | |
| 76 AllowUninitializedGlobals = NewValue; | |
| 77 } | |
| 78 | |
| 79 bool getTimeEachFunction() const { return TimeEachFunction; } | |
| 80 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } | |
| 81 | |
| 82 bool getDisableIRGeneration() const { return DisableIRGeneration; } | |
| 83 void setDisableIRGeneration(bool NewValue) { DisableIRGeneration = NewValue; } | |
| 84 | |
| 85 bool getAllowErrorRecovery() const { return AllowErrorRecovery; } | |
| 86 void setAllowErrorRecovery(bool NewValue) { AllowErrorRecovery = NewValue; } | |
| 87 | |
| 88 bool getStubConstantCalls() const { | |
| 89 return IS_MINIMAL_BUILD ? false : StubConstantCalls; | |
|
Jim Stichnoth
2015/02/05 22:30:09
Stylistically, I'd prefer:
return !IS_MINIMAL_BU
Karl
2015/02/05 23:57:38
Done.
| |
| 90 } | |
| 91 void setStubConstantCalls(bool NewValue) { StubConstantCalls = NewValue; } | |
| 92 | |
| 93 bool getGenerateUnitTestMessages() const { return GenerateUnitTestMessages; } | |
| 94 void setGenerateUnitTestMessages(bool NewValue) { | |
| 95 GenerateUnitTestMessages = NewValue; | |
| 96 } | |
| 97 | |
| 98 size_t getNumTranslationThreads() const { return NumTranslationThreads; } | |
| 99 void setNumTranslationThreads(size_t NewValue) { | |
| 100 NumTranslationThreads = NewValue; | |
| 101 } | |
| 102 | |
| 103 const IceString &getDefaultGlobalPrefix() const { | |
| 104 return DefaultGlobalPrefix; | |
| 105 } | |
| 106 void setDefaultGlobalPrefix(const IceString &NewValue) { | |
| 107 DefaultGlobalPrefix = NewValue; | |
| 108 } | |
| 109 | |
| 110 const IceString &getDefaultFunctionPrefix() const { | |
| 111 return DefaultFunctionPrefix; | |
| 112 } | |
| 113 void setDefaultFunctionPrefix(const IceString &NewValue) { | |
| 114 DefaultFunctionPrefix = NewValue; | |
| 115 } | |
| 116 | |
| 117 const IceString &getTimingFocusOn() const { return TimingFocusOn; } | |
| 118 void setTimingFocusOn(const IceString &NewValue) { TimingFocusOn = NewValue; } | |
| 119 | |
| 120 const IceString &getVerboseFocusOn() const { return VerboseFocusOn; } | |
| 121 void setVerboseFocusOn(const IceString &NewValue) { | |
| 122 VerboseFocusOn = NewValue; | |
| 123 } | |
| 124 | |
| 125 const IceString &getTranslateOnly() const { return TranslateOnly; } | |
| 126 void setTranslateOnly(const IceString &NewValue) { TranslateOnly = NewValue; } | |
| 127 | |
| 128 private: | |
| 34 bool DisableInternal; | 129 bool DisableInternal; |
|
Jim Stichnoth
2015/02/05 22:30:09
While you're here, could you alphabetically sort t
Karl
2015/02/05 23:57:38
Done.
| |
| 35 bool SubzeroTimingEnabled; | 130 bool SubzeroTimingEnabled; |
| 36 bool DisableTranslation; | 131 bool DisableTranslation; |
| 37 bool FunctionSections; | 132 bool FunctionSections; |
| 38 bool DataSections; | 133 bool DataSections; |
| 39 bool UseELFWriter; | 134 bool UseELFWriter; |
| 40 bool UseIntegratedAssembler; | 135 bool UseIntegratedAssembler; |
| 41 bool UseSandboxing; | 136 bool UseSandboxing; |
| 42 bool PhiEdgeSplit; | 137 bool PhiEdgeSplit; |
| 43 bool DecorateAsm; | 138 bool DecorateAsm; |
| 44 bool DumpStats; | 139 bool DumpStats; |
| 45 bool AllowUninitializedGlobals; | 140 bool AllowUninitializedGlobals; |
| 46 bool TimeEachFunction; | 141 bool TimeEachFunction; |
| 47 bool DisableIRGeneration; | 142 bool DisableIRGeneration; |
| 48 bool AllowErrorRecovery; | 143 bool AllowErrorRecovery; |
| 49 bool StubConstantCalls; | 144 bool StubConstantCalls; |
| 50 bool GenerateUnitTestMessages; | 145 bool GenerateUnitTestMessages; |
| 51 size_t NumTranslationThreads; // 0 means completely sequential | 146 size_t NumTranslationThreads; // 0 means completely sequential |
| 52 IceString DefaultGlobalPrefix; | 147 IceString DefaultGlobalPrefix; |
| 53 IceString DefaultFunctionPrefix; | 148 IceString DefaultFunctionPrefix; |
| 54 IceString TimingFocusOn; | 149 IceString TimingFocusOn; |
| 55 IceString VerboseFocusOn; | 150 IceString VerboseFocusOn; |
| 56 IceString TranslateOnly; | 151 IceString TranslateOnly; |
| 57 }; | 152 }; |
| 58 | 153 |
| 59 } // end of namespace Ice | 154 } // end of namespace Ice |
| 60 | 155 |
| 61 #endif // SUBZERO_SRC_ICECLFLAGS_H | 156 #endif // SUBZERO_SRC_ICECLFLAGS_H |
| OLD | NEW |