From 3024a1d66b79c7089958ad50cf6ca7e9e0aac210 Mon Sep 17 00:00:00 2001 From: Brian Bohe Date: Wed, 22 Jan 2020 18:18:11 -0800 Subject: [PATCH] Change debug info default variable tracking system. Varible Scope info is being disabled. Variable Live Range is being enabled. Debug info generated for debug code is the same, changes only impact on optimized code. Variable Live Range updates variable's location each time something happens to variable's liveness. For more information see https://github.com/dotnet/runtime/blob/master/docs/design/features/variabletracking.md --- src/coreclr/src/jit/codegenarmarch.cpp | 6 +++--- src/coreclr/src/jit/codegeninterface.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coreclr/src/jit/codegenarmarch.cpp b/src/coreclr/src/jit/codegenarmarch.cpp index 47678ff..4350e1d 100644 --- a/src/coreclr/src/jit/codegenarmarch.cpp +++ b/src/coreclr/src/jit/codegenarmarch.cpp @@ -2412,11 +2412,11 @@ void CodeGen::genRegCopy(GenTree* treeNode) #ifdef USING_VARIABLE_LIVE_RANGE // Report the home change for this variable - varLiveKeeper->siUpdateVariableLiveRange(varDsc, lcl->GetLclNum()) + varLiveKeeper->siUpdateVariableLiveRange(varDsc, lcl->GetLclNum()); #endif // USING_VARIABLE_LIVE_RANGE - // The new location is going live - genUpdateRegLife(varDsc, /*isBorn*/ true, /*isDying*/ false DEBUGARG(treeNode)); + // The new location is going live + genUpdateRegLife(varDsc, /*isBorn*/ true, /*isDying*/ false DEBUGARG(treeNode)); } } } diff --git a/src/coreclr/src/jit/codegeninterface.h b/src/coreclr/src/jit/codegeninterface.h index f9cb28e..5868529 100644 --- a/src/coreclr/src/jit/codegeninterface.h +++ b/src/coreclr/src/jit/codegeninterface.h @@ -26,11 +26,11 @@ #include "treelifeupdater.h" #include "emit.h" -#if 1 +#if 0 // Enable USING_SCOPE_INFO flag to use psiScope/siScope info to report variables' locations. #define USING_SCOPE_INFO #endif -#if 0 +#if 1 // Enable USING_VARIABLE_LIVE_RANGE flag to use VariableLiveRange info to report variables' locations. // Note: if both USING_SCOPE_INFO and USING_VARIABLE_LIVE_RANGE are defined, then USING_SCOPE_INFO // information is reported to the debugger. -- 2.7.4