}
#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
compQmarkUsed = false;
compFloatingPointUsed = false;
compUnsafeCastUsed = false;
-#if CPU_USES_BLOCK_MOVE
- compBlkOpUsed = false;
-#endif
+
compNeedsGSSecurityCookie = false;
compGSReorderStackLayout = false;
#if STACK_PROBES
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.
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);
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);
// 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
/* 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;
void Compiler::fgImport()
{
- fgHasPostfix = false;
-
impImport(fgFirstBB);
if (!opts.jitFlags->IsSet(JitFlags::JIT_FLAG_SKIP_VERIFICATION))
// 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.
* 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 */
//
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);
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;
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);
/*****************************************************************************/
-#if COUNT_RANGECHECKS
-/* static */
-unsigned Compiler::optRangeChkRmv = 0;
-/* static */
-unsigned Compiler::optRangeChkAll = 0;
-#endif
-
-/*****************************************************************************/
-
void Compiler::optInit()
{
optLoopsMarked = false;
#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:
#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.
#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.
#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.