summaryrefslogtreecommitdiff
path: root/src/jit/codegenlinear.cpp
diff options
context:
space:
mode:
authorBrian Bohe <brianbohe@gmail.com>2019-03-20 10:08:01 -0700
committerSergey Andreenko <seandree@microsoft.com>2019-03-20 10:08:01 -0700
commit0ee508291b7cec2b0a0d5e7929846d3e40446810 (patch)
tree506766adeb5b34388d56c6514a686b94f6574eb7 /src/jit/codegenlinear.cpp
parent69ec6463cd14b5478dbd6b577ce0483fc0a838c3 (diff)
downloadcoreclr-0ee508291b7cec2b0a0d5e7929846d3e40446810.tar.gz
coreclr-0ee508291b7cec2b0a0d5e7929846d3e40446810.tar.bz2
coreclr-0ee508291b7cec2b0a0d5e7929846d3e40446810.zip
Adding a flag to able/disable scope info (#23298)
* Flag USING_SCOPE_INGO definition * Enclosing siScope's related functions uses with USING_SCOPE_INFO flag definition check * Encapsulating genSetScopeInfo when using siVarScope * Moving comment inside flag defined block * Include siScope/psiScope functions only when flag USING_SCOPE_INFO is defined * Disable scope info * Typo * Adding comment flag name on #endif * Remove redundant access levels/flags * Repeating last accessibility level in case flag is disabled * Setting use of siScope and psiScope as default way of reporting variable homes
Diffstat (limited to 'src/jit/codegenlinear.cpp')
-rw-r--r--src/jit/codegenlinear.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jit/codegenlinear.cpp b/src/jit/codegenlinear.cpp
index 149bb3333f..c0a20343a3 100644
--- a/src/jit/codegenlinear.cpp
+++ b/src/jit/codegenlinear.cpp
@@ -84,12 +84,13 @@ void CodeGen::genInitializeRegisterState()
// iterated.
void CodeGen::genInitialize()
{
+#ifdef USING_SCOPE_INFO
// Initialize the line# tracking logic
-
if (compiler->opts.compScopeInfo)
{
siInit();
}
+#endif // USING_SCOPE_INFO
// The current implementation of switch tables requires the first block to have a label so it
// can generate offsets to the switch label targets.
@@ -350,9 +351,9 @@ void CodeGen::genCodeForBBlist()
/* Tell everyone which basic block we're working on */
compiler->compCurBB = block;
-
+#ifdef USING_SCOPE_INFO
siBeginBlock(block);
-
+#endif // USING_SCOPE_INFO
// BBF_INTERNAL blocks don't correspond to any single IL instruction.
if (compiler->opts.compDbgInfo && (block->bbFlags & BBF_INTERNAL) &&
!compiler->fgBBisScratch(block)) // If the block is the distinguished first scratch block, then no need to
@@ -508,7 +509,7 @@ void CodeGen::genCodeForBBlist()
// This can lead to problems when debugging the generated code. To prevent these issues, make sure
// we've generated code for the last IL offset we saw in the block.
genEnsureCodeEmitted(currentILOffset);
-
+#ifdef USING_SCOPE_INFO
if (compiler->opts.compScopeInfo && (compiler->info.compVarScopesCount > 0))
{
siEndBlock(block);
@@ -533,6 +534,7 @@ void CodeGen::genCodeForBBlist()
siCloseAllOpenScopes();
}
}
+#endif // USING_SCOPE_INFO
SubtractStackLevel(savedStkLvl);