diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2016-10-14 08:55:25 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-10-14 08:55:25 -0700 |
commit | 13fd17f72c5c311d8a4a685310d14b536d568bcd (patch) | |
tree | 914478bf02155d38255bb9a814edbff57268199e /src | |
parent | f8c3968a769c8a847fd122cba6c08bada33c3552 (diff) | |
download | coreclr-13fd17f72c5c311d8a4a685310d14b536d568bcd.tar.gz coreclr-13fd17f72c5c311d8a4a685310d14b536d568bcd.tar.bz2 coreclr-13fd17f72c5c311d8a4a685310d14b536d568bcd.zip |
Remove DEBUGGING_SUPPORT #ifdef (#7611)
This is always on. It hadn't been turned off in a long, long
time, if ever, and we don't expect to ever turn it off.
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/block.h | 2 | ||||
-rwxr-xr-x | src/jit/codegen.h | 16 | ||||
-rw-r--r-- | src/jit/codegenarm64.cpp | 4 | ||||
-rwxr-xr-x | src/jit/codegencommon.cpp | 30 | ||||
-rw-r--r-- | src/jit/codegeninterface.h | 2 | ||||
-rw-r--r-- | src/jit/codegenlegacy.cpp | 40 | ||||
-rw-r--r-- | src/jit/codegenlinear.cpp | 14 | ||||
-rw-r--r-- | src/jit/codegenxarch.cpp | 6 | ||||
-rw-r--r-- | src/jit/compiler.cpp | 41 | ||||
-rw-r--r-- | src/jit/compiler.h | 23 | ||||
-rw-r--r-- | src/jit/emit.cpp | 12 | ||||
-rw-r--r-- | src/jit/emitarm.cpp | 2 | ||||
-rw-r--r-- | src/jit/emitarm64.cpp | 2 | ||||
-rw-r--r-- | src/jit/emitxarch.cpp | 2 | ||||
-rw-r--r-- | src/jit/flowgraph.cpp | 13 | ||||
-rw-r--r-- | src/jit/gentree.cpp | 2 | ||||
-rw-r--r-- | src/jit/gentree.h | 7 | ||||
-rw-r--r-- | src/jit/importer.cpp | 11 | ||||
-rw-r--r-- | src/jit/jit.h | 11 | ||||
-rw-r--r-- | src/jit/lclvars.cpp | 4 | ||||
-rw-r--r-- | src/jit/liveness.cpp | 21 | ||||
-rw-r--r-- | src/jit/morph.cpp | 2 | ||||
-rw-r--r-- | src/jit/optimizer.cpp | 2 | ||||
-rw-r--r-- | src/jit/regalloc.cpp | 3 | ||||
-rw-r--r-- | src/jit/registerfp.cpp | 6 | ||||
-rw-r--r-- | src/jit/scopeinfo.cpp | 18 | ||||
-rw-r--r-- | src/jit/stackfp.cpp | 3 |
27 files changed, 24 insertions, 275 deletions
diff --git a/src/jit/block.h b/src/jit/block.h index ecfbb620a1..4124f59c6c 100644 --- a/src/jit/block.h +++ b/src/jit/block.h @@ -860,9 +860,7 @@ struct BasicBlock : private LIR::Range unsigned bbHeapSsaNumIn; // The SSA # of "Heap" on entry to the block. unsigned bbHeapSsaNumOut; // The SSA # of "Heap" on exit from the block. -#ifdef DEBUGGING_SUPPORT VARSET_TP bbScope; // variables in scope over the block -#endif void InitVarSets(class Compiler* comp); diff --git a/src/jit/codegen.h b/src/jit/codegen.h index e042efae0e..b6c8c18b29 100755 --- a/src/jit/codegen.h +++ b/src/jit/codegen.h @@ -500,9 +500,15 @@ protected: regMaskTP genPushRegs(regMaskTP regs, regMaskTP* byrefRegs, regMaskTP* noRefRegs); void genPopRegs(regMaskTP regs, regMaskTP byrefRegs, regMaskTP noRefRegs); -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT -/*****************************************************************************/ +/* +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XX XX +XX Debugging Support XX +XX XX +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +*/ #ifdef DEBUG void genIPmappingDisp(unsigned mappingNum, Compiler::IPmappingDsc* ipMapping); @@ -736,10 +742,6 @@ protected: unsigned genTrnslLocalVarCount; #endif -/*****************************************************************************/ -#endif // DEBUGGING_SUPPORT -/*****************************************************************************/ - #ifndef LEGACY_BACKEND #include "codegenlinear.h" #else // LEGACY_BACKEND diff --git a/src/jit/codegenarm64.cpp b/src/jit/codegenarm64.cpp index 82ffb12ff2..6fe7eb99cb 100644 --- a/src/jit/codegenarm64.cpp +++ b/src/jit/codegenarm64.cpp @@ -4317,7 +4317,6 @@ void CodeGen::genCallInstruction(GenTreePtr node) } } -#ifdef DEBUGGING_SUPPORT // We need to propagate the IL offset information to the call instruction, so we can emit // an IL to native mapping record for the call, to support managed return value debugging. // We don't want tail call helper calls that were converted from normal calls to get a record, @@ -4326,7 +4325,6 @@ void CodeGen::genCallInstruction(GenTreePtr node) { (void)compiler->genCallSite2ILOffsetMap->Lookup(call, &ilOffset); } -#endif // DEBUGGING_SUPPORT if (target != nullptr) { @@ -6019,7 +6017,6 @@ void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize // Now we can actually use those slot ID's to declare live ranges. gcInfo.gcMakeRegPtrTable(gcInfoEncoder, codeSize, prologSize, GCInfo::MAKE_REG_PTR_MODE_DO_WORK); -#if defined(DEBUGGING_SUPPORT) if (compiler->opts.compDbgEnC) { // what we have to preserve is called the "frame header" (see comments in VM\eetwain.cpp) @@ -6043,7 +6040,6 @@ void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize // frame gcInfoEncoder->SetSizeOfEditAndContinuePreservedArea(preservedAreaSize); } -#endif gcInfoEncoder->Build(); diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index cb2013d8b7..91977e99c8 100755 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -167,12 +167,10 @@ CodeGen::CodeGen(Compiler* theCompiler) : CodeGenInterface(theCompiler) genFlagsEqualToNone(); #endif // LEGACY_BACKEND -#ifdef DEBUGGING_SUPPORT // Initialize the IP-mapping logic. compiler->genIPmappingList = nullptr; compiler->genIPmappingLast = nullptr; compiler->genCallSite2ILOffsetMap = nullptr; -#endif /* Assume that we not fully interruptible */ @@ -1010,9 +1008,7 @@ void Compiler::compUpdateLifeVar(GenTreePtr tree, VARSET_TP* pLastUseVars) #endif // LEGACY_BACKEND -#ifdef DEBUGGING_SUPPORT codeGen->siUpdate(); -#endif } } @@ -1178,9 +1174,7 @@ void Compiler::compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTreePtr tree) #endif // !LEGACY_BACKEND } -#ifdef DEBUGGING_SUPPORT codeGen->siUpdate(); -#endif } // Need an explicit instantiation. @@ -2583,14 +2577,12 @@ emitJumpKind CodeGen::genJumpKindForOper(genTreeOps cmp, CompareKind compareKind void CodeGen::genExitCode(BasicBlock* block) { -#ifdef DEBUGGING_SUPPORT /* Just wrote the first instruction of the epilog - inform debugger Note that this may result in a duplicate IPmapping entry, and that this is ok */ // For non-optimized debuggable code, there is only one epilog. genIPmappingAdd((IL_OFFSETX)ICorDebugInfo::EPILOG, true); -#endif // DEBUGGING_SUPPORT bool jmpEpilog = ((block->bbFlags & BBF_HAS_JMP) != 0); if (compiler->getNeedsGSSecurityCookie()) @@ -3160,8 +3152,6 @@ void CodeGen::genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode) compiler->unwindEmit(*codePtr, coldCodePtr); -#ifdef DEBUGGING_SUPPORT - /* Finalize the line # tracking logic after we know the exact block sizes/offsets */ genIPmappingGen(); @@ -3170,8 +3160,6 @@ void CodeGen::genGenerateCode(void** codePtr, ULONG* nativeSizeOfCode) genSetScopeInfo(); -#endif // DEBUGGING_SUPPORT - #ifdef LATE_DISASM unsigned finalHotCodeSize; unsigned finalColdCodeSize; @@ -8209,11 +8197,9 @@ void CodeGen::genFnProlog() getEmitter()->emitBegProlog(); compiler->unwindBegProlog(); -#ifdef DEBUGGING_SUPPORT // Do this so we can put the prolog instruction group ahead of // other instruction groups genIPmappingAddToFront((IL_OFFSETX)ICorDebugInfo::PROLOG); -#endif // DEBUGGING_SUPPORT #ifdef DEBUG if (compiler->opts.dspCode) @@ -8222,13 +8208,11 @@ void CodeGen::genFnProlog() } #endif -#ifdef DEBUGGING_SUPPORT if (compiler->opts.compScopeInfo && (compiler->info.compVarScopesCount > 0)) { // Create new scopes for the method-parameters for the prolog-block. psiBegProlog(); } -#endif #ifdef DEBUG @@ -8914,12 +8898,10 @@ void CodeGen::genFnProlog() getEmitter()->emitMarkPrologEnd(); } -#ifdef DEBUGGING_SUPPORT if (compiler->opts.compScopeInfo && (compiler->info.compVarScopesCount > 0)) { psiEndProlog(); } -#endif if (hasGCRef) { @@ -11052,9 +11034,6 @@ void CodeGen::genPopRegs(regMaskTP regs, regMaskTP byrefRegs, regMaskTP noRefReg #endif // FEATURE_FIXED_OUT_ARGS } -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT - /***************************************************************************** * genSetScopeInfo * @@ -11948,19 +11927,16 @@ void CodeGen::genIPmappingGen() compiler->eeSetLIdone(); } -#endif // DEBUGGING_SUPPORT - /*============================================================================ * * These are empty stubs to help the late dis-assembler to compile - * if DEBUGGING_SUPPORT is not enabled, or the late disassembler is being - * built into a non-DEBUG build. + * if the late disassembler is being built into a non-DEBUG build. * *============================================================================ */ #if defined(LATE_DISASM) -#if !defined(DEBUGGING_SUPPORT) || !defined(DEBUG) +#if !defined(DEBUG) /* virtual */ const char* CodeGen::siRegVarName(size_t offs, size_t size, unsigned reg) @@ -11975,6 +11951,6 @@ const char* CodeGen::siStackVarName(size_t offs, size_t size, unsigned reg, unsi } /*****************************************************************************/ -#endif // !defined(DEBUGGING_SUPPORT) || !defined(DEBUG) +#endif // !defined(DEBUG) #endif // defined(LATE_DISASM) /*****************************************************************************/ diff --git a/src/jit/codegeninterface.h b/src/jit/codegeninterface.h index b1936edf32..3950673e3a 100644 --- a/src/jit/codegeninterface.h +++ b/src/jit/codegeninterface.h @@ -426,10 +426,8 @@ public: private: bool m_cgFullPtrRegMap; -#ifdef DEBUGGING_SUPPORT public: virtual void siUpdate() = 0; -#endif // DEBUGGING_SUPPORT #ifdef LATE_DISASM public: diff --git a/src/jit/codegenlegacy.cpp b/src/jit/codegenlegacy.cpp index 1fbc10c1f8..5c1bb0990e 100644 --- a/src/jit/codegenlegacy.cpp +++ b/src/jit/codegenlegacy.cpp @@ -4316,8 +4316,6 @@ emitJumpKind CodeGen::genCondSetFlags(GenTreePtr cond) addrReg1 = genMakeRvalueAddressable(op1, RBM_NONE, RegSet::KEEP_REG, false, smallOk); } - // #if defined(DEBUGGING_SUPPORT) - /* Special case: comparison of two constants */ // Needed if Importer doesn't call gtFoldExpr() @@ -4335,8 +4333,6 @@ emitJumpKind CodeGen::genCondSetFlags(GenTreePtr cond) addrReg1 = genRegMask(op1->gtRegNum); } - // #endif - /* Compare the operand against the constant */ if (op2->IsIconHandle()) @@ -11281,10 +11277,8 @@ void CodeGen::genCodeForTreeSmpOpAsg(GenTreePtr tree) bool volat = false; // Is this a volatile store regMaskTP regGC; instruction ins; -#ifdef DEBUGGING_SUPPORT - unsigned lclVarNum = compiler->lvaCount; - unsigned lclILoffs = DUMMY_INIT(0); -#endif + unsigned lclVarNum = compiler->lvaCount; + unsigned lclILoffs = DUMMY_INIT(0); #ifdef _TARGET_ARM_ if (tree->gtType == TYP_STRUCT) @@ -11323,7 +11317,6 @@ void CodeGen::genCodeForTreeSmpOpAsg(GenTreePtr tree) noway_assert(varNum < compiler->lvaCount); varDsc = compiler->lvaTable + varNum; -#ifdef DEBUGGING_SUPPORT /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. * Remember the local var info to call siCheckVarScope @@ -11334,7 +11327,6 @@ void CodeGen::genCodeForTreeSmpOpAsg(GenTreePtr tree) lclVarNum = varNum; lclILoffs = op1->gtLclVar.gtLclILoffs; } -#endif /* Check against dead store ? (with min opts we may have dead stores) */ @@ -11987,13 +11979,11 @@ void CodeGen::genCodeForTreeSmpOpAsg(GenTreePtr tree) genCodeForTreeSmpOpAsg_DONE_ASSG(tree, addrReg, REG_NA, ovfl); LExit: -#ifdef DEBUGGING_SUPPORT /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. */ if (lclVarNum < compiler->lvaCount) siCheckVarScope(lclVarNum, lclILoffs); -#endif } #ifdef _PREFAST_ #pragma warning(pop) @@ -12424,14 +12414,12 @@ void CodeGen::genCodeForBBlist() regSet.rsSpillBeg(); -#ifdef DEBUGGING_SUPPORT /* Initialize the line# tracking logic */ if (compiler->opts.compScopeInfo) { siInit(); } -#endif #ifdef _TARGET_X86_ if (compiler->compTailCallUsed) @@ -12770,7 +12758,6 @@ void CodeGen::genCodeForBBlist() compiler->compCurBB = block; -#ifdef DEBUGGING_SUPPORT siBeginBlock(block); // BBF_INTERNAL blocks don't correspond to any single IL instruction. @@ -12778,7 +12765,6 @@ void CodeGen::genCodeForBBlist() genIPmappingAdd((IL_OFFSETX)ICorDebugInfo::NO_MAPPING, true); bool firstMapping = true; -#endif // DEBUGGING_SUPPORT /*--------------------------------------------------------------------- * @@ -12798,8 +12784,6 @@ void CodeGen::genCodeForBBlist() { noway_assert(stmt->gtOper == GT_STMT); -#if defined(DEBUGGING_SUPPORT) - /* Do we have a new IL-offset ? */ if (stmt->gtStmt.gtStmtILoffsx != BAD_IL_OFFSET) @@ -12809,8 +12793,6 @@ void CodeGen::genCodeForBBlist() firstMapping = false; } -#endif // DEBUGGING_SUPPORT - #ifdef DEBUG if (stmt->gtStmt.gtStmtLastILoffs != BAD_IL_OFFSET) { @@ -12940,14 +12922,10 @@ void CodeGen::genCodeForBBlist() noway_assert(stmt->gtOper == GT_STMT); -#ifdef DEBUGGING_SUPPORT genEnsureCodeEmitted(stmt->gtStmt.gtStmtILoffsx); -#endif } //-------- END-FOR each statement-tree of the current block --------- -#ifdef DEBUGGING_SUPPORT - if (compiler->opts.compScopeInfo && (compiler->info.compVarScopesCount > 0)) { siEndBlock(block); @@ -12973,8 +12951,6 @@ void CodeGen::genCodeForBBlist() } } -#endif // DEBUGGING_SUPPORT - genStackLevel -= savedStkLvl; gcInfo.gcMarkRegSetNpt(gcrefRegs | byrefRegs); @@ -13417,10 +13393,8 @@ void CodeGen::genCodeForTreeLng(GenTreePtr tree, regMaskTP needReg, regMaskTP av { case GT_ASG: { -#ifdef DEBUGGING_SUPPORT unsigned lclVarNum = compiler->lvaCount; unsigned lclVarILoffs = DUMMY_INIT(0); -#endif /* Is the target a local ? */ @@ -13435,7 +13409,6 @@ void CodeGen::genCodeForTreeLng(GenTreePtr tree, regMaskTP needReg, regMaskTP av // No dead stores, (with min opts we may have dead stores) noway_assert(!varDsc->lvTracked || compiler->opts.MinOpts() || !(op1->gtFlags & GTF_VAR_DEATH)); -#ifdef DEBUGGING_SUPPORT /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. * Remember the local var info to call siCheckVarScope @@ -13447,7 +13420,6 @@ void CodeGen::genCodeForTreeLng(GenTreePtr tree, regMaskTP needReg, regMaskTP av lclVarNum = varNum; lclVarILoffs = op1->gtLclVar.gtLclILoffs; } -#endif /* Has the variable been assigned to a register (pair) ? */ @@ -13735,13 +13707,11 @@ void CodeGen::genCodeForTreeLng(GenTreePtr tree, regMaskTP needReg, regMaskTP av genUpdateLife(op1); genUpdateLife(tree); -#ifdef DEBUGGING_SUPPORT /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. */ if (lclVarNum < compiler->lvaCount) siCheckVarScope(lclVarNum, lclVarILoffs); -#endif } return; @@ -18361,12 +18331,10 @@ regMaskTP CodeGen::genCodeForCall(GenTreePtr call, bool valUsed) CORINFO_SIG_INFO* sigInfo = nullptr; -#ifdef DEBUGGING_SUPPORT if (compiler->opts.compDbgInfo && compiler->genCallSite2ILOffsetMap != NULL) { (void)compiler->genCallSite2ILOffsetMap->Lookup(call, &ilOffset); } -#endif /* Make some sanity checks on the call node */ @@ -20644,8 +20612,6 @@ DONE: return regCnt; } -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT /***************************************************************************** * genSetScopeInfo * @@ -20734,8 +20700,6 @@ void CodeGen::genSetScopeInfo(unsigned which, compiler->eeSetLVinfo(which, startOffs, length, ilVarNum, LVnum, name, avail, varLoc); } -#endif // DEBUGGING_SUPPORT - /***************************************************************************** * * Return non-zero if the given register is free after the given tree is diff --git a/src/jit/codegenlinear.cpp b/src/jit/codegenlinear.cpp index 9d5fb18a2b..c633e5619e 100644 --- a/src/jit/codegenlinear.cpp +++ b/src/jit/codegenlinear.cpp @@ -66,14 +66,12 @@ void CodeGen::genCodeForBBlist() regSet.rsSpillBeg(); -#ifdef DEBUGGING_SUPPORT /* Initialize the line# tracking logic */ if (compiler->opts.compScopeInfo) { siInit(); } -#endif // The current implementation of switch tables requires the first block to have a label so it // can generate offsets to the switch label targets. @@ -303,7 +301,6 @@ void CodeGen::genCodeForBBlist() compiler->compCurBB = block; -#ifdef DEBUGGING_SUPPORT siBeginBlock(block); // BBF_INTERNAL blocks don't correspond to any single IL instruction. @@ -315,7 +312,6 @@ void CodeGen::genCodeForBBlist() } bool firstMapping = true; -#endif // DEBUGGING_SUPPORT /*--------------------------------------------------------------------- * @@ -339,12 +335,9 @@ void CodeGen::genCodeForBBlist() // as we encounter it. CLANG_FORMAT_COMMENT_ANCHOR; -#ifdef DEBUGGING_SUPPORT IL_OFFSETX currentILOffset = BAD_IL_OFFSET; -#endif for (GenTree* node : LIR::AsRange(block).NonPhiNodes()) { -#ifdef DEBUGGING_SUPPORT // Do we have a new IL offset? if (node->OperGet() == GT_IL_OFFSET) { @@ -353,7 +346,6 @@ void CodeGen::genCodeForBBlist() genIPmappingAdd(currentILOffset, firstMapping); firstMapping = false; } -#endif // DEBUGGING_SUPPORT #ifdef DEBUG if (node->OperGet() == GT_IL_OFFSET) @@ -443,7 +435,6 @@ void CodeGen::genCodeForBBlist() } #endif // defined(DEBUG) -#ifdef DEBUGGING_SUPPORT // It is possible to reach the end of the block without generating code for the current IL offset. // For example, if the following IR ends the current block, no code will have been generated for // offset 21: @@ -481,8 +472,6 @@ void CodeGen::genCodeForBBlist() } } -#endif // DEBUGGING_SUPPORT - genStackLevel -= savedStkLvl; #ifdef DEBUG @@ -1721,8 +1710,6 @@ void CodeGen::genEmitCall(int callType, indir->Index() ? indir->Index()->gtRegNum : REG_NA, indir->Scale(), indir->Offset()); } -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT /***************************************************************************** * genSetScopeInfo * @@ -1783,6 +1770,5 @@ void CodeGen::genSetScopeInfo(unsigned which, compiler->eeSetLVinfo(which, startOffs, length, ilVarNum, LVnum, name, avail, varLoc); } -#endif // DEBUGGING_SUPPORT #endif // !LEGACY_BACKEND diff --git a/src/jit/codegenxarch.cpp b/src/jit/codegenxarch.cpp index be1b455954..79175d4e00 100644 --- a/src/jit/codegenxarch.cpp +++ b/src/jit/codegenxarch.cpp @@ -4850,7 +4850,6 @@ void CodeGen::genCallInstruction(GenTreePtr node) bool fPossibleSyncHelperCall = false; CorInfoHelpFunc helperNum = CORINFO_HELP_UNDEF; -#ifdef DEBUGGING_SUPPORT // We need to propagate the IL offset information to the call instruction, so we can emit // an IL to native mapping record for the call, to support managed return value debugging. // We don't want tail call helper calls that were converted from normal calls to get a record, @@ -4859,7 +4858,6 @@ void CodeGen::genCallInstruction(GenTreePtr node) { (void)compiler->genCallSite2ILOffsetMap->Lookup(call, &ilOffset); } -#endif // DEBUGGING_SUPPORT #if defined(_TARGET_X86_) // If the callee pops the arguments, we pass a positive value as the argSize, and the emitter will @@ -8021,7 +8019,7 @@ void* CodeGen::genCreateAndStoreGCInfoJIT32(unsigned codeSize, return infoPtr; } -#else // !JIT32_GCENCODER +#else // !JIT32_GCENCODER void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize DEBUGARG(void* codePtr)) { IAllocator* allowZeroAlloc = new (compiler, CMK_GC) AllowZeroAllocator(compiler->getAllocatorGC()); @@ -8039,7 +8037,6 @@ void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize // Now we can actually use those slot ID's to declare live ranges. gcInfo.gcMakeRegPtrTable(gcInfoEncoder, codeSize, prologSize, GCInfo::MAKE_REG_PTR_MODE_DO_WORK); -#if defined(DEBUGGING_SUPPORT) if (compiler->opts.compDbgEnC) { // what we have to preserve is called the "frame header" (see comments in VM\eetwain.cpp) @@ -8066,7 +8063,6 @@ void CodeGen::genCreateAndStoreGCInfoX64(unsigned codeSize, unsigned prologSize // frame gcInfoEncoder->SetSizeOfEditAndContinuePreservedArea(preservedAreaSize); } -#endif gcInfoEncoder->Build(); diff --git a/src/jit/compiler.cpp b/src/jit/compiler.cpp index 4a74930dcc..f72431588f 100644 --- a/src/jit/compiler.cpp +++ b/src/jit/compiler.cpp @@ -201,8 +201,6 @@ void Compiler::compDspSrcLinesByLineNum(unsigned line, bool seek) void Compiler::compDspSrcLinesByNativeIP(UNATIVE_OFFSET curIP) { -#ifdef DEBUGGING_SUPPORT - static IPmappingDsc* nextMappingDsc; static unsigned lastLine; @@ -257,8 +255,6 @@ void Compiler::compDspSrcLinesByNativeIP(UNATIVE_OFFSET curIP) nextMappingDsc = nextMappingDsc->ipmdNext; } } - -#endif } /*****************************************************************************/ @@ -1171,11 +1167,6 @@ unsigned Compiler::s_compMethodsCount = 0; // to produce unique label names bool Compiler::s_dspMemStats = false; #endif -#ifndef DEBUGGING_SUPPORT -/* static */ -const bool Compiler::Options::compDbgCode = false; -#endif - #ifndef PROFILING_SUPPORTED const bool Compiler::Options::compNoPInvokeInlineCB = false; #endif @@ -1656,12 +1647,8 @@ void Compiler::compDisplayStaticSizes(FILE* fout) sizeof(bbDummy->bbHeapSsaNumIn)); fprintf(fout, "Offset / size of bbHeapSsaNumOut = %3u / %3u\n", offsetof(BasicBlock, bbHeapSsaNumOut), sizeof(bbDummy->bbHeapSsaNumOut)); - -#ifdef DEBUGGING_SUPPORT fprintf(fout, "Offset / size of bbScope = %3u / %3u\n", offsetof(BasicBlock, bbScope), sizeof(bbDummy->bbScope)); -#endif // DEBUGGING_SUPPORT - fprintf(fout, "Offset / size of bbCseGen = %3u / %3u\n", offsetof(BasicBlock, bbCseGen), sizeof(bbDummy->bbCseGen)); fprintf(fout, "Offset / size of bbCseIn = %3u / %3u\n", offsetof(BasicBlock, bbCseIn), @@ -2465,9 +2452,8 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags) assert((opts.eeFlags & CORJIT_FLG_SIZE_OPT) == 0); } -//------------------------------------------------------------------------- + //------------------------------------------------------------------------- -#ifdef DEBUGGING_SUPPORT opts.compDbgCode = (opts.eeFlags & CORJIT_FLG_DEBUG_CODE) != 0; opts.compDbgInfo = (opts.eeFlags & CORJIT_FLG_DEBUG_INFO) != 0; opts.compDbgEnC = (opts.eeFlags & CORJIT_FLG_DEBUG_EnC) != 0; @@ -2477,7 +2463,6 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags) opts.compDbgInfo = false; opts.compDbgEnC = false; #endif -#endif compSetProcessor(); @@ -3184,7 +3169,6 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags) //------------------------------------------------------------------------- -#ifdef DEBUGGING_SUPPORT #ifdef DEBUG assert(!codeGen->isGCTypeFixed()); opts.compGcChecks = (JitConfig.JitGCChecks() != 0) || compStressCompile(STRESS_GENERIC_VARN, 5); @@ -3265,7 +3249,6 @@ void Compiler::compInitOptions(CORJIT_FLAGS* jitFlags) opts.compMustInlinePInvokeCalli = (opts.eeFlags & CORJIT_FLG_IL_STUB) ? true : false; opts.compScopeInfo = opts.compDbgInfo; -#endif // DEBUGGING_SUPPORT #ifdef LATE_DISASM codeGen->getDisAssembler().disOpenForLateDisAsm(info.compMethodName, info.compClassName, @@ -3604,14 +3587,11 @@ void Compiler::compInitDebuggingInfo() info.compVarScopesCount = 0; -#ifdef DEBUGGING_SUPPORT if (opts.compScopeInfo) -#endif { eeGetVars(); } -#ifdef DEBUGGING_SUPPORT compInitVarScopeMap(); if (opts.compScopeInfo || opts.compDbgCode) @@ -3634,7 +3614,6 @@ void Compiler::compInitDebuggingInfo() JITDUMP("Debuggable code - Add new BB%02u to perform initialization of variables [%08X]\n", fgFirstBB->bbNum, dspPtr(fgFirstBB)); } -#endif // DEBUGGING_SUPPORT /*------------------------------------------------------------------------- * @@ -3653,9 +3632,7 @@ void Compiler::compInitDebuggingInfo() info.compStmtOffsetsCount = 0; -#ifdef DEBUGGING_SUPPORT if (opts.compDbgInfo) -#endif { /* Get hold of the line# records, if there are any */ @@ -5695,10 +5672,6 @@ _Next: return CORJIT_OK; } -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT -/*****************************************************************************/ - //------------------------------------------------------------------------ // compFindLocalVarLinear: Linear search for variable's scope containing offset. // @@ -6043,11 +6016,7 @@ void Compiler::compProcessScopesUntil(unsigned offset, } while (foundExit || foundEnter); } -/*****************************************************************************/ -#endif // DEBUGGING_SUPPORT -/*****************************************************************************/ - -#if defined(DEBUGGING_SUPPORT) && defined(DEBUG) +#if defined(DEBUG) void Compiler::compDispScopeLists() { @@ -6095,10 +6064,6 @@ void Compiler::compDispScopeLists() } } -#endif - -#if defined(DEBUG) - void Compiler::compDispLocalVars() { printf("info.compVarScopesCount = %d\n", info.compVarScopesCount); @@ -6117,7 +6082,7 @@ void Compiler::compDispLocalVars() } } -#endif +#endif // DEBUG /*****************************************************************************/ diff --git a/src/jit/compiler.h b/src/jit/compiler.h index b53f524880..5687e9a41c 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -694,9 +694,7 @@ public: return (unsigned)(roundUp(lvExactSize, TARGET_POINTER_SIZE)); } -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) unsigned lvSlotNum; // original slot # (if remapped) -#endif typeInfo lvVerTypeInfo; // type info needed for verification @@ -4602,7 +4600,6 @@ private: void fgMarkUseDef(GenTreeLclVarCommon* tree, GenTree* asgdLclVar = nullptr); -#ifdef DEBUGGING_SUPPORT void fgBeginScopeLife(VARSET_TP* inScope, VarScopeDsc* var); void fgEndScopeLife(VARSET_TP* inScope, VarScopeDsc* var); @@ -4616,8 +4613,6 @@ private: void fgDispDebugScopes(); #endif // DEBUG -#endif // DEBUGGING_SUPPORT - //------------------------------------------------------------------------- // // The following keeps track of any code we've added for things like array @@ -6560,8 +6555,6 @@ private: public: CodeGenInterface* codeGen; -#ifdef DEBUGGING_SUPPORT - // The following holds information about instr offsets in terms of generated code. struct IPmappingDsc @@ -6591,7 +6584,6 @@ public: typedef SimplerHashTable<GenTreePtr, PtrKeyFuncs<GenTree>, IL_OFFSETX, JitSimplerHashBehavior> CallSiteILOffsetTable; CallSiteILOffsetTable* genCallSite2ILOffsetMap; -#endif // DEBUGGING_SUPPORT unsigned genReturnLocal; // Local number for the return value when applicable. BasicBlock* genReturnBB; // jumped to when not optimizing for speed. @@ -7561,14 +7553,10 @@ public: #endif } -#ifdef DEBUGGING_SUPPORT bool compScopeInfo; // Generate the LocalVar info ? bool compDbgCode; // Generate debugger-friendly code? bool compDbgInfo; // Gather debugging info? bool compDbgEnC; -#else - static const bool compDbgCode; -#endif #ifdef PROFILING_SUPPORTED bool compNoPInvokeInlineCB; @@ -7897,8 +7885,6 @@ public: // and the VM expects that, or the JIT is a "self-host" compiler // (e.g., x86 hosted targeting x86) and the VM expects that. -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) - /* The following holds IL scope information about local variables. */ @@ -7913,8 +7899,6 @@ public: unsigned compStmtOffsetsCount; ICorDebugInfo::BoundaryTypes compStmtOffsetsImplicit; -#endif // DEBUGGING_SUPPORT || DEBUG - #define CPU_X86 0x0100 // The generic X86 CPU #define CPU_X86_PENTIUM_4 0x0110 @@ -8005,7 +7989,7 @@ public: void compDispLocalVars(); -#endif // DEBUGGING_SUPPORT || DEBUG +#endif // DEBUG //-------------------------- Global Compiler Data ------------------------------------ @@ -8243,9 +8227,8 @@ public: void compDspSrcLinesByLineNum(unsigned line, bool seek = false); #endif // DEBUG -//------------------------------------------------------------------------- + //------------------------------------------------------------------------- -#ifdef DEBUGGING_SUPPORT typedef ListNode<VarScopeDsc*> VarScopeListNode; struct VarScopeMapInfo @@ -8303,8 +8286,6 @@ public: void compDispScopeLists(); #endif // DEBUG -#endif // DEBUGGING_SUPPORT - bool compIsProfilerHookNeeded(); //------------------------------------------------------------------------- diff --git a/src/jit/emit.cpp b/src/jit/emit.cpp index 5c991ddf1b..65d2b892b9 100644 --- a/src/jit/emit.cpp +++ b/src/jit/emit.cpp @@ -1670,13 +1670,9 @@ void emitter::emitCreatePlaceholderIG(insGroupPlaceholderType igType, emitCurIGsize += MAX_PLACEHOLDER_IG_SIZE; emitCurCodeOffset += emitCurIGsize; -#ifdef DEBUGGING_SUPPORT - #if FEATURE_EH_FUNCLETS // Add the appropriate IP mapping debugging record for this placeholder - // group. - - // genExitCode() adds the mapping for main function epilogs + // group. genExitCode() adds the mapping for main function epilogs. if (emitComp->opts.compDbgInfo) { if (igType == IGPT_FUNCLET_PROLOG) @@ -1690,8 +1686,6 @@ void emitter::emitCreatePlaceholderIG(insGroupPlaceholderType igType, } #endif // FEATURE_EH_FUNCLETS -#endif // DEBUGGING_SUPPORT - /* Start a new IG if more code follows */ if (last) @@ -3414,8 +3408,6 @@ size_t emitter::emitIssue1Instr(insGroup* ig, instrDesc* id, BYTE** dp) #endif -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) - /* Did the size of the instruction match our expectations? */ UNATIVE_OFFSET csz = (UNATIVE_OFFSET)(*dp - curInsAdr); @@ -3447,8 +3439,6 @@ size_t emitter::emitIssue1Instr(insGroup* ig, instrDesc* id, BYTE** dp) #endif } -#endif - #ifdef DEBUG /* Make sure the instruction descriptor size also matches our expectations */ if (is != emitSizeOfInsDsc(id)) diff --git a/src/jit/emitarm.cpp b/src/jit/emitarm.cpp index 0323cb9422..45928ca2d2 100644 --- a/src/jit/emitarm.cpp +++ b/src/jit/emitarm.cpp @@ -4464,13 +4464,11 @@ void emitter::emitIns_Call(EmitCallType callType, assert(argSize % (int)sizeof(void*) == 0); argCnt = argSize / (int)sizeof(void*); -#ifdef DEBUGGING_SUPPORT /* Managed RetVal: emit sequence point for the call */ if (emitComp->opts.compDbgInfo && ilOffset != BAD_IL_OFFSET) { codeGen->genIPmappingAdd(ilOffset, false); } -#endif /* We need to allocate the appropriate instruction descriptor based diff --git a/src/jit/emitarm64.cpp b/src/jit/emitarm64.cpp index a632ec12c8..12c4087115 100644 --- a/src/jit/emitarm64.cpp +++ b/src/jit/emitarm64.cpp @@ -6738,13 +6738,11 @@ void emitter::emitIns_Call(EmitCallType callType, assert(argSize % REGSIZE_BYTES == 0); argCnt = (int)(argSize / (int)sizeof(void*)); -#ifdef DEBUGGING_SUPPORT /* Managed RetVal: emit sequence point for the call */ if (emitComp->opts.compDbgInfo && ilOffset != BAD_IL_OFFSET) { codeGen->genIPmappingAdd(ilOffset, false); } -#endif /* We need to allocate the appropriate instruction descriptor based diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp index 2e87b7b3db..727246de6f 100644 --- a/src/jit/emitxarch.cpp +++ b/src/jit/emitxarch.cpp @@ -5394,13 +5394,11 @@ void emitter::emitIns_Call(EmitCallType callType, assert(argSize % sizeof(void*) == 0); argCnt = (int)(argSize / (ssize_t)sizeof(void*)); // we need a signed-divide -#ifdef DEBUGGING_SUPPORT /* Managed RetVal: emit sequence point for the call */ if (emitComp->opts.compDbgInfo && ilOffset != BAD_IL_OFFSET) { codeGen->genIPmappingAdd(ilOffset, false); } -#endif /* We need to allocate the appropriate instruction descriptor based diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index 8a007b2b8e..d643a65108 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -5077,7 +5077,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* curBBoffs = 0; -#ifdef DEBUGGING_SUPPORT if (opts.compDbgCode && (info.compVarScopesCount > 0)) { compResetScopeLists(); @@ -5090,7 +5089,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* { /* do nothing */ } } -#endif BBjumpKinds jmpKind; @@ -5473,8 +5471,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* nxtBBoffs = (IL_OFFSET)(codeAddr - codeBegp); -#ifdef DEBUGGING_SUPPORT - bool foundScope = false; if (opts.compDbgCode && (info.compVarScopesCount > 0)) @@ -5488,7 +5484,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* foundScope = true; } } -#endif /* Do we have a jump? */ @@ -5505,7 +5500,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* bool makeBlock = (jumpTarget[nxtBBoffs] != JT_NONE); -#ifdef DEBUGGING_SUPPORT if (!makeBlock && foundScope) { makeBlock = true; @@ -5516,7 +5510,6 @@ void Compiler::fgMakeBasicBlocks(const BYTE* codeAddr, IL_OFFSET codeSize, BYTE* } #endif // DEBUG } -#endif // DEBUGGING_SUPPORT if (!makeBlock) { @@ -8589,17 +8582,12 @@ GenTreeStmt* Compiler::fgNewStmtFromTree(GenTreePtr tree, IL_OFFSETX offs) // The first good IL offset of a statement in the block, or BAD_IL_OFFSET if such an IL offset // cannot be found. // -// If we are not built with DEBUGGING_SUPPORT or DEBUG, then always report BAD_IL_OFFSET, -// since in that case statements don't contain an IL offset. The effect will be that split -// blocks will lose their IL offset information. - IL_OFFSET Compiler::fgFindBlockILOffset(BasicBlock* block) { // This function searches for IL offsets in statement nodes, so it can't be used in LIR. We // could have a similar function for LIR that searches for GT_IL_OFFSET nodes. assert(!block->IsLIR()); -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) for (GenTree* stmt = block->bbTreeList; stmt != nullptr; stmt = stmt->gtNext) { assert(stmt->IsStatement()); @@ -8608,7 +8596,6 @@ IL_OFFSET Compiler::fgFindBlockILOffset(BasicBlock* block) return jitGetILoffs(stmt->gtStmt.gtStmtILoffsx); } } -#endif // defined(DEBUGGING_SUPPORT) || defined(DEBUG) return BAD_IL_OFFSET; } diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp index fc417d7fad..f927978cb1 100644 --- a/src/jit/gentree.cpp +++ b/src/jit/gentree.cpp @@ -6837,7 +6837,6 @@ GenTreeCall* Compiler::gtNewCallNode( node->gtCall.gtRawILOffset = BAD_IL_OFFSET; #endif -#ifdef DEBUGGING_SUPPORT // Spec: Managed Retval sequence points needs to be generated while generating debug info for debuggable code. // // Implementation note: if not generating MRV info genCallSite2ILOffsetMap will be NULL and @@ -6865,7 +6864,6 @@ GenTreeCall* Compiler::gtNewCallNode( assert(!genCallSite2ILOffsetMap->Lookup(node, &value)); genCallSite2ILOffsetMap->Set(node, ilOffset); } -#endif // Initialize gtOtherRegs node->ClearOtherRegs(); diff --git a/src/jit/gentree.h b/src/jit/gentree.h index 316e3ffccc..bb34050b7b 100644 --- a/src/jit/gentree.h +++ b/src/jit/gentree.h @@ -4317,10 +4317,7 @@ struct GenTreeStmt : public GenTree GenTreePtr gtStmtExpr; // root of the expression tree GenTreePtr gtStmtList; // first node (for forward walks) InlineContext* gtInlineContext; // The inline context for this statement. - -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) - IL_OFFSETX gtStmtILoffsx; // instr offset (if available) -#endif + IL_OFFSETX gtStmtILoffsx; // instr offset (if available) #ifdef DEBUG IL_OFFSET gtStmtLastILoffs; // instr offset at end of stmt @@ -4359,9 +4356,7 @@ struct GenTreeStmt : public GenTree , gtStmtExpr(expr) , gtStmtList(nullptr) , gtInlineContext(nullptr) -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) , gtStmtILoffsx(offset) -#endif #ifdef DEBUG , gtStmtLastILoffs(BAD_IL_OFFSET) #endif diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 62c871c038..53e856ce87 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -673,8 +673,6 @@ inline void Compiler::impAppendStmt(GenTreePtr stmt, unsigned chkLevel) impMarkContiguousSIMDFieldAssignments(stmt); #endif -#ifdef DEBUGGING_SUPPORT - /* Once we set impCurStmtOffs in an appended tree, we are ready to report the following offsets. So reset impCurStmtOffs */ @@ -683,8 +681,6 @@ inline void Compiler::impAppendStmt(GenTreePtr stmt, unsigned chkLevel) impCurStmtOffsSet(BAD_IL_OFFSET); } -#endif - #ifdef DEBUG if (impLastILoffsStmt == nullptr) { @@ -2678,7 +2674,6 @@ static inline bool impOpcodeIsCallOpcode(OPCODE opcode) } /*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT static inline bool impOpcodeIsCallSiteBoundary(OPCODE opcode) { @@ -2697,8 +2692,6 @@ static inline bool impOpcodeIsCallSiteBoundary(OPCODE opcode) } } -#endif // DEBUGGING_SUPPORT - /*****************************************************************************/ // One might think it is worth caching these values, but results indicate @@ -9313,8 +9306,6 @@ void Compiler::impImportBlockCode(BasicBlock* block) opcodeOffs = (IL_OFFSET)(codeAddr - info.compCode); -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) - #ifndef DEBUG if (opts.compDbgInfo) #endif @@ -9426,8 +9417,6 @@ void Compiler::impImportBlockCode(BasicBlock* block) } } -#endif // defined(DEBUGGING_SUPPORT) || defined(DEBUG) - CORINFO_CLASS_HANDLE clsHnd = DUMMY_INIT(NULL); CORINFO_CLASS_HANDLE ldelemClsHnd = DUMMY_INIT(NULL); CORINFO_CLASS_HANDLE stelemClsHnd = DUMMY_INIT(NULL); diff --git a/src/jit/jit.h b/src/jit/jit.h index d9d0ba2722..1bb21e366e 100644 --- a/src/jit/jit.h +++ b/src/jit/jit.h @@ -386,17 +386,6 @@ typedef ptrdiff_t ssize_t; /*****************************************************************************/ -// Debugging support is ON by default. Can be turned OFF by -// adding /DDEBUGGING_SUPPORT=0 on the command line. - -#ifndef DEBUGGING_SUPPORT -#define DEBUGGING_SUPPORT -#elif !DEBUGGING_SUPPORT -#undef DEBUGGING_SUPPORT -#endif - -/*****************************************************************************/ - // Late disassembly is OFF by default. Can be turned ON by // adding /DLATE_DISASM=1 on the command line. // Always OFF in the non-debug version diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index 06d09ff40d..c9ab053a4e 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -3400,8 +3400,6 @@ void Compiler::lvaMarkLocalVars() BasicBlock* block; -#if defined(DEBUGGING_SUPPORT) || defined(DEBUG) - #ifndef DEBUG // Assign slot numbers to all variables. // If compiler generated local variables, slot numbers will be @@ -3424,8 +3422,6 @@ void Compiler::lvaMarkLocalVars() } } -#endif // defined(DEBUGGING_SUPPORT) || defined(DEBUG) - /* Mark all local variable references */ lvaRefCountingStarted = true; diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp index b806c59627..2732b4f42b 100644 --- a/src/jit/liveness.cpp +++ b/src/jit/liveness.cpp @@ -699,10 +699,6 @@ void Compiler::fgPerBlockLocalVarLiveness() } } -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT -/*****************************************************************************/ - // Helper functions to mark variables live over their entire scope void Compiler::fgBeginScopeLife(VARSET_TP* inScope, VarScopeDsc* var) @@ -1185,10 +1181,6 @@ void Compiler::fgExtendDbgLifetimes() #endif // DEBUG } -/*****************************************************************************/ -#endif // DEBUGGING_SUPPORT -/*****************************************************************************/ - VARSET_VALRET_TP Compiler::fgGetHandlerLiveVars(BasicBlock* block) { noway_assert(block); @@ -1906,9 +1898,7 @@ VARSET_VALRET_TP Compiler::fgComputeLife(VARSET_VALARG_TP lifeArg, VARSET_TP VARSET_INIT(this, life, lifeArg); // lifeArg is const ref; copy to allow modification. VARSET_TP VARSET_INIT(this, keepAliveVars, volatileVars); -#ifdef DEBUGGING_SUPPORT VarSetOps::UnionD(this, keepAliveVars, compCurBB->bbScope); // Don't kill vars in scope -#endif noway_assert(VarSetOps::Equal(this, VarSetOps::Intersection(this, keepAliveVars, life), keepAliveVars)); noway_assert(compCurStmt->gtOper == GT_STMT); @@ -1956,9 +1946,7 @@ VARSET_VALRET_TP Compiler::fgComputeLifeLIR(VARSET_VALARG_TP lifeArg, BasicBlock VARSET_TP VARSET_INIT(this, life, lifeArg); // lifeArg is const ref; copy to allow modification. VARSET_TP VARSET_INIT(this, keepAliveVars, volatileVars); -#ifdef DEBUGGING_SUPPORT VarSetOps::UnionD(this, keepAliveVars, block->bbScope); // Don't kill vars in scope -#endif noway_assert(VarSetOps::Equal(this, VarSetOps::Intersection(this, keepAliveVars, life), keepAliveVars)); @@ -2019,9 +2007,8 @@ VARSET_VALRET_TP Compiler::fgComputeLife(VARSET_VALARG_TP lifeArg, GenTreePtr gtColon = NULL; VARSET_TP VARSET_INIT(this, keepAliveVars, volatileVars); -#ifdef DEBUGGING_SUPPORT VarSetOps::UnionD(this, keepAliveVars, compCurBB->bbScope); /* Dont kill vars in scope */ -#endif + noway_assert(VarSetOps::Equal(this, VarSetOps::Intersection(this, keepAliveVars, life), keepAliveVars)); noway_assert(compCurStmt->gtOper == GT_STMT); noway_assert(endNode || (startNode == compCurStmt->gtStmt.gtStmtExpr)); @@ -2855,10 +2842,6 @@ void Compiler::fgInterBlockLocalVarLiveness() fgLiveVarAnalysis(); -//------------------------------------------------------------------------- - -#ifdef DEBUGGING_SUPPORT - /* For debuggable code, we mark vars as live over their entire * reported scope, so that it will be visible over the entire scope */ @@ -2868,8 +2851,6 @@ void Compiler::fgInterBlockLocalVarLiveness() fgExtendDbgLifetimes(); } -#endif // DEBUGGING_SUPPORT - /*------------------------------------------------------------------------- * Variables involved in exception-handlers and finally blocks need * to be specially marked diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 16dd1cf372..b55c24a55b 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -16076,13 +16076,11 @@ void Compiler::fgSetOptions() } #endif -#ifdef DEBUGGING_SUPPORT if (opts.compDbgCode) { assert(!codeGen->isGCTypeFixed()); genInterruptible = true; // debugging is easier this way ... } -#endif /* Assume we won't need an explicit stack frame if this is allowed */ diff --git a/src/jit/optimizer.cpp b/src/jit/optimizer.cpp index 50ed62c0f3..fdcd1d11af 100644 --- a/src/jit/optimizer.cpp +++ b/src/jit/optimizer.cpp @@ -3639,12 +3639,10 @@ void Compiler::fgOptWhileLoop(BasicBlock* block) copyOfCondStmt->gtFlags |= GTF_STMT_CMPADD; -#ifdef DEBUGGING_SUPPORT if (opts.compDbgInfo) { copyOfCondStmt->gtStmt.gtStmtILoffsx = condStmt->gtStmt.gtStmtILoffsx; } -#endif // Flag the block that received the copy as potentially having an array/vtable // reference if the block copied from did; this is a conservative guess. diff --git a/src/jit/regalloc.cpp b/src/jit/regalloc.cpp index 11266affb4..d6302834c1 100644 --- a/src/jit/regalloc.cpp +++ b/src/jit/regalloc.cpp @@ -6647,8 +6647,6 @@ void Compiler::raMarkStkVars() #endif // FEATURE_FIXED_OUT_ARGS -#ifdef DEBUGGING_SUPPORT - #ifdef DEBUG /* For debugging, note that we have to reserve space even for unused variables if they are ever in scope. However, this is not @@ -6683,7 +6681,6 @@ void Compiler::raMarkStkVars() varDsc->lvMustInit = true; } } -#endif // DEBUGGING_SUPPORT #ifndef LEGACY_BACKEND varDsc->lvOnFrame = needSlot; diff --git a/src/jit/registerfp.cpp b/src/jit/registerfp.cpp index 997c223ed4..3a3143e629 100644 --- a/src/jit/registerfp.cpp +++ b/src/jit/registerfp.cpp @@ -326,10 +326,8 @@ void CodeGen::genFloatAssign(GenTree* tree) bool unaligned = false; // Is this an unaligned store regNumber op2reg = REG_NA; -#ifdef DEBUGGING_SUPPORT unsigned lclVarNum = compiler->lvaCount; unsigned lclILoffs = DUMMY_INIT(0); -#endif noway_assert(tree->OperGet() == GT_ASG); @@ -358,7 +356,6 @@ void CodeGen::genFloatAssign(GenTree* tree) noway_assert(varNum < compiler->lvaCount); varDsc = compiler->lvaTable + varNum; -#ifdef DEBUGGING_SUPPORT // For non-debuggable code, every definition of a lcl-var has // to be checked to see if we need to open a new scope for it. // Remember the local var info to call siCheckVarScope @@ -369,7 +366,6 @@ void CodeGen::genFloatAssign(GenTree* tree) lclVarNum = varNum; lclILoffs = op1->gtLclVar.gtLclILoffs; } -#endif // Dead Store assert (with min opts we may have dead stores) // @@ -607,13 +603,11 @@ DONE_ASG: genUpdateLife(tree); -#ifdef DEBUGGING_SUPPORT /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. */ if (lclVarNum < compiler->lvaCount) siCheckVarScope(lclVarNum, lclILoffs); -#endif } void CodeGen::genCodeForTreeFloat(GenTreePtr tree, RegSet::RegisterPreference* pref) diff --git a/src/jit/scopeinfo.cpp b/src/jit/scopeinfo.cpp index f2a7902317..29c18f941c 100644 --- a/src/jit/scopeinfo.cpp +++ b/src/jit/scopeinfo.cpp @@ -58,10 +58,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #include "emit.h" #include "codegen.h" -/*****************************************************************************/ -#ifdef DEBUGGING_SUPPORT -/*****************************************************************************/ - bool Compiler::siVarLoc::vlIsInReg(regNumber reg) { switch (vlType) @@ -1050,7 +1046,6 @@ void CodeGen::psiBegProlog() void CodeGen::psiAdjustStackLevel(unsigned size) { -#ifdef DEBUGGING_SUPPORT if (!compiler->opts.compScopeInfo || (compiler->info.compVarScopesCount == 0)) { return; @@ -1082,7 +1077,6 @@ void CodeGen::psiAdjustStackLevel(unsigned size) } #endif // ACCURATE_PROLOG_DEBUG_INFO -#endif // DEBUGGING_SUPPORT } /***************************************************************************** @@ -1094,7 +1088,6 @@ void CodeGen::psiAdjustStackLevel(unsigned size) void CodeGen::psiMoveESPtoEBP() { -#ifdef DEBUGGING_SUPPORT if (!compiler->opts.compScopeInfo || (compiler->info.compVarScopesCount == 0)) { return; @@ -1127,7 +1120,6 @@ void CodeGen::psiMoveESPtoEBP() } #endif // ACCURATE_PROLOG_DEBUG_INFO -#endif // DEBUGGING_SUPPORT } /***************************************************************************** @@ -1141,7 +1133,6 @@ void CodeGen::psiMoveESPtoEBP() void CodeGen::psiMoveToReg(unsigned varNum, regNumber reg, regNumber otherReg) { -#ifdef DEBUGGING_SUPPORT assert(compiler->compGeneratingProlog); if (!compiler->opts.compScopeInfo) @@ -1195,7 +1186,6 @@ void CodeGen::psiMoveToReg(unsigned varNum, regNumber reg, regNumber otherReg) !"Parameter scope not found (Assert doesnt always indicate error)"); #endif // ACCURATE_PROLOG_DEBUG_INFO -#endif // DEBUGGING_SUPPORT } /***************************************************************************** @@ -1207,7 +1197,6 @@ void CodeGen::psiMoveToReg(unsigned varNum, regNumber reg, regNumber otherReg) void CodeGen::psiMoveToStack(unsigned varNum) { -#ifdef DEBUGGING_SUPPORT if (!compiler->opts.compScopeInfo || (compiler->info.compVarScopesCount == 0)) { return; @@ -1248,7 +1237,6 @@ void CodeGen::psiMoveToStack(unsigned varNum) !"Parameter scope not found (Assert doesnt always indicate error)"); #endif // ACCURATE_PROLOG_DEBUG_INFO -#endif // DEBUGGING_SUPPORT } /***************************************************************************** @@ -1264,8 +1252,4 @@ void CodeGen::psiEndProlog() { psiEndPrologScope(scope); } -} - -/*****************************************************************************/ -#endif // DEBUGGING_SUPPORT -/*****************************************************************************/ +}
\ No newline at end of file diff --git a/src/jit/stackfp.cpp b/src/jit/stackfp.cpp index f975822740..74823ddd64 100644 --- a/src/jit/stackfp.cpp +++ b/src/jit/stackfp.cpp @@ -1406,8 +1406,6 @@ void CodeGen::genCodeForTreeStackFP_Asg(GenTreePtr tree) assert(!varDsc->lvTracked || compiler->opts.MinOpts() || !(op1NonCom->gtFlags & GTF_VAR_DEATH)); #endif -#ifdef DEBUGGING_SUPPORT - /* For non-debuggable code, every definition of a lcl-var has * to be checked to see if we need to open a new scope for it. */ @@ -1416,7 +1414,6 @@ void CodeGen::genCodeForTreeStackFP_Asg(GenTreePtr tree) { siCheckVarScope(op1NonCom->gtLclVarCommon.gtLclNum, op1NonCom->gtLclVar.gtLclILoffs); } -#endif } assert(op2); |