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

Side by Side Diff: src/IceClFlags.h

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 years, 6 months 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 | « src/IceCfgNode.cpp ('k') | src/IceClFlags.cpp » ('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 // This file declares command line flags controlling translation. 10 // This file declares command line flags controlling translation.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool getDataSections() const { return DataSections; } 48 bool getDataSections() const { return DataSections; }
49 void setDataSections(bool NewValue) { DataSections = NewValue; } 49 void setDataSections(bool NewValue) { DataSections = NewValue; }
50 50
51 bool getDecorateAsm() const { return DecorateAsm; } 51 bool getDecorateAsm() const { return DecorateAsm; }
52 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; } 52 void setDecorateAsm(bool NewValue) { DecorateAsm = NewValue; }
53 53
54 bool getDisableInternal() const { return DisableInternal; } 54 bool getDisableInternal() const { return DisableInternal; }
55 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; } 55 void setDisableInternal(bool NewValue) { DisableInternal = NewValue; }
56 56
57 bool getDisableIRGeneration() const { 57 bool getDisableIRGeneration() const {
58 return ALLOW_DISABLE_IR_GEN && DisableIRGeneration; 58 return BuildDefs::disableIrGen() && DisableIRGeneration;
59 } 59 }
60 void setDisableIRGeneration(bool NewValue) { DisableIRGeneration = NewValue; } 60 void setDisableIRGeneration(bool NewValue) { DisableIRGeneration = NewValue; }
61 61
62 bool getDisableTranslation() const { return DisableTranslation; } 62 bool getDisableTranslation() const { return DisableTranslation; }
63 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; } 63 void setDisableTranslation(bool NewValue) { DisableTranslation = NewValue; }
64 64
65 bool getDumpStats() const { return ALLOW_DUMP && DumpStats; } 65 bool getDumpStats() const { return BuildDefs::dump() && DumpStats; }
66 void setDumpStats(bool NewValue) { DumpStats = NewValue; } 66 void setDumpStats(bool NewValue) { DumpStats = NewValue; }
67 67
68 bool getEnableBlockProfile() const { return EnableBlockProfile; } 68 bool getEnableBlockProfile() const { return EnableBlockProfile; }
69 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; } 69 void setEnableBlockProfile(bool NewValue) { EnableBlockProfile = NewValue; }
70 70
71 bool getFunctionSections() const { return FunctionSections; } 71 bool getFunctionSections() const { return FunctionSections; }
72 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; } 72 void setFunctionSections(bool NewValue) { FunctionSections = NewValue; }
73 73
74 bool getGenerateUnitTestMessages() const { 74 bool getGenerateUnitTestMessages() const {
75 // Note: If dump routines have been turned off, the error messages 75 // Note: If dump routines have been turned off, the error messages
76 // will not be readable. Hence, turn off. 76 // will not be readable. Hence, turn off.
77 return !ALLOW_DUMP || GenerateUnitTestMessages; 77 return !BuildDefs::dump() || GenerateUnitTestMessages;
78 } 78 }
79 void setGenerateUnitTestMessages(bool NewValue) { 79 void setGenerateUnitTestMessages(bool NewValue) {
80 GenerateUnitTestMessages = NewValue; 80 GenerateUnitTestMessages = NewValue;
81 } 81 }
82 82
83 bool getPhiEdgeSplit() const { return PhiEdgeSplit; } 83 bool getPhiEdgeSplit() const { return PhiEdgeSplit; }
84 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; } 84 void setPhiEdgeSplit(bool NewValue) { PhiEdgeSplit = NewValue; }
85 85
86 bool shouldDoNopInsertion() const { return RandomNopInsertion; } 86 bool shouldDoNopInsertion() const { return RandomNopInsertion; }
87 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; } 87 void setShouldDoNopInsertion(bool NewValue) { RandomNopInsertion = NewValue; }
88 88
89 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; } 89 bool shouldRandomizeRegAlloc() const { return RandomRegAlloc; }
90 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; } 90 void setShouldRandomizeRegAlloc(bool NewValue) { RandomRegAlloc = NewValue; }
91 91
92 bool getSkipUnimplemented() const { return SkipUnimplemented; } 92 bool getSkipUnimplemented() const { return SkipUnimplemented; }
93 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; } 93 void setSkipUnimplemented(bool NewValue) { SkipUnimplemented = NewValue; }
94 94
95 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; } 95 bool getSubzeroTimingEnabled() const { return SubzeroTimingEnabled; }
96 void setSubzeroTimingEnabled(bool NewValue) { 96 void setSubzeroTimingEnabled(bool NewValue) {
97 SubzeroTimingEnabled = NewValue; 97 SubzeroTimingEnabled = NewValue;
98 } 98 }
99 99
100 bool getTimeEachFunction() const { return ALLOW_DUMP && TimeEachFunction; } 100 bool getTimeEachFunction() const {
101 return BuildDefs::dump() && TimeEachFunction;
102 }
101 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; } 103 void setTimeEachFunction(bool NewValue) { TimeEachFunction = NewValue; }
102 104
103 bool getUseSandboxing() const { return UseSandboxing; } 105 bool getUseSandboxing() const { return UseSandboxing; }
104 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; } 106 void setUseSandboxing(bool NewValue) { UseSandboxing = NewValue; }
105 107
106 // Enum and integer accessors. 108 // Enum and integer accessors.
107 OptLevel getOptLevel() const { return Opt; } 109 OptLevel getOptLevel() const { return Opt; }
108 void setOptLevel(OptLevel NewValue) { Opt = NewValue; } 110 void setOptLevel(OptLevel NewValue) { Opt = NewValue; }
109 111
110 FileType getOutFileType() const { return OutFileType; } 112 FileType getOutFileType() const { return OutFileType; }
(...skipping 13 matching lines...) Expand all
124 126
125 TargetArch getTargetArch() const { return TArch; } 127 TargetArch getTargetArch() const { return TArch; }
126 void setTargetArch(TargetArch NewValue) { TArch = NewValue; } 128 void setTargetArch(TargetArch NewValue) { TArch = NewValue; }
127 129
128 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; } 130 TargetInstructionSet getTargetInstructionSet() const { return TInstrSet; }
129 void setTargetInstructionSet(TargetInstructionSet NewValue) { 131 void setTargetInstructionSet(TargetInstructionSet NewValue) {
130 TInstrSet = NewValue; 132 TInstrSet = NewValue;
131 } 133 }
132 134
133 VerboseMask getVerbose() const { 135 VerboseMask getVerbose() const {
134 return ALLOW_DUMP ? VMask : (VerboseMask)IceV_None; 136 return BuildDefs::dump() ? VMask : (VerboseMask)IceV_None;
135 } 137 }
136 void setVerbose(VerboseMask NewValue) { VMask = NewValue; } 138 void setVerbose(VerboseMask NewValue) { VMask = NewValue; }
137 139
138 void 140 void
139 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) { 141 setRandomizeAndPoolImmediatesOption(RandomizeAndPoolImmediatesEnum Option) {
140 RandomizeAndPoolImmediatesOption = Option; 142 RandomizeAndPoolImmediatesOption = Option;
141 } 143 }
142 144
143 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const { 145 RandomizeAndPoolImmediatesEnum getRandomizeAndPoolImmediatesOption() const {
144 return RandomizeAndPoolImmediatesOption; 146 return RandomizeAndPoolImmediatesOption;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption; 233 RandomizeAndPoolImmediatesEnum RandomizeAndPoolImmediatesOption;
232 uint32_t RandomizeAndPoolImmediatesThreshold; 234 uint32_t RandomizeAndPoolImmediatesThreshold;
233 235
234 size_t NumTranslationThreads; // 0 means completely sequential 236 size_t NumTranslationThreads; // 0 means completely sequential
235 uint64_t RandomSeed; 237 uint64_t RandomSeed;
236 }; 238 };
237 239
238 } // end of namespace Ice 240 } // end of namespace Ice
239 241
240 #endif // SUBZERO_SRC_ICECLFLAGS_H 242 #endif // SUBZERO_SRC_ICECLFLAGS_H
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceClFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698