| 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(JitAssertOnMaxRAPasses, W("JitAssertOnMaxRAPasses" ), 0) |
| 32 | CONFIG_INTEGER(JitBreakEmitOutputInstr, W("JitBreakEmitOutputInstr" ), -1) |
| 33 | CONFIG_INTEGER(JitBreakMorphTree, W("JitBreakMorphTree" ), 0xffffffff) |
| 34 | CONFIG_INTEGER(JitBreakOnBadCode, W("JitBreakOnBadCode" ), 0) |
| 35 | CONFIG_INTEGER(JitBreakOnMinOpts, W("JITBreakOnMinOpts" ), 0) // Halt if jit switches to MinOpts |
| 36 | CONFIG_INTEGER(JitBreakOnUnsafeCode, W("JitBreakOnUnsafeCode" ), 0) |
| 37 | CONFIG_INTEGER(JitCanUseSSE2, W("JitCanUseSSE2" ), -1) |
| 38 | CONFIG_INTEGER(JitCloneLoops, W("JitCloneLoops" ), 1) // If 0, don't clone. Otherwise clone loops for optimizations. |
| 39 | CONFIG_INTEGER(JitDebugLogLoopCloning, W("JitDebugLogLoopCloning" ), 0) // In debug builds log places where loop cloning |
| 40 | // optimizations are performed on the fast path. |
| 41 | CONFIG_INTEGER(JitDefaultFill, W("JitDefaultFill" ), 0xdd) // In debug builds, initialize the memory allocated by the nra |
| 42 | // with this byte. |
| 43 | CONFIG_INTEGER(JitDirectAlloc, W("JitDirectAlloc" ), 0) |
| 44 | CONFIG_INTEGER(JitDoubleAlign, W("JitDoubleAlign" ), 1) |
| 45 | CONFIG_INTEGER(JitDumpASCII, W("JitDumpASCII" ), 1) // Uses only ASCII characters in tree dumps |
| 46 | CONFIG_INTEGER(JitDumpFgDot, W("JitDumpFgDot" ), 0) // Set to non-zero to emit Dot instead of Xml Flowgraph dump |
| 47 | CONFIG_INTEGER(JitDumpTerseLsra, W("JitDumpTerseLsra" ), 1) // Produce terse dump output for LSRA |
| 48 | CONFIG_INTEGER(JitDumpToDebugger, W("JitDumpToDebugger" ), 0) // Output JitDump output to the debugger |
| 49 | CONFIG_INTEGER(JitDumpVerboseSsa, W("JitDumpVerboseSsa" ), 0) // Produce especially verbose dump output for SSA |
| 50 | CONFIG_INTEGER(JitDumpVerboseTrees, W("JitDumpVerboseTrees" ), 0) // Enable more verbose tree dumps |
| 51 | CONFIG_INTEGER(JitEmitPrintRefRegs, W("JitEmitPrintRefRegs" ), 0) |
| 52 | CONFIG_INTEGER(JitEnableDevirtualization, W("JitEnableDevirtualization" ), 1) // Enable devirtualization in importer |
| 53 | CONFIG_INTEGER(JitEnableLateDevirtualization, W("JitEnableLateDevirtualization" ), 1) // Enable devirtualization after |
| 54 | // inlining |
| 55 | CONFIG_INTEGER(JitExpensiveDebugCheckLevel, W("JitExpensiveDebugCheckLevel" ), 0) // Level indicates how much checking |
| 56 | // beyond the default to do in debug |
| 57 | // builds (currently 1-2) |
| 58 | CONFIG_INTEGER(JitForceFallback, W("JitForceFallback" ), 0) // Set to non-zero to test NOWAY assert by forcing a retry |
| 59 | CONFIG_INTEGER(JitForceVer, W("JitForceVer" ), 0) |
| 60 | CONFIG_INTEGER(JitFullyInt, W("JitFullyInt" ), 0) // Forces Fully interruptible code |
| 61 | CONFIG_INTEGER(JitFunctionTrace, W("JitFunctionTrace" ), 0) // If non-zero, print JIT start/end logging |
| 62 | CONFIG_INTEGER(JitGCChecks, W("JitGCChecks" ), 0) |
| 63 | CONFIG_INTEGER(JitGCInfoLogging, W("JitGCInfoLogging" ), 0) // If true, prints GCInfo-related output to standard output. |
| 64 | CONFIG_INTEGER(JitHashBreak, W("JitHashBreak" ), -1) // Same as JitBreak, but for a method hash |
| 65 | CONFIG_INTEGER(JitHashDump, W("JitHashDump" ), -1) // Same as JitDump, but for a method hash |
| 66 | CONFIG_INTEGER(JitHashDumpIR, W("JitHashDumpIR" ), -1) // Same as JitDumpIR, but for a method hash |
| 67 | CONFIG_INTEGER(JitHashHalt, W("JitHashHalt" ), -1) // Same as JitHalt, but for a method hash |
| 68 | CONFIG_INTEGER(JitInlineAdditionalMultiplier, W("JitInlineAdditionalMultiplier" ), 0) |
| 69 | CONFIG_INTEGER(JitInlinePrintStats, W("JitInlinePrintStats" ), 0) |
| 70 | CONFIG_INTEGER(JitInlineSize, W("JITInlineSize" ), DEFAULT_MAX_INLINE_SIZE) |
| 71 | CONFIG_INTEGER(JitInlineDepth, W("JITInlineDepth" ), DEFAULT_MAX_INLINE_DEPTH) |
| 72 | CONFIG_INTEGER(JitLongAddress, W("JitLongAddress" ), 0) // Force using the large pseudo instruction form for long address |
| 73 | CONFIG_INTEGER(JitMaxTempAssert, W("JITMaxTempAssert" ), 1) |
| 74 | CONFIG_INTEGER(JitMaxUncheckedOffset, W("JitMaxUncheckedOffset" ), 8) |
| 75 | CONFIG_INTEGER(JitMinOpts, W("JITMinOpts" ), 0) // Forces MinOpts |
| 76 | CONFIG_INTEGER(JitMinOptsBbCount, W("JITMinOptsBbCount" ), DEFAULT_MIN_OPTS_BB_COUNT) // Internal jit control of MinOpts |
| 77 | CONFIG_INTEGER(JitMinOptsCodeSize, W("JITMinOptsCodeSize" ), DEFAULT_MIN_OPTS_CODE_SIZE) // Internal jit control of |
| 78 | // MinOpts |
| 79 | CONFIG_INTEGER(JitMinOptsInstrCount, W("JITMinOptsInstrCount" ), DEFAULT_MIN_OPTS_INSTR_COUNT) // Internal jit control of |
| 80 | // MinOpts |
| 81 | CONFIG_INTEGER(JitMinOptsLvNumCount, W("JITMinOptsLvNumcount" ), DEFAULT_MIN_OPTS_LV_NUM_COUNT) // Internal jit control |
| 82 | // of MinOpts |
| 83 | CONFIG_INTEGER(JitMinOptsLvRefCount, W("JITMinOptsLvRefcount" ), DEFAULT_MIN_OPTS_LV_REF_COUNT) // Internal jit control |
| 84 | // of MinOpts |
| 85 | CONFIG_INTEGER(JitNoCMOV, W("JitNoCMOV" ), 0) |
| 86 | CONFIG_INTEGER(JitNoCSE, W("JitNoCSE" ), 0) |
| 87 | CONFIG_INTEGER(JitNoCSE2, W("JitNoCSE2" ), 0) |
| 88 | CONFIG_INTEGER(JitNoForceFallback, W("JitNoForceFallback" ), 0) // Set to non-zero to prevent NOWAY assert testing. |
| 89 | // Overrides COMPlus_JitForceFallback and JIT stress |
| 90 | // flags. |
| 91 | CONFIG_INTEGER(JitNoHoist, W("JitNoHoist" ), 0) |
| 92 | CONFIG_INTEGER(JitNoInline, W("JitNoInline" ), 0) // Disables inlining of all methods |
| 93 | CONFIG_INTEGER(JitNoMemoryBarriers, W("JitNoMemoryBarriers" ), 0) // If 1, don't generate memory barriers |
| 94 | CONFIG_INTEGER(JitNoRegLoc, W("JitNoRegLoc" ), 0) |
| 95 | CONFIG_INTEGER(JitNoStructPromotion, W("JitNoStructPromotion" ), 0) // Disables struct promotion in Jit32 |
| 96 | CONFIG_INTEGER(JitNoUnroll, W("JitNoUnroll" ), 0) |
| 97 | CONFIG_INTEGER(JitOrder, W("JitOrder" ), 0) |
| 98 | CONFIG_INTEGER(JitQueryCurrentStaticFieldClass, W("JitQueryCurrentStaticFieldClass" ), 1) |
| 99 | CONFIG_INTEGER(JitReportFastTailCallDecisions, W("JitReportFastTailCallDecisions" ), 0) |
| 100 | CONFIG_INTEGER(JitPInvokeCheckEnabled, W("JITPInvokeCheckEnabled" ), 0) |
| 101 | CONFIG_INTEGER(JitPInvokeEnabled, W("JITPInvokeEnabled" ), 1) |
| 102 | CONFIG_INTEGER(JitPrintInlinedMethods, W("JitPrintInlinedMethods" ), 0) |
| 103 | CONFIG_INTEGER(JitPrintDevirtualizedMethods, W("JitPrintDevirtualizedMethods" ), 0) |
| 104 | CONFIG_INTEGER(JitRequired, W("JITRequired" ), -1) |
| 105 | CONFIG_INTEGER(JitRoundFloat, W("JITRoundFloat" ), DEFAULT_ROUND_LEVEL) |
| 106 | CONFIG_INTEGER(JitStackAllocToLocalSize, W("JitStackAllocToLocalSize" ), DEFAULT_MAX_LOCALLOC_TO_LOCAL_SIZE) |
| 107 | CONFIG_INTEGER(JitSkipArrayBoundCheck, W("JitSkipArrayBoundCheck" ), 0) |
| 108 | CONFIG_INTEGER(JitSlowDebugChecksEnabled, W("JitSlowDebugChecksEnabled" ), 1) // Turn on slow debug checks |
| 109 | CONFIG_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) |
| 112 | CONFIG_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 |
| 114 | CONFIG_INTEGER(JitStackChecks, W("JitStackChecks" ), 0) |
| 115 | CONFIG_STRING(JitStdOutFile, W("JitStdOutFile" )) // If set, sends JIT's stdout output to this file. |
| 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_STRING(JitDisasmAssemblies, W("JitDisasmAssemblies" )) // Only show JitDisasm and related info for methods |
| 146 | // from this semicolon-delimited list of assemblies. |
| 147 | CONFIG_METHODSET(JitDump, W("JitDump" )) // Dumps trees for specified method |
| 148 | CONFIG_METHODSET(JitDumpIR, W("JitDumpIR" )) // Dumps trees (in linear IR form) for specified method |
| 149 | CONFIG_METHODSET(JitEHDump, W("JitEHDump" )) // Dump the EH table for the method, as reported to the VM |
| 150 | CONFIG_METHODSET(JitExclude, W("JitExclude" )) |
| 151 | CONFIG_METHODSET(JitForceProcedureSplitting, W("JitForceProcedureSplitting" )) |
| 152 | CONFIG_METHODSET(JitGCDump, W("JitGCDump" )) |
| 153 | CONFIG_METHODSET(JitDebugDump, W("JitDebugDump" )) |
| 154 | CONFIG_METHODSET(JitHalt, W("JitHalt" )) // Emits break instruction into jitted code |
| 155 | CONFIG_METHODSET(JitImportBreak, W("JitImportBreak" )) |
| 156 | CONFIG_METHODSET(JitInclude, W("JitInclude" )) |
| 157 | CONFIG_METHODSET(JitLateDisasm, W("JitLateDisasm" )) |
| 158 | CONFIG_METHODSET(JitMinOptsName, W("JITMinOptsName" )) // Forces MinOpts for a named function |
| 159 | CONFIG_METHODSET(JitNoProcedureSplitting, W("JitNoProcedureSplitting" )) // Disallow procedure splitting for specified |
| 160 | // methods |
| 161 | CONFIG_METHODSET(JitNoProcedureSplittingEH, W("JitNoProcedureSplittingEH" )) // Disallow procedure splitting for |
| 162 | // specified methods if they contain |
| 163 | // exception handling |
| 164 | CONFIG_METHODSET(JitStressOnly, W("JitStressOnly" )) // Internal Jit stress mode: stress only the specified method(s) |
| 165 | CONFIG_METHODSET(JitUnwindDump, W("JitUnwindDump" )) // Dump the unwind codes for the method |
| 166 | /// |
| 167 | /// NGEN |
| 168 | /// |
| 169 | CONFIG_METHODSET(NgenDisasm, W("NgenDisasm" )) // Same as JitDisasm, but for ngen |
| 170 | CONFIG_METHODSET(NgenDump, W("NgenDump" )) // Same as JitDump, but for ngen |
| 171 | CONFIG_METHODSET(NgenDumpIR, W("NgenDumpIR" )) // Same as JitDumpIR, but for ngen |
| 172 | CONFIG_METHODSET(NgenEHDump, W("NgenEHDump" )) // Dump the EH table for the method, as reported to the VM |
| 173 | CONFIG_METHODSET(NgenGCDump, W("NgenGCDump" )) |
| 174 | CONFIG_METHODSET(NgenDebugDump, W("NgenDebugDump" )) |
| 175 | CONFIG_METHODSET(NgenUnwindDump, W("NgenUnwindDump" )) // Dump the unwind codes for the method |
| 176 | /// |
| 177 | /// JIT |
| 178 | /// |
| 179 | CONFIG_STRING(JitDumpFg, W("JitDumpFg" )) // Dumps Xml/Dot Flowgraph for specified method |
| 180 | CONFIG_STRING(JitDumpFgDir, W("JitDumpFgDir" )) // Directory for Xml/Dot flowgraph dump(s) |
| 181 | CONFIG_STRING(JitDumpFgFile, W("JitDumpFgFile" )) // Filename for Xml/Dot flowgraph dump(s) |
| 182 | CONFIG_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 |
| 186 | CONFIG_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} |
| 189 | CONFIG_STRING(JitDumpIRPhase, W("JitDumpIRPhase" )) // Phase control for JitDumpIR, values = {* | phasename} |
| 190 | CONFIG_STRING(JitLateDisasmTo, W("JITLateDisasmTo" )) |
| 191 | CONFIG_STRING(JitRange, W("JitRange" )) |
| 192 | CONFIG_STRING(JitStressModeNames, W("JitStressModeNames" )) // Internal Jit stress mode: stress using the given set of |
| 193 | // stress mode names, e.g. STRESS_REGS, STRESS_TAILCALL |
| 194 | CONFIG_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 |
| 197 | CONFIG_STRING(JitStressRange, W("JitStressRange" )) // Internal Jit stress mode |
| 198 | /// |
| 199 | /// NGEN |
| 200 | /// |
| 201 | CONFIG_STRING(NgenDumpFg, W("NgenDumpFg" )) // Ngen Xml Flowgraph support |
| 202 | CONFIG_STRING(NgenDumpFgDir, W("NgenDumpFgDir" )) // Ngen Xml Flowgraph support |
| 203 | CONFIG_STRING(NgenDumpFgFile, W("NgenDumpFgFile" )) // Ngen Xml Flowgraph support |
| 204 | CONFIG_STRING(NgenDumpIRFormat, W("NgenDumpIRFormat" )) // Same as JitDumpIRFormat, but for ngen |
| 205 | CONFIG_STRING(NgenDumpIRPhase, W("NgenDumpIRPhase" )) // Same as JitDumpIRPhase, but for ngen |
| 206 | /// |
| 207 | /// JIT Hardware Intrinsics |
| 208 | /// |
| 209 | CONFIG_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 |
| 217 | CONFIG_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_) |
| 223 | CONFIG_INTEGER(AltJitAssertOnNYI, W("AltJitAssertOnNYI" ), 0) // Controls the AltJit behavior of NYI stuff |
| 224 | #else // !defined(_TARGET_ARM64_) && !defined(_TARGET_X86_) |
| 225 | CONFIG_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_) |
| 231 | CONFIG_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. |
| 237 | CONFIG_INTEGER(EnableHWIntrinsic, W("EnableHWIntrinsic" ), 1) // Enable Base |
| 238 | CONFIG_INTEGER(EnableSSE, W("EnableSSE" ), 1) // Enable SSE |
| 239 | CONFIG_INTEGER(EnableSSE2, W("EnableSSE2" ), 1) // Enable SSE2 |
| 240 | CONFIG_INTEGER(EnableSSE3, W("EnableSSE3" ), 1) // Enable SSE3 |
| 241 | CONFIG_INTEGER(EnableSSSE3, W("EnableSSSE3" ), 1) // Enable SSSE3 |
| 242 | CONFIG_INTEGER(EnableSSE41, W("EnableSSE41" ), 1) // Enable SSE41 |
| 243 | CONFIG_INTEGER(EnableSSE42, W("EnableSSE42" ), 1) // Enable SSE42 |
| 244 | CONFIG_INTEGER(EnableAVX, W("EnableAVX" ), 1) // Enable AVX |
| 245 | CONFIG_INTEGER(EnableAVX2, W("EnableAVX2" ), 1) // Enable AVX2 |
| 246 | CONFIG_INTEGER(EnableFMA, W("EnableFMA" ), 1) // Enable FMA |
| 247 | CONFIG_INTEGER(EnableAES, W("EnableAES" ), 1) // Enable AES |
| 248 | CONFIG_INTEGER(EnableBMI1, W("EnableBMI1" ), 1) // Enable BMI1 |
| 249 | CONFIG_INTEGER(EnableBMI2, W("EnableBMI2" ), 1) // Enable BMI2 |
| 250 | CONFIG_INTEGER(EnableLZCNT, W("EnableLZCNT" ), 1) // Enable AES |
| 251 | CONFIG_INTEGER(EnablePCLMULQDQ, W("EnablePCLMULQDQ" ), 1) // Enable PCLMULQDQ |
| 252 | CONFIG_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 |
| 255 | CONFIG_INTEGER(EnableAVX, W("EnableAVX" ), 0) |
| 256 | #endif // !defined(_TARGET_AMD64_) && !defined(_TARGET_X86_) |
| 257 | /// |
| 258 | /// JIT |
| 259 | /// |
| 260 | #if !defined(DEBUG) && !defined(_DEBUG) |
| 261 | CONFIG_INTEGER(JitEnableNoWayAssert, W("JitEnableNoWayAssert" ), 0) |
| 262 | #else // defined(DEBUG) || defined(_DEBUG) |
| 263 | CONFIG_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 |
| 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(JitTelemetry, W("JitTelemetry" ), 1) // If non-zero, gather JIT telemetry data |
| 307 | |
| 308 | // Max # of MapSelect's considered for a particular top-level invocation. |
| 309 | CONFIG_INTEGER(JitVNMapSelBudget, W("JitVNMapSelBudget" ), DEFAULT_MAP_SELECT_BUDGET) |
| 310 | |
| 311 | CONFIG_INTEGER(TailCallLoopOpt, W("TailCallLoopOpt" ), 1) // Convert recursive tail calls to loops |
| 312 | CONFIG_METHODSET(AltJit, W("AltJit" )) // Enables AltJit and selectively limits it to the specified methods. |
| 313 | CONFIG_METHODSET(AltJitNgen, W("AltJitNgen" )) // Enables AltJit for NGEN and selectively limits it |
| 314 | // to the specified methods. |
| 315 | |
| 316 | #if defined(ALT_JIT) |
| 317 | CONFIG_STRING(AltJitExcludeAssemblies, W("AltJitExcludeAssemblies" )) // Do not use AltJit on this |
| 318 | // semicolon-delimited list of assemblies. |
| 319 | #endif // defined(ALT_JIT) |
| 320 | |
| 321 | CONFIG_INTEGER(JitMeasureIR, W("JitMeasureIR" ), 0) // If set, measure the IR size after some phases and report it in |
| 322 | // the time log. |
| 323 | |
| 324 | CONFIG_STRING(JitFuncInfoFile, W("JitFuncInfoLogFile" )) // If set, gather JIT function info and write to this file. |
| 325 | CONFIG_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. |
| 327 | CONFIG_STRING(TailCallOpt, W("TailCallOpt" )) |
| 328 | |
| 329 | CONFIG_INTEGER(JitMeasureNowayAssert, W("JitMeasureNowayAssert" ), 0) // Set to 1 to measure noway_assert usage. Only |
| 330 | // valid if MEASURE_NOWAY is defined. |
| 331 | CONFIG_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) |
| 336 | CONFIG_INTEGER(JitInlineDumpData, W("JitInlineDumpData" ), 0) |
| 337 | CONFIG_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 |
| 340 | CONFIG_INTEGER(JitInlineLimit, W("JitInlineLimit" ), -1) |
| 341 | CONFIG_INTEGER(JitInlinePolicyDiscretionary, W("JitInlinePolicyDiscretionary" ), 0) |
| 342 | CONFIG_INTEGER(JitInlinePolicyFull, W("JitInlinePolicyFull" ), 0) |
| 343 | CONFIG_INTEGER(JitInlinePolicySize, W("JitInlinePolicySize" ), 0) |
| 344 | CONFIG_INTEGER(JitInlinePolicyRandom, W("JitInlinePolicyRandom" ), 0) // nonzero enables; value is the external random |
| 345 | // seed |
| 346 | CONFIG_INTEGER(JitInlinePolicyReplay, W("JitInlinePolicyReplay" ), 0) |
| 347 | CONFIG_STRING(JitNoInlineRange, W("JitNoInlineRange" )) |
| 348 | CONFIG_STRING(JitInlineReplayFile, W("JitInlineReplayFile" )) |
| 349 | #endif // defined(DEBUG) || defined(INLINE_DATA) |
| 350 | |
| 351 | CONFIG_INTEGER(JitInlinePolicyModel, W("JitInlinePolicyModel" ), 0) |
| 352 | CONFIG_INTEGER(JitObjectStackAllocation, W("JitObjectStackAllocation" ), 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 | // Overall master enable for Guarded Devirtualization. Currently not enabled by default. |
| 367 | CONFIG_INTEGER(JitEnableGuardedDevirtualization, W("JitEnableGuardedDevirtualization" ), 0) |
| 368 | |
| 369 | #if defined(DEBUG) |
| 370 | // Various policies for GuardedDevirtualization |
| 371 | CONFIG_INTEGER(JitGuardedDevirtualizationGuessUniqueInterface, W("JitGuardedDevirtualizationGuessUniqueInterface" ), 1) |
| 372 | CONFIG_INTEGER(JitGuardedDevirtualizationGuessBestClass, W("JitGuardedDevirtualizationGuessBestClass" ), 1) |
| 373 | #endif // DEBUG |
| 374 | |
| 375 | #undef CONFIG_INTEGER |
| 376 | #undef CONFIG_STRING |
| 377 | #undef CONFIG_METHODSET |
| 378 | |