Remove incRefCnt from fgMakeOutgoingStructArgCopy
authorCarol Eidt <carol.eidt@microsoft.com>
Fri, 20 Jul 2018 14:24:39 +0000 (07:24 -0700)
committerCarol Eidt <carol.eidt@microsoft.com>
Fri, 20 Jul 2018 14:25:49 +0000 (07:25 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/a9135bff6b6978904011c287cedb64ee5f7d1a3a

src/coreclr/src/jit/morph.cpp

index 92bb23e..de45684 100644 (file)
@@ -5294,10 +5294,6 @@ void Compiler::fgMakeOutgoingStructArgCopy(GenTreeCall*         call,
     GenTree* dest = gtNewLclvNode(tmp, lvaTable[tmp].lvType);
     dest->gtFlags |= (GTF_DONT_CSE | GTF_VAR_DEF); // This is a def of the local, "entire" by construction.
 
-    // TODO-Cleanup: This probably shouldn't be done here because arg morphing is done prior
-    // to ref counting of the lclVars.
-    lvaTable[tmp].incRefCnts(compCurBB->getBBWeight(this), this);
-
     if (argx->gtOper == GT_OBJ)
     {
         argx->gtFlags &= ~(GTF_ALL_EFFECT) | (argx->AsBlk()->Addr()->gtFlags & GTF_ALL_EFFECT);