Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
delete unused debug arg from genChangeLife and compChangeLife. (#17041)
Browse files Browse the repository at this point in the history
* delete unused debug arg from genChangeLife(VARSET_VALARG_TP

* remove unused debug arg from compChangeLife
  • Loading branch information
Sergey Andreenko authored Mar 19, 2018
1 parent 39831d5 commit 20f7c21
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
12 changes: 4 additions & 8 deletions src/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,17 +1082,13 @@ void Compiler::compUpdateLifeVar(GenTree* tree, VARSET_TP* pLastUseVars)
template void Compiler::compUpdateLifeVar<false>(GenTree* tree, VARSET_TP* pLastUseVars);

template <bool ForCodeGen>
void Compiler::compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree))
void Compiler::compChangeLife(VARSET_VALARG_TP newLife)
{
LclVarDsc* varDsc;

#ifdef DEBUG
if (verbose)
{
if (tree != nullptr)
{
Compiler::printTreeID(tree);
}
printf("Change life %s ", VarSetOps::ToString(this, compCurLife));
dumpConvertedVarSet(this, compCurLife);
printf(" -> %s ", VarSetOps::ToString(this, newLife));
Expand Down Expand Up @@ -1163,7 +1159,7 @@ void Compiler::compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree))
{
codeGen->gcInfo.gcRegByrefSetCur &= ~regMask;
}
codeGen->genUpdateRegLife(varDsc, false /*isBorn*/, true /*isDying*/ DEBUGARG(tree));
codeGen->genUpdateRegLife(varDsc, false /*isBorn*/, true /*isDying*/ DEBUGARG(nullptr));
}
#ifndef LEGACY_BACKEND
// This isn't in a register, so update the gcVarPtrSetCur.
Expand Down Expand Up @@ -1197,7 +1193,7 @@ void Compiler::compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree))
#endif // DEBUG
VarSetOps::RemoveElemD(this, codeGen->gcInfo.gcVarPtrSetCur, bornVarIndex);
#endif // !LEGACY_BACKEND
codeGen->genUpdateRegLife(varDsc, true /*isBorn*/, false /*isDying*/ DEBUGARG(tree));
codeGen->genUpdateRegLife(varDsc, true /*isBorn*/, false /*isDying*/ DEBUGARG(nullptr));
regMaskTP regMask = varDsc->lvRegMask();
if (isGCRef)
{
Expand All @@ -1222,7 +1218,7 @@ void Compiler::compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree))
}

// Need an explicit instantiation.
template void Compiler::compChangeLife<true>(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree));
template void Compiler::compChangeLife<true>(VARSET_VALARG_TP newLife);

#ifdef LEGACY_BACKEND

Expand Down
2 changes: 1 addition & 1 deletion src/jit/codegenlegacy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12971,7 +12971,7 @@ void CodeGen::genCodeForBBlist()
gcInfo.gcMarkRegSetNpt(gcrefRegs | byrefRegs);

if (!VarSetOps::Equal(compiler, compiler->compCurLife, block->bbLiveOut))
compiler->genChangeLife(block->bbLiveOut DEBUGARG(NULL));
compiler->genChangeLife(block->bbLiveOut);

/* Both stacks should always be empty on exit from a basic block */

Expand Down
6 changes: 3 additions & 3 deletions src/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7249,11 +7249,11 @@ class Compiler
GenTree* compCurLifeTree; // node after which compCurLife has been computed

template <bool ForCodeGen>
void compChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree));
void compChangeLife(VARSET_VALARG_TP newLife);

void genChangeLife(VARSET_VALARG_TP newLife DEBUGARG(GenTree* tree))
void genChangeLife(VARSET_VALARG_TP newLife)
{
compChangeLife</*ForCodeGen*/ true>(newLife DEBUGARG(tree));
compChangeLife</*ForCodeGen*/ true>(newLife);
}

template <bool ForCodeGen>
Expand Down
2 changes: 1 addition & 1 deletion src/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3589,7 +3589,7 @@ inline void Compiler::compUpdateLife(VARSET_VALARG_TP newLife)
{
if (!VarSetOps::Equal(this, compCurLife, newLife))
{
compChangeLife<ForCodeGen>(newLife DEBUGARG(nullptr));
compChangeLife<ForCodeGen>(newLife);
}
#ifdef DEBUG
else
Expand Down

0 comments on commit 20f7c21

Please sign in to comment.