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