From: Mike Danes Date: Sat, 16 Jun 2018 17:04:09 +0000 (+0300) Subject: Remove unused Compiler members X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c991031d4cfb8c82bd0d9c736e584e1c8c329d4b;p=platform%2Fupstream%2Fcoreclr.git Remove unused Compiler members --- diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index 470557b7ba..8f803b993e 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -1486,13 +1486,6 @@ void Compiler::compShutdown() } #endif // FEATURE_JIT_METHOD_PERF -#if COUNT_RANGECHECKS - if (optRangeChkAll > 0) - { - fprintf(fout, "Removed %u of %u range checks\n", optRangeChkRmv, optRangeChkAll); - } -#endif // COUNT_RANGECHECKS - #if COUNT_AST_OPERS // Add up all the counts so that we can show percentages of total @@ -2007,9 +2000,7 @@ void Compiler::compInit(ArenaAllocator* pAlloc, InlineInfo* inlineInfo) compQmarkUsed = false; compFloatingPointUsed = false; compUnsafeCastUsed = false; -#if CPU_USES_BLOCK_MOVE - compBlkOpUsed = false; -#endif + compNeedsGSSecurityCookie = false; compGSReorderStackLayout = false; #if STACK_PROBES diff --git a/src/jit/compiler.h b/src/jit/compiler.h index a5f546fef7..0a51e1f611 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -3758,19 +3758,13 @@ public: unsigned fgMeasureIR(); -#if OPT_BOOL_OPS // Used to detect multiple logical "not" assignments. - bool fgMultipleNots; -#endif - bool fgModified; // True if the flow graph has been modified recently bool fgComputePredsDone; // Have we computed the bbPreds list bool fgCheapPredsValid; // Is the bbCheapPreds list valid? bool fgDomsComputed; // Have we computed the dominator sets? bool fgOptimizedFinally; // Did we optimize any try-finallys? - bool fgHasSwitch; // any BBJ_SWITCH jumps? - bool fgHasPostfix; // any postfix ++/-- found? - unsigned fgIncrCount; // number of increment nodes found + bool fgHasSwitch; // any BBJ_SWITCH jumps? BlockSet fgEnterBlks; // Set of blocks which have a special transfer of control; the "entry" blocks plus EH handler // begin blocks. @@ -3948,11 +3942,6 @@ public: void fgLiveVarAnalysis(bool updateInternalOnly = false); - // This is used in the liveness computation, as a temporary. When we use the - // arbitrary-length VarSet representation, it is better not to allocate a new one - // at each call. - VARSET_TP fgMarkIntfUnionVS; - void fgUpdateRefCntForClone(BasicBlock* addedToBlock, GenTree* clonedTree); void fgUpdateRefCntForExtract(GenTree* wholeTree, GenTree* keptTree); @@ -6320,33 +6309,7 @@ public: BasicBlock* slow); void optInsertLoopCloningStress(BasicBlock* head); -#if COUNT_RANGECHECKS - static unsigned optRangeChkRmv; - static unsigned optRangeChkAll; -#endif - protected: - struct arraySizes - { - unsigned arrayVar; - int arrayDim; - -#define MAX_ARRAYS 4 // a magic max number of arrays tracked for bounds check elimination - }; - - struct RngChkDsc - { - RngChkDsc* rcdNextInBucket; // used by the hash table - - unsigned short rcdHashValue; // to make matching faster - unsigned short rcdIndex; // 0..optRngChkCount-1 - - GenTree* rcdTree; // the array index tree - }; - - unsigned optRngChkCount; - static const size_t optRngChkHashSize; - ssize_t optGetArrayRefScaleAndIndex(GenTree* mul, GenTree** pIndex DEBUGARG(bool bRngChk)); GenTree* optFindLocalInit(BasicBlock* block, GenTree* local, VARSET_TP* pKilledInOut, bool* isKilledAfterInit); @@ -7826,10 +7789,6 @@ public: // NOTE: These values are only reliable after // the importing is completely finished. -#if CPU_USES_BLOCK_MOVE - bool compBlkOpUsed; // Does the method do a COPYBLK or INITBLK -#endif - #ifdef DEBUG // State information - which phases have completed? // These are kept together for easy discoverability diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index 7516792b3f..46eefa4167 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -126,8 +126,6 @@ void Compiler::fgInit() /* This global flag is set whenever we add a throw block for a RngChk */ fgRngChkThrowAdded = false; /* reset flag for fgIsCodeAdded() */ - fgIncrCount = 0; - /* We will record a list of all BBJ_RETURN blocks here */ fgReturnBlocks = nullptr; @@ -6808,8 +6806,6 @@ unsigned Compiler::fgGetNestingLevel(BasicBlock* block, unsigned* pFinallyNestin void Compiler::fgImport() { - fgHasPostfix = false; - impImport(fgFirstBB); if (!opts.jitFlags->IsSet(JitFlags::JIT_FLAG_SKIP_VERIFICATION)) diff --git a/src/jit/jit.h b/src/jit/jit.h index f6a575d262..f09b31d49d 100644 --- a/src/jit/jit.h +++ b/src/jit/jit.h @@ -471,7 +471,6 @@ typedef ptrdiff_t ssize_t; // case of single block methods. #define COUNT_LOOPS 0 // Collect stats about loops, such as the total number of natural loops, a histogram of // the number of loop exits, etc. -#define COUNT_RANGECHECKS 0 // Count range checks removed (in lexical CSE?). #define DATAFLOW_ITER 0 // Count iterations in lexical CSE and constant folding dataflow. #define DISPLAY_SIZES 0 // Display generated code, data, and GC information sizes. #define MEASURE_BLOCK_SIZE 0 // Collect stats about basic block and flowList node sizes and memory allocations. diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp index a959358db5..c99df5cc70 100644 --- a/src/jit/liveness.cpp +++ b/src/jit/liveness.cpp @@ -2511,9 +2511,6 @@ void Compiler::fgInterBlockLocalVarLiveness() * Now fill in liveness info within each basic block - Backward DataFlow */ - // This is used in the liveness computation, as a temporary. - VarSetOps::AssignNoCopy(this, fgMarkIntfUnionVS, VarSetOps::MakeEmpty(this)); - for (block = fgFirstBB; block; block = block->bbNext) { /* Tell everyone what block we're working on */ diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 6fd800eadc..ffd25d3421 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -9644,9 +9644,6 @@ GenTree* Compiler::fgMorphInitBlock(GenTree* tree) // if (!destDoFldAsg) { -#if CPU_USES_BLOCK_MOVE - compBlkOpUsed = true; -#endif dest = fgMorphBlockOperand(dest, dest->TypeGet(), blockWidth, true); tree->gtOp.gtOp1 = dest; tree->gtFlags |= (dest->gtFlags & GTF_ALL_EFFECT); @@ -10588,9 +10585,6 @@ GenTree* Compiler::fgMorphCopyBlock(GenTree* tree) if (requiresCopyBlock) { -#if CPU_USES_BLOCK_MOVE - compBlkOpUsed = true; -#endif var_types asgType = dest->TypeGet(); dest = fgMorphBlockOperand(dest, asgType, blockWidth, true /*isDest*/); asg->gtOp.gtOp1 = dest; @@ -17062,10 +17056,6 @@ void Compiler::fgMorph() fgAddInternal(); -#if OPT_BOOL_OPS - fgMultipleNots = false; -#endif - #ifdef DEBUG /* Inliner could add basic blocks. Check that the flowgraph data is up-to-date */ fgDebugCheckBBlist(false, false); diff --git a/src/jit/optimizer.cpp b/src/jit/optimizer.cpp index f27b913462..27120b98f2 100644 --- a/src/jit/optimizer.cpp +++ b/src/jit/optimizer.cpp @@ -19,15 +19,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX /*****************************************************************************/ -#if COUNT_RANGECHECKS -/* static */ -unsigned Compiler::optRangeChkRmv = 0; -/* static */ -unsigned Compiler::optRangeChkAll = 0; -#endif - -/*****************************************************************************/ - void Compiler::optInit() { optLoopsMarked = false; diff --git a/src/jit/target.h b/src/jit/target.h index c374b0dbd7..9771f9a5d9 100644 --- a/src/jit/target.h +++ b/src/jit/target.h @@ -225,7 +225,6 @@ typedef unsigned char regNumberSmall; #define CPU_HAS_FP_SUPPORT 1 #define ROUND_FLOAT 1 // round intermed float expression results #define CPU_HAS_BYTE_REGS 1 - #define CPU_USES_BLOCK_MOVE 1 // TODO-CQ: Fine tune the following xxBlk threshold values: @@ -513,7 +512,6 @@ typedef unsigned char regNumberSmall; #define CPU_HAS_FP_SUPPORT 1 #define ROUND_FLOAT 0 // Do not round intermed float expression results #define CPU_HAS_BYTE_REGS 0 - #define CPU_USES_BLOCK_MOVE 1 #define CPBLK_MOVS_LIMIT 16 // When generating code for CpBlk, this is the buffer size // threshold to stop generating rep movs and switch to the helper call. @@ -918,7 +916,6 @@ typedef unsigned char regNumberSmall; #define CPU_HAS_FP_SUPPORT 1 #define ROUND_FLOAT 0 // Do not round intermed float expression results #define CPU_HAS_BYTE_REGS 0 - #define CPU_USES_BLOCK_MOVE 0 #define CPBLK_UNROLL_LIMIT 32 // Upper bound to let the code generator to loop unroll CpBlk. #define INITBLK_UNROLL_LIMIT 32 // Upper bound to let the code generator to loop unroll InitBlk. @@ -1219,7 +1216,6 @@ typedef unsigned char regNumberSmall; #define CPU_HAS_FP_SUPPORT 1 #define ROUND_FLOAT 0 // Do not round intermed float expression results #define CPU_HAS_BYTE_REGS 0 - #define CPU_USES_BLOCK_MOVE 0 #define CPBLK_UNROLL_LIMIT 64 // Upper bound to let the code generator to loop unroll CpBlk. #define INITBLK_UNROLL_LIMIT 64 // Upper bound to let the code generator to loop unroll InitBlk.