diff options
author | Pat Gavlin <pgavlin@gmail.com> | 2016-06-01 23:58:48 +0000 |
---|---|---|
committer | Pat Gavlin <pgavlin@gmail.com> | 2016-06-01 23:58:48 +0000 |
commit | e85f02a0ec48154cb6fe1fa2fa2d7db5e48042cd (patch) | |
tree | 6d7a3a284db2fc46127d1270d4fd15d30c96753d | |
parent | e0a1e0b5f264d52471bb49aa1771ca6fb5cec1c3 (diff) | |
parent | bf8d72f10fa139af49ccc26b2146196297f0de79 (diff) | |
download | coreclr-e85f02a0ec48154cb6fe1fa2fa2d7db5e48042cd.tar.gz coreclr-e85f02a0ec48154cb6fe1fa2fa2d7db5e48042cd.tar.bz2 coreclr-e85f02a0ec48154cb6fe1fa2fa2d7db5e48042cd.zip |
Merge pull request #5375 from pgavlin/CSECleanup
Remove some lexical-CSE-related code.
-rw-r--r-- | src/jit/compiler.h | 2 | ||||
-rw-r--r-- | src/jit/optcse.cpp | 27 | ||||
-rw-r--r-- | src/jit/target.h | 6 |
3 files changed, 14 insertions, 21 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 6b115c2aeb..28bde5f651 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -5401,7 +5401,7 @@ protected : } #ifdef DEBUG - bool optConfigDisableCSE(bool lexicalCSE); + bool optConfigDisableCSE(); bool optConfigDisableCSE2(); #endif void optOptimizeCSEs(); diff --git a/src/jit/optcse.cpp b/src/jit/optcse.cpp index cfd0803ff8..5f01465df0 100644 --- a/src/jit/optcse.cpp +++ b/src/jit/optcse.cpp @@ -2074,7 +2074,7 @@ void Compiler::optOptimizeValnumCSEs() if (verbose) printf("\n*************** In optOptimizeValnumCSEs()\n"); - if (optConfigDisableCSE(false)) + if (optConfigDisableCSE()) return; // Disabled by JitNoCSE #endif @@ -2271,18 +2271,8 @@ bool Compiler::optIsCSEcandidate(GenTreePtr tree) // If this method returns false then the CSE phase should be performed. // If the method returns true then the CSE phase should be skipped. // -bool Compiler::optConfigDisableCSE(bool lexicalCSE) +bool Compiler::optConfigDisableCSE() { - bool enabled = true; - -#if VALNUM_CSE_ENABLED - if (lexicalCSE) - return true; // lexical CSE phase is disabled -#else - if (!lexicalCSE) - return true; // valnum CSE phase is disabled -#endif - // Next check if COMPlus_JitNoCSE is set and applies to this method // unsigned jitNoCSE = JitConfig.JitNoCSE(); @@ -2297,20 +2287,27 @@ bool Compiler::optConfigDisableCSE(bool lexicalCSE) unsigned bitsOne = (jitNoCSE >> 0) & 0xFFF; if ((( methodCountMask & bitsOne) == bitsOne) && - ((~methodCountMask & bitsZero) == bitsZero) ) + ((~methodCountMask & bitsZero) == bitsZero)) { - if (verbose) + if (verbose) + { printf(" Disabled by JitNoCSE methodCountMask\n"); + } + return true; // The CSE phase for this method is disabled } } else if (jitNoCSE <= (methodCount+1)) { - if (verbose) + if (verbose) + { printf(" Disabled by JitNoCSE > methodCount\n"); + } + return true; // The CSE phase for this method is disabled } } + return false; } diff --git a/src/jit/target.h b/src/jit/target.h index 0afdd9b3d1..81c3f5328f 100644 --- a/src/jit/target.h +++ b/src/jit/target.h @@ -330,10 +330,6 @@ typedef unsigned short regPairNoSmall; // arm: need 12 bits /*****************************************************************************/ -#define VALNUM_CSE_ENABLED 1 - -/*****************************************************************************/ - #if defined(_TARGET_X86_) #define CPU_LOAD_STORE_ARCH 0 @@ -415,7 +411,7 @@ typedef unsigned short regPairNoSmall; // arm: need 12 bits #else // LEGACY_BACKEND #define FEATURE_STACK_FP_X87 1 // Use flat register file model #endif // LEGACY_BACKEND - #define FEATURE_X87_DOUBLES (1-VALNUM_CSE_ENABLED) // FP tree temps always use x87 doubles (when 1) or can be double or float (when 0) + #define FEATURE_X87_DOUBLES 0 // FP tree temps always use x87 doubles (when 1) or can be double or float (when 0). #define ETW_EBP_FRAMED 1 // if 1 we cannot use EBP as a scratch register and must create EBP based frames for most methods #define CSE_CONSTS 1 // Enable if we want to CSE constants |