From: Sergey Andreenko Date: Mon, 15 Apr 2019 20:25:43 +0000 (-0700) Subject: Get rid of varNumInp. X-Git-Tag: accepted/tizen/unified/20190813.215958~46^2~47^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f26ac56e38a60ba92bf6eed6f3a488302fc7d24e;p=platform%2Fupstream%2Fcoreclr.git Get rid of varNumInp. --- diff --git a/src/jit/codegenarmarch.cpp b/src/jit/codegenarmarch.cpp index b787ad6..bd64ba3 100644 --- a/src/jit/codegenarmarch.cpp +++ b/src/jit/codegenarmarch.cpp @@ -733,10 +733,6 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) unsigned structSize; bool isHfa; - // This is the varNum for our load operations, - // only used when we have a multireg struct with a LclVar source - unsigned varNumInp = BAD_VAR_NUM; - #ifdef _TARGET_ARM_ // On ARM32, size of reference map can be larger than MAX_ARG_REG_COUNT gcPtrs = treeNode->gtGcPtrs; @@ -746,9 +742,7 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) if (source->OperGet() == GT_LCL_VAR) { assert(varNode != nullptr); - varNumInp = varNode->gtLclNum; - assert(varNumInp < compiler->lvaCount); - LclVarDsc* varDsc = &compiler->lvaTable[varNumInp]; + LclVarDsc* varDsc = &compiler->lvaTable[varNode->GetLclNum()]; // This struct also must live in the stack frame // And it can't live in a register (SIMD) @@ -834,8 +828,8 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) if (varNode != nullptr) { // Load from our varNumImp source - emit->emitIns_R_R_S_S(INS_ldp, emitTypeSize(type0), emitTypeSize(type1), loReg, hiReg, varNumInp, - structOffset); + emit->emitIns_R_R_S_S(INS_ldp, emitTypeSize(type0), emitTypeSize(type1), loReg, hiReg, + varNode->GetLclNum(), structOffset); } else { @@ -869,7 +863,7 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) if (varNode != nullptr) { // Load from our varNumImp source - emit->emitIns_R_S(INS_ldr, emitTypeSize(type), loReg, varNumInp, structOffset); + emit->emitIns_R_S(INS_ldr, emitTypeSize(type), loReg, varNode->GetLclNum(), structOffset); } else { @@ -908,7 +902,7 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode) if (varNode != nullptr) { // Load from our varNumImp source - emit->emitIns_R_S(ins_Load(nextType), nextAttr, loReg, varNumInp, structOffset); + emit->emitIns_R_S(ins_Load(nextType), nextAttr, loReg, varNode->GetLclNum(), structOffset); } else {