Fix reading Time zone rules using Julian days (#17672)
[platform/upstream/coreclr.git] / src / jit / jitconfigvalues.h
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 #if !defined(CONFIG_INTEGER) || !defined(CONFIG_STRING) || !defined(CONFIG_METHODSET)
6 #error CONFIG_INTEGER, CONFIG_STRING, and CONFIG_METHODSET must be defined before including this file.
7 #endif // !defined(CONFIG_INTEGER) || !defined(CONFIG_STRING) || !defined(CONFIG_METHODSET)
8
9 #ifdef DEBUG
10 #define OPT_CONFIG // Enable optimization level configuration.
11 #endif
12
13 ///
14 /// JIT
15 ///
16 #if defined(DEBUG)
17 CONFIG_INTEGER(AltJitLimit, W("AltJitLimit"), 0)               // Max number of functions to use altjit for (decimal)
18 CONFIG_INTEGER(AltJitSkipOnAssert, W("AltJitSkipOnAssert"), 0) // If AltJit hits an assert, fall back to the fallback
19                                                                // JIT. Useful in conjunction with
20                                                                // COMPlus_ContinueOnAssert=1
21 CONFIG_INTEGER(BreakOnDumpToken, W("BreakOnDumpToken"), 0xffffffff) // Breaks when using internal logging on a
22                                                                     // particular token value.
23 CONFIG_INTEGER(DebugBreakOnVerificationFailure, W("DebugBreakOnVerificationFailure"), 0) // Halts the jit on
24                                                                                          // verification failure
25 CONFIG_INTEGER(DiffableDasm, W("JitDiffableDasm"), 0)            // Make the disassembly diff-able
26 CONFIG_INTEGER(DisplayLoopHoistStats, W("JitLoopHoistStats"), 0) // Display JIT loop hoisting statistics
27 CONFIG_INTEGER(DisplayLsraStats, W("JitLsraStats"), 0)       // Display JIT Linear Scan Register Allocator statistics
28 CONFIG_INTEGER(DumpJittedMethods, W("DumpJittedMethods"), 0) // Prints all jitted methods to the console
29 CONFIG_INTEGER(EnablePCRelAddr, W("JitEnablePCRelAddr"), 1)  // Whether absolute addr be encoded as PC-rel offset by
30                                                              // RyuJIT where possible
31 CONFIG_INTEGER(InterpreterFallback, W("InterpreterFallback"), 0) // Fallback to the interpreter when the JIT compiler
32                                                                  // fails
33 CONFIG_INTEGER(JitAssertOnMaxRAPasses, W("JitAssertOnMaxRAPasses"), 0)
34 CONFIG_INTEGER(JitBreakEmitOutputInstr, W("JitBreakEmitOutputInstr"), -1)
35 CONFIG_INTEGER(JitBreakMorphTree, W("JitBreakMorphTree"), 0xffffffff)
36 CONFIG_INTEGER(JitBreakOnBadCode, W("JitBreakOnBadCode"), 0)
37 CONFIG_INTEGER(JitBreakOnMinOpts, W("JITBreakOnMinOpts"), 0) // Halt if jit switches to MinOpts
38 CONFIG_INTEGER(JitBreakOnUnsafeCode, W("JitBreakOnUnsafeCode"), 0)
39 CONFIG_INTEGER(JitCanUseSSE2, W("JitCanUseSSE2"), -1)
40 CONFIG_INTEGER(JitCloneLoops, W("JitCloneLoops"), 1) // If 0, don't clone. Otherwise clone loops for optimizations.
41 CONFIG_INTEGER(JitDebugLogLoopCloning, W("JitDebugLogLoopCloning"), 0) // In debug builds log places where loop cloning
42                                                                        // optimizations are performed on the fast path.
43 CONFIG_INTEGER(JitDefaultFill, W("JitDefaultFill"), 0xdd) // In debug builds, initialize the memory allocated by the nra
44                                                           // with this byte.
45 CONFIG_INTEGER(JitDirectAlloc, W("JitDirectAlloc"), 0)
46 CONFIG_INTEGER(JitDoubleAlign, W("JitDoubleAlign"), 1)
47 CONFIG_INTEGER(JitDumpASCII, W("JitDumpASCII"), 1)         // Uses only ASCII characters in tree dumps
48 CONFIG_INTEGER(JitDumpFgDot, W("JitDumpFgDot"), 0)         // Set to non-zero to emit Dot instead of Xml Flowgraph dump
49 CONFIG_INTEGER(JitDumpTerseLsra, W("JitDumpTerseLsra"), 1) // Produce terse dump output for LSRA
50 CONFIG_INTEGER(JitDumpToDebugger, W("JitDumpToDebugger"), 0)     // Output JitDump output to the debugger
51 CONFIG_INTEGER(JitDumpVerboseSsa, W("JitDumpVerboseSsa"), 0)     // Produce especially verbose dump output for SSA
52 CONFIG_INTEGER(JitDumpVerboseTrees, W("JitDumpVerboseTrees"), 0) // Enable more verbose tree dumps
53 CONFIG_INTEGER(JitEmitPrintRefRegs, W("JitEmitPrintRefRegs"), 0)
54 CONFIG_INTEGER(JitEnableDevirtualization, W("JitEnableDevirtualization"), 1) // Enable devirtualization in importer
55 CONFIG_INTEGER(JitEnableLateDevirtualization, W("JitEnableLateDevirtualization"), 1) // Enable devirtualization after
56                                                                                      // inlining
57 CONFIG_INTEGER(JitExpensiveDebugCheckLevel, W("JitExpensiveDebugCheckLevel"), 0) // Level indicates how much checking
58                                                                                  // beyond the default to do in debug
59                                                                                  // builds (currently 1-2)
60 CONFIG_INTEGER(JitForceFallback, W("JitForceFallback"), 0) // Set to non-zero to test NOWAY assert by forcing a retry
61 CONFIG_INTEGER(JitForceVer, W("JitForceVer"), 0)
62 CONFIG_INTEGER(JitFullyInt, W("JitFullyInt"), 0)           // Forces Fully interruptible code
63 CONFIG_INTEGER(JitFunctionTrace, W("JitFunctionTrace"), 0) // If non-zero, print JIT start/end logging
64 CONFIG_INTEGER(JitGCChecks, W("JitGCChecks"), 0)
65 CONFIG_INTEGER(JitGCInfoLogging, W("JitGCInfoLogging"), 0) // If true, prints GCInfo-related output to standard output.
66 CONFIG_INTEGER(JitHashBreak, W("JitHashBreak"), -1)        // Same as JitBreak, but for a method hash
67 CONFIG_INTEGER(JitHashDump, W("JitHashDump"), -1)          // Same as JitDump, but for a method hash
68 CONFIG_INTEGER(JitHashDumpIR, W("JitHashDumpIR"), -1)      // Same as JitDumpIR, but for a method hash
69 CONFIG_INTEGER(JitHashHalt, W("JitHashHalt"), -1)          // Same as JitHalt, but for a method hash
70 CONFIG_INTEGER(JitInlineAdditionalMultiplier, W("JitInlineAdditionalMultiplier"), 0)
71 CONFIG_INTEGER(JitInlinePrintStats, W("JitInlinePrintStats"), 0)
72 CONFIG_INTEGER(JitInlineSize, W("JITInlineSize"), DEFAULT_MAX_INLINE_SIZE)
73 CONFIG_INTEGER(JitInlineDepth, W("JITInlineDepth"), DEFAULT_MAX_INLINE_DEPTH)
74 CONFIG_INTEGER(JitLongAddress, W("JitLongAddress"), 0) // Force using the large pseudo instruction form for long address
75 CONFIG_INTEGER(JitMaxTempAssert, W("JITMaxTempAssert"), 1)
76 CONFIG_INTEGER(JitMaxUncheckedOffset, W("JitMaxUncheckedOffset"), 8)
77 CONFIG_INTEGER(JitMinOpts, W("JITMinOpts"), 0)                                       // Forces MinOpts
78 CONFIG_INTEGER(JitMinOptsBbCount, W("JITMinOptsBbCount"), DEFAULT_MIN_OPTS_BB_COUNT) // Internal jit control of MinOpts
79 CONFIG_INTEGER(JitMinOptsCodeSize, W("JITMinOptsCodeSize"), DEFAULT_MIN_OPTS_CODE_SIZE)       // Internal jit control of
80                                                                                               // MinOpts
81 CONFIG_INTEGER(JitMinOptsInstrCount, W("JITMinOptsInstrCount"), DEFAULT_MIN_OPTS_INSTR_COUNT) // Internal jit control of
82                                                                                               // MinOpts
83 CONFIG_INTEGER(JitMinOptsLvNumCount, W("JITMinOptsLvNumcount"), DEFAULT_MIN_OPTS_LV_NUM_COUNT) // Internal jit control
84                                                                                                // of MinOpts
85 CONFIG_INTEGER(JitMinOptsLvRefCount, W("JITMinOptsLvRefcount"), DEFAULT_MIN_OPTS_LV_REF_COUNT) // Internal jit control
86                                                                                                // of MinOpts
87 CONFIG_INTEGER(JitNoCMOV, W("JitNoCMOV"), 0)
88 CONFIG_INTEGER(JitNoCSE, W("JitNoCSE"), 0)
89 CONFIG_INTEGER(JitNoCSE2, W("JitNoCSE2"), 0)
90 CONFIG_INTEGER(JitNoForceFallback, W("JitNoForceFallback"), 0) // Set to non-zero to prevent NOWAY assert testing.
91                                                                // Overrides COMPlus_JitForceFallback and JIT stress
92                                                                // flags.
93 CONFIG_INTEGER(JitNoHoist, W("JitNoHoist"), 0)
94 CONFIG_INTEGER(JitNoInline, W("JitNoInline"), 0)                 // Disables inlining of all methods
95 CONFIG_INTEGER(JitNoMemoryBarriers, W("JitNoMemoryBarriers"), 0) // If 1, don't generate memory barriers
96 CONFIG_INTEGER(JitNoRegLoc, W("JitNoRegLoc"), 0)
97 CONFIG_INTEGER(JitNoStructPromotion, W("JitNoStructPromotion"), 0) // Disables struct promotion in Jit32
98 CONFIG_INTEGER(JitNoUnroll, W("JitNoUnroll"), 0)
99 CONFIG_INTEGER(JitOrder, W("JitOrder"), 0)
100 CONFIG_INTEGER(JitReportFastTailCallDecisions, W("JitReportFastTailCallDecisions"), 0)
101 CONFIG_INTEGER(JitPInvokeCheckEnabled, W("JITPInvokeCheckEnabled"), 0)
102 CONFIG_INTEGER(JitPInvokeEnabled, W("JITPInvokeEnabled"), 1)
103 CONFIG_INTEGER(JitPrintInlinedMethods, W("JitPrintInlinedMethods"), 0)
104 CONFIG_INTEGER(JitPrintDevirtualizedMethods, W("JitPrintDevirtualizedMethods"), 0)
105 CONFIG_INTEGER(JitRequired, W("JITRequired"), -1)
106 CONFIG_INTEGER(JitRoundFloat, W("JITRoundFloat"), DEFAULT_ROUND_LEVEL)
107 CONFIG_INTEGER(JitStackAllocToLocalSize, W("JitStackAllocToLocalSize"), DEFAULT_MAX_LOCALLOC_TO_LOCAL_SIZE)
108 CONFIG_INTEGER(JitSkipArrayBoundCheck, W("JitSkipArrayBoundCheck"), 0)
109 CONFIG_INTEGER(JitSlowDebugChecksEnabled, W("JitSlowDebugChecksEnabled"), 1) // Turn on slow debug checks
110 CONFIG_INTEGER(JitSplitFunctionSize, W("JitSplitFunctionSize"), 0) // On ARM, use this as the maximum function/funclet
111                                                                    // size for creating function fragments (and creating
112                                                                    // multiple RUNTIME_FUNCTION entries)
113 CONFIG_INTEGER(JitSsaStress, W("JitSsaStress"), 0) // Perturb order of processing of blocks in SSA; 0 = no stress; 1 =
114                                                    // use method hash; * = supplied value as random hash
115 CONFIG_INTEGER(JitStackChecks, W("JitStackChecks"), 0)
116 CONFIG_INTEGER(JitStress, W("JitStress"), 0) // Internal Jit stress mode: 0 = no stress, 2 = all stress, other = vary
117                                              // stress based on a hash of the method and this value
118 CONFIG_INTEGER(JitStressBBProf, W("JitStressBBProf"), 0)               // Internal Jit stress mode
119 CONFIG_INTEGER(JitStressBiasedCSE, W("JitStressBiasedCSE"), 0x101)     // Internal Jit stress mode: decimal bias value
120                                                                        // between (0,100) to perform CSE on a candidate.
121                                                                        // 100% = All CSEs. 0% = 0 CSE. (> 100) means no
122                                                                        // stress.
123 CONFIG_INTEGER(JitStressFP, W("JitStressFP"), 0)                       // Internal Jit stress mode
124 CONFIG_INTEGER(JitStressModeNamesOnly, W("JitStressModeNamesOnly"), 0) // Internal Jit stress: if nonzero, only enable
125                                                                        // stress modes listed in JitStressModeNames
126 CONFIG_INTEGER(JitStressRegs, W("JitStressRegs"), 0)
127 CONFIG_INTEGER(JitStrictCheckForNonVirtualCallToVirtualMethod, W("JitStrictCheckForNonVirtualCallToVirtualMethod"), 1)
128 CONFIG_INTEGER(JitVNMapSelLimit, W("JitVNMapSelLimit"), 0) // If non-zero, assert if # of VNF_MapSelect applications
129                                                            // considered reaches this
130 CONFIG_INTEGER(NgenHashDump, W("NgenHashDump"), -1)        // same as JitHashDump, but for ngen
131 CONFIG_INTEGER(NgenHashDumpIR, W("NgenHashDumpIR"), -1)    // same as JitHashDumpIR, but for ngen
132 CONFIG_INTEGER(NgenOrder, W("NgenOrder"), 0)
133 CONFIG_INTEGER(RunAltJitCode, W("RunAltJitCode"), 1) // If non-zero, and the compilation succeeds for an AltJit, then
134                                                      // use the code. If zero, then we always throw away the generated
135                                                      // code and fall back to the default compiler.
136 CONFIG_INTEGER(RunComponentUnitTests, W("JitComponentUnitTests"), 0) // Run JIT component unit tests
137 CONFIG_INTEGER(ShouldInjectFault, W("InjectFault"), 0)
138 CONFIG_INTEGER(StackProbesOverride, W("JitStackProbes"), 0)
139 CONFIG_INTEGER(StressCOMCall, W("StressCOMCall"), 0)
140 CONFIG_INTEGER(TailcallStress, W("TailcallStress"), 0)
141 CONFIG_INTEGER(TreesBeforeAfterMorph, W("JitDumpBeforeAfterMorph"), 0) // If 1, display each tree before/after morphing
142 CONFIG_METHODSET(JitBreak, W("JitBreak")) // Stops in the importer when compiling a specified method
143 CONFIG_METHODSET(JitDebugBreak, W("JitDebugBreak"))
144 CONFIG_METHODSET(JitDisasm, W("JitDisasm")) // Dumps disassembly for specified method
145 CONFIG_METHODSET(JitDump, W("JitDump"))     // Dumps trees for specified method
146 CONFIG_METHODSET(JitDumpIR, W("JitDumpIR")) // Dumps trees (in linear IR form) for specified method
147 CONFIG_METHODSET(JitEHDump, W("JitEHDump")) // Dump the EH table for the method, as reported to the VM
148 CONFIG_METHODSET(JitExclude, W("JitExclude"))
149 CONFIG_METHODSET(JitForceProcedureSplitting, W("JitForceProcedureSplitting"))
150 CONFIG_METHODSET(JitGCDump, W("JitGCDump"))
151 CONFIG_METHODSET(JitHalt, W("JitHalt")) // Emits break instruction into jitted code
152 CONFIG_METHODSET(JitImportBreak, W("JitImportBreak"))
153 CONFIG_METHODSET(JitInclude, W("JitInclude"))
154 CONFIG_METHODSET(JitLateDisasm, W("JitLateDisasm"))
155 CONFIG_METHODSET(JitMinOptsName, W("JITMinOptsName"))                   // Forces MinOpts for a named function
156 CONFIG_METHODSET(JitNoProcedureSplitting, W("JitNoProcedureSplitting")) // Disallow procedure splitting for specified
157                                                                         // methods
158 CONFIG_METHODSET(JitNoProcedureSplittingEH, W("JitNoProcedureSplittingEH")) // Disallow procedure splitting for
159                                                                             // specified methods if they contain
160                                                                             // exception handling
161 CONFIG_METHODSET(JitStressOnly, W("JitStressOnly")) // Internal Jit stress mode: stress only the specified method(s)
162 CONFIG_METHODSET(JitUnwindDump, W("JitUnwindDump")) // Dump the unwind codes for the method
163 ///
164 /// NGEN
165 ///
166 CONFIG_METHODSET(NgenDisasm, W("NgenDisasm")) // Same as JitDisasm, but for ngen
167 CONFIG_METHODSET(NgenDump, W("NgenDump"))     // Same as JitDump, but for ngen
168 CONFIG_METHODSET(NgenDumpIR, W("NgenDumpIR")) // Same as JitDumpIR, but for ngen
169 CONFIG_METHODSET(NgenEHDump, W("NgenEHDump")) // Dump the EH table for the method, as reported to the VM
170 CONFIG_METHODSET(NgenGCDump, W("NgenGCDump"))
171 CONFIG_METHODSET(NgenUnwindDump, W("NgenUnwindDump")) // Dump the unwind codes for the method
172 ///
173 /// JIT
174 ///
175 CONFIG_STRING(JitDumpFg, W("JitDumpFg"))           // Dumps Xml/Dot Flowgraph for specified method
176 CONFIG_STRING(JitDumpFgDir, W("JitDumpFgDir"))     // Directory for Xml/Dot flowgraph dump(s)
177 CONFIG_STRING(JitDumpFgFile, W("JitDumpFgFile"))   // Filename for Xml/Dot flowgraph dump(s)
178 CONFIG_STRING(JitDumpFgPhase, W("JitDumpFgPhase")) // Phase-based Xml/Dot flowgraph support. Set to the short name of a
179                                                    // phase to see the flowgraph after that phase. Leave unset to dump
180                                                    // after COLD-BLK (determine first cold block) or set to * for all
181                                                    // phases
182 CONFIG_STRING(JitDumpIRFormat, W("JitDumpIRFormat")) // Comma separated format control for JitDumpIR, values = {types |
183                                                      // locals | ssa | valnums | kinds | flags | nodes | nolists |
184                                                      // nostmts | noleafs | trees | dataflow}
185 CONFIG_STRING(JitDumpIRPhase, W("JitDumpIRPhase"))   // Phase control for JitDumpIR, values = {* | phasename}
186 CONFIG_STRING(JitLateDisasmTo, W("JITLateDisasmTo"))
187 CONFIG_STRING(JitRange, W("JitRange"))
188 CONFIG_STRING(JitStressModeNames, W("JitStressModeNames")) // Internal Jit stress mode: stress using the given set of
189                                                            // stress mode names, e.g. STRESS_REGS, STRESS_TAILCALL
190 CONFIG_STRING(JitStressModeNamesNot, W("JitStressModeNamesNot")) // Internal Jit stress mode: do NOT stress using the
191                                                                  // given set of stress mode names, e.g. STRESS_REGS,
192                                                                  // STRESS_TAILCALL
193 CONFIG_STRING(JitStressRange, W("JitStressRange"))               // Internal Jit stress mode
194 ///
195 /// NGEN
196 ///
197 CONFIG_STRING(NgenDumpFg, W("NgenDumpFg"))             // Ngen Xml Flowgraph support
198 CONFIG_STRING(NgenDumpFgDir, W("NgenDumpFgDir"))       // Ngen Xml Flowgraph support
199 CONFIG_STRING(NgenDumpFgFile, W("NgenDumpFgFile"))     // Ngen Xml Flowgraph support
200 CONFIG_STRING(NgenDumpIRFormat, W("NgenDumpIRFormat")) // Same as JitDumpIRFormat, but for ngen
201 CONFIG_STRING(NgenDumpIRPhase, W("NgenDumpIRPhase"))   // Same as JitDumpIRPhase, but for ngen
202 ///
203 /// JIT Hardware Intrinsics
204 ///
205 #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
206 CONFIG_INTEGER(EnableSSE, W("EnableSSE"), 1)     // Enable SSE
207 CONFIG_INTEGER(EnableSSE2, W("EnableSSE2"), 1)   // Enable SSE2
208 CONFIG_INTEGER(EnableSSE3, W("EnableSSE3"), 1)   // Enable SSE3
209 CONFIG_INTEGER(EnableSSSE3, W("EnableSSSE3"), 1) // Enable SSSE3
210 CONFIG_INTEGER(EnableSSE41, W("EnableSSE41"), 1) // Enable SSE41
211 CONFIG_INTEGER(EnableSSE42, W("EnableSSE42"), 1) // Enable SSE42
212 // EnableAVX is already defined for DEBUG and non-DEBUG mode both
213 CONFIG_INTEGER(EnableAVX2, W("EnableAVX2"), 1) // Enable AVX2
214
215 CONFIG_INTEGER(EnableAES, W("EnableAES"), 1)             // Enable AES
216 CONFIG_INTEGER(EnableBMI1, W("EnableBMI1"), 1)           // Enable BMI1
217 CONFIG_INTEGER(EnableBMI2, W("EnableBMI2"), 1)           // Enable BMI2
218 CONFIG_INTEGER(EnableFMA, W("EnableFMA"), 1)             // Enable FMA
219 CONFIG_INTEGER(EnableLZCNT, W("EnableLZCNT"), 1)         // Enable AES
220 CONFIG_INTEGER(EnablePCLMULQDQ, W("EnablePCLMULQDQ"), 1) // Enable PCLMULQDQ
221 CONFIG_INTEGER(EnablePOPCNT, W("EnablePOPCNT"), 1)       // Enable POPCNT
222 #endif                                                   // defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
223 CONFIG_INTEGER(EnableIncompleteISAClass, W("EnableIncompleteISAClass"), 0) // Enable testing not-yet-implemented
224                                                                            // intrinsic classes
225 #endif                                                                     // defined(DEBUG)
226
227 ///
228 /// JIT
229 ///
230 #ifdef FEATURE_ENABLE_NO_RANGE_CHECKS
231 CONFIG_INTEGER(JitNoRangeChks, W("JitNoRngChks"), 0) // If 1, don't generate range checks
232 #endif
233
234 // AltJitAssertOnNYI should be 0 on targets where JIT is under development or bring up stage, so as to facilitate
235 // fallback to main JIT on hitting a NYI.
236 #if defined(_TARGET_ARM64_) || defined(_TARGET_X86_)
237 CONFIG_INTEGER(AltJitAssertOnNYI, W("AltJitAssertOnNYI"), 0) // Controls the AltJit behavior of NYI stuff
238 #else                                                        // !defined(_TARGET_ARM64_) && !defined(_TARGET_X86_)
239 CONFIG_INTEGER(AltJitAssertOnNYI, W("AltJitAssertOnNYI"), 1) // Controls the AltJit behavior of NYI stuff
240 #endif                                                       // defined(_TARGET_ARM64_) || defined(_TARGET_X86_)
241 ///
242 /// JIT Hardware Intrinsics
243 ///
244 #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
245 CONFIG_INTEGER(EnableSSE3_4, W("EnableSSE3_4"), 1) // Enable SSE3, SSSE3, SSE 4.1 and 4.2 instruction set as default
246 #endif
247
248 #if defined(_TARGET_AMD64_) || defined(_TARGET_X86_)
249 // Enable AVX instruction set for wide operations as default. When both AVX and SSE3_4 are set, we will use the most
250 // capable instruction set available which will prefer AVX over SSE3/4.
251 CONFIG_INTEGER(EnableAVX, W("EnableAVX"), 1)
252 #else  // !defined(_TARGET_AMD64_) && !defined(_TARGET_X86_)
253 // Enable AVX instruction set for wide operations as default
254 CONFIG_INTEGER(EnableAVX, W("EnableAVX"), 0)
255 #endif // !defined(_TARGET_AMD64_) && !defined(_TARGET_X86_)
256 ///
257 /// JIT
258 ///
259 #if !defined(DEBUG) && !defined(_DEBUG)
260 CONFIG_INTEGER(JitEnableNoWayAssert, W("JitEnableNoWayAssert"), 0)
261 #else  // defined(DEBUG) || defined(_DEBUG)
262 CONFIG_INTEGER(JitEnableNoWayAssert, W("JitEnableNoWayAssert"), 1)
263 #endif // !defined(DEBUG) && !defined(_DEBUG)
264
265 // It was originally intended that JitMinOptsTrackGCrefs only be enabled for amd64 on CoreCLR. A mistake was
266 // made, and it was enabled for x86 as well. However, it doesn't currently work with x86 legacy back-end, so
267 // disable it for that. Whether it should continue to be enabled for x86 non-legacy-backend should be investigated.
268 // This is tracked by issue https://github.com/dotnet/coreclr/issues/12415.
269 #if (defined(_TARGET_AMD64_) && defined(FEATURE_CORECLR)) || (defined(_TARGET_X86_) && !defined(LEGACY_BACKEND))
270 #define JitMinOptsTrackGCrefs_Default 0 // Not tracking GC refs in MinOpts is new behavior
271 #else
272 #define JitMinOptsTrackGCrefs_Default 1
273 #endif
274 CONFIG_INTEGER(JitMinOptsTrackGCrefs, W("JitMinOptsTrackGCrefs"), JitMinOptsTrackGCrefs_Default) // Track GC roots
275
276 // The following should be wrapped inside "#if MEASURE_MEM_ALLOC / #endif", but
277 // some files include this one without bringing in the definitions from "jit.h"
278 // so we don't always know what the "true" value of that flag should be. For now
279 // we take the easy way out and always include the flag, even in release builds
280 // (normally MEASURE_MEM_ALLOC is off for release builds but if it's toggled on
281 // for release in "jit.h" the flag would be missing for some includers).
282 // TODO-Cleanup: need to make 'MEASURE_MEM_ALLOC' well-defined here at all times.
283 CONFIG_INTEGER(DisplayMemStats, W("JitMemStats"), 0) // Display JIT memory usage statistics
284
285 CONFIG_INTEGER(JitAggressiveInlining, W("JitAggressiveInlining"), 0) // Aggressive inlining of all methods
286 CONFIG_INTEGER(JitELTHookEnabled, W("JitELTHookEnabled"), 0)         // If 1, emit Enter/Leave/TailCall callbacks
287 CONFIG_INTEGER(JitInlineSIMDMultiplier, W("JitInlineSIMDMultiplier"), 3)
288
289 #if defined(FEATURE_ENABLE_NO_RANGE_CHECKS)
290 CONFIG_INTEGER(JitNoRngChks, W("JitNoRngChks"), 0) // If 1, don't generate range checks
291 #endif                                             // defined(FEATURE_ENABLE_NO_RANGE_CHECKS)
292
293 #if defined(OPT_CONFIG)
294 CONFIG_INTEGER(JitDoAssertionProp, W("JitDoAssertionProp"), 1) // Perform assertion propagation optimization
295 CONFIG_INTEGER(JitDoCopyProp, W("JitDoCopyProp"), 1)   // Perform copy propagation on variables that appear redundant
296 CONFIG_INTEGER(JitDoEarlyProp, W("JitDoEarlyProp"), 1) // Perform Early Value Propagation
297 CONFIG_INTEGER(JitDoLoopHoisting, W("JitDoLoopHoisting"), 1)   // Perform loop hoisting on loop invariant values
298 CONFIG_INTEGER(JitDoRangeAnalysis, W("JitDoRangeAnalysis"), 1) // Perform range check analysis
299 CONFIG_INTEGER(JitDoSsa, W("JitDoSsa"), 1) // Perform Static Single Assignment (SSA) numbering on the variables
300 CONFIG_INTEGER(JitDoValueNumber, W("JitDoValueNumber"), 1) // Perform value numbering on method expressions
301
302 CONFIG_METHODSET(JitOptRepeat, W("JitOptRepeat"))            // Runs optimizer multiple times on the method
303 CONFIG_INTEGER(JitOptRepeatCount, W("JitOptRepeatCount"), 2) // Number of times to repeat opts when repeating
304 #endif                                                       // defined(OPT_CONFIG)
305
306 CONFIG_INTEGER(JitRegisterFP, W("JitRegisterFP"), 3) // Control FP enregistration
307 CONFIG_INTEGER(JitTelemetry, W("JitTelemetry"), 1)   // If non-zero, gather JIT telemetry data
308
309 // Max # of MapSelect's considered for a particular top-level invocation.
310 CONFIG_INTEGER(JitVNMapSelBudget, W("JitVNMapSelBudget"), DEFAULT_MAP_SELECT_BUDGET)
311
312 CONFIG_INTEGER(TailCallLoopOpt, W("TailCallLoopOpt"), 1) // Convert recursive tail calls to loops
313 CONFIG_METHODSET(AltJit, W("AltJit"))         // Enables AltJit and selectively limits it to the specified methods.
314 CONFIG_METHODSET(AltJitNgen, W("AltJitNgen")) // Enables AltJit for NGEN and selectively limits it
315                                               // to the specified methods.
316
317 #if defined(ALT_JIT)
318 CONFIG_STRING(AltJitExcludeAssemblies, W("AltJitExcludeAssemblies")) // Do not use AltJit on this
319                                                                      // semicolon-delimited list of assemblies.
320 #endif                                                               // defined(ALT_JIT)
321
322 CONFIG_INTEGER(JitMeasureIR, W("JitMeasureIR"), 0) // If set, measure the IR size after some phases and report it in
323                                                    // the time log.
324
325 CONFIG_STRING(JitFuncInfoFile, W("JitFuncInfoLogFile")) // If set, gather JIT function info and write to this file.
326 CONFIG_STRING(JitTimeLogCsv, W("JitTimeLogCsv")) // If set, gather JIT throughput data and write to a CSV file. This
327                                                  // mode must be used in internal retail builds.
328 CONFIG_STRING(TailCallOpt, W("TailCallOpt"))
329
330 CONFIG_INTEGER(JitMeasureNowayAssert, W("JitMeasureNowayAssert"), 0) // Set to 1 to measure noway_assert usage. Only
331                                                                      // valid if MEASURE_NOWAY is defined.
332 CONFIG_STRING(JitMeasureNowayAssertFile,
333               W("JitMeasureNowayAssertFile")) // Set to file to write noway_assert usage to a file (if not
334                                               // set: stdout). Only valid if MEASURE_NOWAY is defined.
335
336 #if defined(DEBUG) || defined(INLINE_DATA)
337 CONFIG_INTEGER(JitInlineDumpData, W("JitInlineDumpData"), 0)
338 CONFIG_INTEGER(JitInlineDumpXml, W("JitInlineDumpXml"), 0) // 1 = full xml (+ failures in DEBUG)
339                                                            // 2 = only methods with inlines (+ failures in DEBUG)
340                                                            // 3 = only methods with inlines, no failures
341 CONFIG_INTEGER(JitInlineLimit, W("JitInlineLimit"), -1)
342 CONFIG_INTEGER(JitInlinePolicyDiscretionary, W("JitInlinePolicyDiscretionary"), 0)
343 CONFIG_INTEGER(JitInlinePolicyFull, W("JitInlinePolicyFull"), 0)
344 CONFIG_INTEGER(JitInlinePolicySize, W("JitInlinePolicySize"), 0)
345 CONFIG_INTEGER(JitInlinePolicyRandom, W("JitInlinePolicyRandom"), 0) // nonzero enables; value is the external random
346                                                                      // seed
347 CONFIG_INTEGER(JitInlinePolicyReplay, W("JitInlinePolicyReplay"), 0)
348 CONFIG_STRING(JitNoInlineRange, W("JitNoInlineRange"))
349 CONFIG_STRING(JitInlineReplayFile, W("JitInlineReplayFile"))
350 #endif // defined(DEBUG) || defined(INLINE_DATA)
351
352 CONFIG_INTEGER(JitInlinePolicyModel, W("JitInlinePolicyModel"), 0)
353
354 CONFIG_INTEGER(JitEECallTimingInfo, W("JitEECallTimingInfo"), 0)
355
356 #if defined(DEBUG)
357 #if defined(FEATURE_CORECLR)
358 CONFIG_INTEGER(JitEnableFinallyCloning, W("JitEnableFinallyCloning"), 1)
359 CONFIG_INTEGER(JitEnableRemoveEmptyTry, W("JitEnableRemoveEmptyTry"), 1)
360 #else
361 CONFIG_INTEGER(JitEnableFinallyCloning, W("JitEnableFinallyCloning"), 0)
362 CONFIG_INTEGER(JitEnableRemoveEmptyTry, W("JitEnableRemoveEmptyTry"), 0)
363 #endif // defined(FEATURE_CORECLR)
364 #endif // DEBUG
365
366 #undef CONFIG_INTEGER
367 #undef CONFIG_STRING
368 #undef CONFIG_METHODSET