diff options
author | Andy Ayers <andya@microsoft.com> | 2018-07-23 11:47:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 11:47:17 -0700 |
commit | 456d22753b62b5e46b61fa13bef75847229d30ca (patch) | |
tree | 52ed64cb20be51d1eac453c61870451a49dc7fc6 /src | |
parent | 92d2c4bde42569d2aa22e44550d69f7d743bf9a0 (diff) | |
download | coreclr-456d22753b62b5e46b61fa13bef75847229d30ca.tar.gz coreclr-456d22753b62b5e46b61fa13bef75847229d30ca.tar.bz2 coreclr-456d22753b62b5e46b61fa13bef75847229d30ca.zip |
JIT: some lclvars related cleanup (#19077)
Consolidate various compiler globals used when setting local var ref
counts by folding them into the visitor:
* lvaMarkRefsCurBlock
* lvaMarkRefsCurStmt
* lvaMarkRefsWeight
Remove the largely vestigial `lvPrefReg` and associated methods to set
or modify this field. Haven't verified but this is likely a remmant of
the legacy backend.
In the one remaning use (lcl var sorting predicates), swap in `lvIsRegArg`
instead, which gets most of the same cases.
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/compiler.h | 13 | ||||
-rw-r--r-- | src/jit/compiler.hpp | 112 | ||||
-rw-r--r-- | src/jit/flowgraph.cpp | 14 | ||||
-rw-r--r-- | src/jit/lclvars.cpp | 184 | ||||
-rw-r--r-- | src/jit/morph.cpp | 1 | ||||
-rw-r--r-- | src/jit/target.h | 3 | ||||
-rw-r--r-- | src/jit/utils.cpp | 9 |
7 files changed, 51 insertions, 285 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 7a914d42af..e5bd4436a2 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -598,8 +598,6 @@ public: return regMask; } - regMaskSmall lvPrefReg; // set of regs it prefers to live in - unsigned short lvVarIndex; // variable tracking index private: @@ -2971,16 +2969,9 @@ public: //========================================================================= protected: -//---------------- Local variable ref-counting ---------------------------- - -#if ASSERTION_PROP - BasicBlock* lvaMarkRefsCurBlock; - GenTree* lvaMarkRefsCurStmt; -#endif - BasicBlock::weight_t lvaMarkRefsWeight; - - void lvaMarkLclRefs(GenTree* tree); + //---------------- Local variable ref-counting ---------------------------- + void lvaMarkLclRefs(GenTree* tree, BasicBlock* block, GenTreeStmt* stmt); bool IsDominatedByExceptionalEntry(BasicBlock* block); void SetVolatileHint(LclVarDsc* varDsc); diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp index 0385e1035c..165255a639 100644 --- a/src/jit/compiler.hpp +++ b/src/jit/compiler.hpp @@ -1885,7 +1885,7 @@ inline void LclVarDsc::decRefCnts(BasicBlock::weight_t weight, Compiler* comp, R { for (unsigned i = lvFieldLclStart; i < lvFieldLclStart + lvFieldCnt; ++i) { - comp->lvaTable[i].decRefCnts(comp->lvaMarkRefsWeight, comp, state, false); // Don't propagate + comp->lvaTable[i].decRefCnts(weight, comp, state, false); // Don't propagate } } } @@ -1898,7 +1898,7 @@ inline void LclVarDsc::decRefCnts(BasicBlock::weight_t weight, Compiler* comp, R assert(!parentvarDsc->lvRegStruct); if (promotionType == Compiler::PROMOTION_TYPE_DEPENDENT) { - parentvarDsc->decRefCnts(comp->lvaMarkRefsWeight, comp, state, false); // Don't propagate + parentvarDsc->decRefCnts(weight, comp, state, false); // Don't propagate } } @@ -1942,7 +1942,7 @@ inline void LclVarDsc::incRefCnts(BasicBlock::weight_t weight, Compiler* comp, R setLvRefCnt((unsigned short)newRefCnt, state); } - // This fires when an uninitialize value for 'weight' is used (see lvaMarkRefsWeight) + // This fires when an uninitialize value for 'weight' is used assert(weight != 0xdddddddd); // // Increment lvRefCntWtd @@ -1976,7 +1976,7 @@ inline void LclVarDsc::incRefCnts(BasicBlock::weight_t weight, Compiler* comp, R { for (unsigned i = lvFieldLclStart; i < lvFieldLclStart + lvFieldCnt; ++i) { - comp->lvaTable[i].incRefCnts(comp->lvaMarkRefsWeight, comp, state, false); // Don't propagate + comp->lvaTable[i].incRefCnts(weight, comp, state, false); // Don't propagate } } } @@ -1989,7 +1989,7 @@ inline void LclVarDsc::incRefCnts(BasicBlock::weight_t weight, Compiler* comp, R assert(!parentvarDsc->lvRegStruct); if (promotionType == Compiler::PROMOTION_TYPE_DEPENDENT) { - parentvarDsc->incRefCnts(comp->lvaMarkRefsWeight, comp, state, false); // Don't propagate + parentvarDsc->incRefCnts(weight, comp, state, false); // Don't propagate } } @@ -2008,108 +2008,6 @@ inline void LclVarDsc::incRefCnts(BasicBlock::weight_t weight, Compiler* comp, R /***************************************************************************** * - * Set the lvPrefReg field to reg - */ - -inline void LclVarDsc::setPrefReg(regNumber regNum, Compiler* comp) -{ - regMaskTP regMask; - if (isFloatRegType(TypeGet())) - { - // Check for FP struct-promoted field being passed in integer register - // - if (!genIsValidFloatReg(regNum)) - { - return; - } - regMask = genRegMaskFloat(regNum, TypeGet()); - } - else - { - regMask = genRegMask(regNum); - } - -#ifdef _TARGET_ARM_ - // Don't set a preferred register for a TYP_STRUCT that takes more than one register slot - if ((TypeGet() == TYP_STRUCT) && (lvSize() > REGSIZE_BYTES)) - return; -#endif - - /* Only interested if we have a new register bit set */ - if (lvPrefReg & regMask) - { - return; - } - -#ifdef DEBUG - if (comp->verbose) - { - if (lvPrefReg) - { - printf("Change preferred register for V%02u from ", this - comp->lvaTable); - dspRegMask(lvPrefReg); - } - else - { - printf("Set preferred register for V%02u", this - comp->lvaTable); - } - printf(" to "); - dspRegMask(regMask); - printf("\n"); - } -#endif - - /* Overwrite the lvPrefReg field */ - - lvPrefReg = (regMaskSmall)regMask; -} - -/***************************************************************************** - * - * Add regMask to the lvPrefReg field - */ - -inline void LclVarDsc::addPrefReg(regMaskTP regMask, Compiler* comp) -{ - assert(regMask != RBM_NONE); - -#ifdef _TARGET_ARM_ - // Don't set a preferred register for a TYP_STRUCT that takes more than one register slot - if ((lvType == TYP_STRUCT) && (lvSize() > REGSIZE_BYTES)) - return; -#endif - - /* Only interested if we have a new register bit set */ - if (lvPrefReg & regMask) - { - return; - } - -#ifdef DEBUG - if (comp->verbose) - { - if (lvPrefReg) - { - printf("Additional preferred register for V%02u from ", this - comp->lvaTable); - dspRegMask(lvPrefReg); - } - else - { - printf("Set preferred register for V%02u", this - comp->lvaTable); - } - printf(" to "); - dspRegMask(lvPrefReg | regMask); - printf("\n"); - } -#endif - - /* Update the lvPrefReg field */ - - lvPrefReg |= regMask; -} - -/***************************************************************************** - * * The following returns the mask of all tracked locals * referenced in a statement. */ diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index ef2a4b3a37..72f67f0132 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -8465,17 +8465,6 @@ private: comp->compFloatingPointUsed = true; } - if (!varTypeIsFloating(comp->info.compRetType)) - { - returnLocalDsc.setPrefReg(REG_INTRET, comp); - } -#ifdef REG_FLOATRET - else - { - returnLocalDsc.setPrefReg(REG_FLOATRET, comp); - } -#endif - #ifdef DEBUG // This temporary should not be converted to a double in stress mode, // because we introduce assigns to it after the stress conversion @@ -8907,8 +8896,7 @@ void Compiler::fgAddInternal() lvaInlinedPInvokeFrameVar = lvaGrabTempWithImplicitUse(false DEBUGARG("Pinvoke FrameVar")); LclVarDsc* varDsc = &lvaTable[lvaInlinedPInvokeFrameVar]; - varDsc->addPrefReg(RBM_PINVOKE_TCB, this); - varDsc->lvType = TYP_BLK; + varDsc->lvType = TYP_BLK; // Make room for the inlined frame. varDsc->lvExactSize = eeGetEEInfo()->inlinedCallFrameInfo.size; #if FEATURE_FIXED_OUT_ARGS diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index ea1976008a..9e83d11776 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -441,7 +441,6 @@ void Compiler::lvaInitThisPtr(InitVarDscInfo* varDscInfo) #if FEATURE_MULTIREG_ARGS varDsc->lvOtherArgReg = REG_NA; #endif - varDsc->setPrefReg(varDsc->lvArgReg, this); varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame #ifdef DEBUG @@ -488,7 +487,6 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo* varDscInfo) #if FEATURE_MULTIREG_ARGS varDsc->lvOtherArgReg = REG_NA; #endif - varDsc->setPrefReg(varDsc->lvArgReg, this); varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame info.compRetBuffDefStack = 0; @@ -842,7 +840,6 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo) if (secondEightByteType != TYP_UNDEF) { varDsc->lvOtherArgReg = genMapRegArgNumToRegNum(secondAllocatedRegArgNum, secondEightByteType); - varDsc->addPrefReg(genRegMask(varDsc->lvOtherArgReg), this); } #else // ARM32 or ARM64 varDsc->lvArgReg = genMapRegArgNumToRegNum(firstAllocatedRegArgNum, TYP_I_IMPL); @@ -850,7 +847,6 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo) if (cSlots == 2) { varDsc->lvOtherArgReg = genMapRegArgNumToRegNum(firstAllocatedRegArgNum + 1, TYP_I_IMPL); - varDsc->addPrefReg(genRegMask(varDsc->lvOtherArgReg), this); } #endif // _TARGET_ARM64_ #endif // defined(UNIX_AMD64_ABI) @@ -861,13 +857,10 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo* varDscInfo) varDsc->lvArgReg = genMapRegArgNumToRegNum(firstAllocatedRegArgNum, argType); } - varDsc->setPrefReg(varDsc->lvArgReg, this); - #ifdef _TARGET_ARM_ if (varDsc->TypeGet() == TYP_LONG) { varDsc->lvOtherReg = genMapRegArgNumToRegNum(firstAllocatedRegArgNum + 1, TYP_INT); - varDsc->addPrefReg(genRegMask(varDsc->lvOtherReg), this); } #endif // _TARGET_ARM_ @@ -1065,7 +1058,6 @@ void Compiler::lvaInitGenericsCtxt(InitVarDscInfo* varDscInfo) #if FEATURE_MULTIREG_ARGS varDsc->lvOtherArgReg = REG_NA; #endif - varDsc->setPrefReg(varDsc->lvArgReg, this); varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame varDscInfo->intRegArgNum++; @@ -1132,7 +1124,6 @@ void Compiler::lvaInitVarArgsHandle(InitVarDscInfo* varDscInfo) #if FEATURE_MULTIREG_ARGS varDsc->lvOtherArgReg = REG_NA; #endif - varDsc->setPrefReg(varDsc->lvArgReg, this); varDsc->lvOnFrame = true; // The final home for this incoming register might be our local stack frame #ifdef _TARGET_ARM_ // This has to be spilled right in front of the real arguments and we have @@ -2011,7 +2002,6 @@ void Compiler::lvaPromoteStructVar(unsigned lclNum, lvaStructPromotionInfo* Stru { fieldVarDsc->lvIsRegArg = true; fieldVarDsc->lvArgReg = varDsc->lvArgReg; - fieldVarDsc->setPrefReg(varDsc->lvArgReg, this); // Set the preferred register #if FEATURE_MULTIREG_ARGS && defined(FEATURE_SIMD) if (varTypeIsSIMD(fieldVarDsc) && !lvaIsImplicitByRefLocal(lclNum)) { @@ -2024,7 +2014,6 @@ void Compiler::lvaPromoteStructVar(unsigned lclNum, lvaStructPromotionInfo* Stru } #endif // FEATURE_MULTIREG_ARGS && defined(FEATURE_SIMD) - lvaMarkRefsWeight = BB_UNITY_WEIGHT; // incRefCnts can use this compiler global variable fieldVarDsc->incRefCnts(BB_UNITY_WEIGHT, this, RCS_EARLY); // increment the ref count for prolog initialization } @@ -2989,7 +2978,6 @@ void Compiler::lvaIncRefCnts(GenTree* tree) * Return positive if dsc2 has a higher ref count * Return negative if dsc1 has a higher ref count * Return zero if the ref counts are the same - * lvPrefReg is only used to break ties */ /* static */ @@ -3049,24 +3037,17 @@ int __cdecl Compiler::RefCntCmp(const void* op1, const void* op2) /* We have equal ref counts and weighted ref counts */ /* Break the tie by: */ - /* Increasing the weight by 2 if we have exactly one bit set in lvPrefReg */ - /* Increasing the weight by 1 if we have more than one bit set in lvPrefReg */ + /* Increasing the weight by 2 if we are a register arg */ /* Increasing the weight by 0.5 if we are a GC type */ /* Increasing the weight by 0.5 if we were enregistered in the previous pass */ if (weight1) { - if (dsc1->lvPrefReg) + if (dsc1->lvIsRegArg) { - if ((dsc1->lvPrefReg & ~RBM_BYTE_REG_FLAG) && genMaxOneBit((unsigned)dsc1->lvPrefReg)) - { - weight1 += 2 * BB_UNITY_WEIGHT; - } - else - { - weight1 += 1 * BB_UNITY_WEIGHT; - } + weight2 += 2 * BB_UNITY_WEIGHT; } + if (varTypeIsGC(dsc1->TypeGet())) { weight1 += BB_UNITY_WEIGHT / 2; @@ -3080,17 +3061,11 @@ int __cdecl Compiler::RefCntCmp(const void* op1, const void* op2) if (weight2) { - if (dsc2->lvPrefReg) + if (dsc2->lvIsRegArg) { - if ((dsc2->lvPrefReg & ~RBM_BYTE_REG_FLAG) && genMaxOneBit((unsigned)dsc2->lvPrefReg)) - { - weight2 += 2 * BB_UNITY_WEIGHT; - } - else - { - weight2 += 1 * BB_UNITY_WEIGHT; - } + weight2 += 2 * BB_UNITY_WEIGHT; } + if (varTypeIsGC(dsc2->TypeGet())) { weight2 += BB_UNITY_WEIGHT / 2; @@ -3170,31 +3145,14 @@ int __cdecl Compiler::WtdRefCntCmp(const void* op1, const void* op2) } #endif - /* Increase the weight by 2 if we have exactly one bit set in lvPrefReg */ - /* Increase the weight by 1 if we have more than one bit set in lvPrefReg */ - - if (weight1 && dsc1->lvPrefReg) + if (weight1 && dsc1->lvIsRegArg) { - if ((dsc1->lvPrefReg & ~RBM_BYTE_REG_FLAG) && genMaxOneBit((unsigned)dsc1->lvPrefReg)) - { - weight1 += 2 * BB_UNITY_WEIGHT; - } - else - { - weight1 += 1 * BB_UNITY_WEIGHT; - } + weight1 += 2 * BB_UNITY_WEIGHT; } - if (weight2 && dsc2->lvPrefReg) + if (weight2 && dsc2->lvIsRegArg) { - if ((dsc2->lvPrefReg & ~RBM_BYTE_REG_FLAG) && genMaxOneBit((unsigned)dsc2->lvPrefReg)) - { - weight2 += 2 * BB_UNITY_WEIGHT; - } - else - { - weight2 += 1 * BB_UNITY_WEIGHT; - } + weight2 += 2 * BB_UNITY_WEIGHT; } if (weight2 > weight1) @@ -3299,13 +3257,6 @@ void Compiler::lvaDumpRefCounts() gtDispLclVar((unsigned)(lvaRefSorted[lclNum] - lvaTable)); printf(" [%6s]: refCnt = %4u, refCntWtd = %6s", varTypeName(lvaRefSorted[lclNum]->TypeGet()), refCnt, refCntWtd2str(refCntWtd)); - - regMaskSmall pref = lvaRefSorted[lclNum]->lvPrefReg; - if (pref) - { - printf(" pref "); - dspRegMask(pref); - } printf("\n"); } @@ -3670,13 +3621,21 @@ var_types LclVarDsc::lvaArgType() return type; } -/***************************************************************************** - * - * This is called by lvaMarkLclRefsCallback() to do variable ref marking - */ +//------------------------------------------------------------------------ +// lvaMarkLclRefs: increment local var references counts and more +// +// Arguments: +// tree - some node in a tree +// block - block that the tree node belongs to +// stmt - stmt that the tree node belongs to +// +// Notes: +// Invoked via the MarkLocalVarsVisitor -void Compiler::lvaMarkLclRefs(GenTree* tree) +void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, GenTreeStmt* stmt) { + const BasicBlock::weight_t weight = block->getBBWeight(this); + /* Is this a call to unmanaged code ? */ if (tree->gtOper == GT_CALL && tree->gtFlags & GTF_CALL_UNMANAGED) { @@ -3691,8 +3650,8 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) LclVarDsc* varDsc = lvaTable + lclNum; /* Increment the ref counts twice */ - varDsc->incRefCnts(lvaMarkRefsWeight, this); - varDsc->incRefCnts(lvaMarkRefsWeight, this); + varDsc->incRefCnts(weight, this); + varDsc->incRefCnts(weight, this); } } @@ -3703,25 +3662,6 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) GenTree* op1 = tree->gtOp.gtOp1; GenTree* op2 = tree->gtOp.gtOp2; - /* Set target register for RHS local if assignment is of a "small" type */ - - if (varTypeIsByte(tree->gtType)) - { - unsigned lclNum; - LclVarDsc* varDsc = nullptr; - - if (op2->gtOper == GT_LCL_VAR) - { - lclNum = op2->gtLclVarCommon.gtLclNum; - noway_assert(lclNum < lvaCount); - varDsc = &lvaTable[lclNum]; - } -#if CPU_HAS_BYTE_REGS - if (varDsc) - varDsc->addPrefReg(RBM_BYTE_REG_FLAG, this); -#endif - } - #if OPT_BOOL_OPS /* Is this an assignment to a local variable? */ @@ -3774,27 +3714,6 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) #endif } -#ifdef _TARGET_XARCH_ - /* Special case: integer shift node by a variable amount */ - - if (tree->OperIsShiftOrRotate()) - { - if (tree->gtType == TYP_INT) - { - GenTree* op2 = tree->gtOp.gtOp2; - - if (op2->gtOper == GT_LCL_VAR) - { - unsigned lclNum = op2->gtLclVarCommon.gtLclNum; - assert(lclNum < lvaCount); - lvaTable[lclNum].setPrefReg(REG_ECX, this); - } - } - - return; - } -#endif - if ((tree->gtOper != GT_LCL_VAR) && (tree->gtOper != GT_LCL_FLD)) { return; @@ -3810,7 +3729,7 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) /* Increment the reference counts */ - varDsc->incRefCnts(lvaMarkRefsWeight, this); + varDsc->incRefCnts(weight, this); if (lvaVarAddrExposed(lclNum)) { @@ -3828,7 +3747,7 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) } #if ASSERTION_PROP - if (fgDomsComputed && IsDominatedByExceptionalEntry(lvaMarkRefsCurBlock)) + if (fgDomsComputed && IsDominatedByExceptionalEntry(block)) { SetVolatileHint(varDsc); } @@ -3857,7 +3776,7 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) else { varDsc->lvSingleDef = true; - varDsc->lvDefStmt = lvaMarkRefsCurStmt; + varDsc->lvDefStmt = stmt; } } else // otherwise this is a ref of our variable @@ -3867,7 +3786,7 @@ void Compiler::lvaMarkLclRefs(GenTree* tree) // Lazy initialization BlockSetOps::AssignNoCopy(this, varDsc->lvRefBlks, BlockSetOps::MakeEmpty(this)); } - BlockSetOps::AddElemD(this, varDsc->lvRefBlks, lvaMarkRefsCurBlock->bbNum); + BlockSetOps::AddElemD(this, varDsc->lvRefBlks, block->bbNum); } } #endif // ASSERTION_PROP @@ -3947,53 +3866,36 @@ void Compiler::lvaMarkLocalVars(BasicBlock* block) { class MarkLocalVarsVisitor final : public GenTreeVisitor<MarkLocalVarsVisitor> { + private: + BasicBlock* m_block; + GenTreeStmt* m_stmt; + public: enum { DoPreOrder = true, }; - MarkLocalVarsVisitor(Compiler* compiler) : GenTreeVisitor<MarkLocalVarsVisitor>(compiler) + MarkLocalVarsVisitor(Compiler* compiler, BasicBlock* block, GenTreeStmt* stmt) + : GenTreeVisitor<MarkLocalVarsVisitor>(compiler), m_block(block), m_stmt(stmt) { } Compiler::fgWalkResult PreOrderVisit(GenTree** use, GenTree* user) { - m_compiler->lvaMarkLclRefs(*use); + m_compiler->lvaMarkLclRefs(*use, m_block, m_stmt); return WALK_CONTINUE; } }; -#if ASSERTION_PROP - lvaMarkRefsCurBlock = block; -#endif - lvaMarkRefsWeight = block->getBBWeight(this); - -#ifdef DEBUG - if (verbose) - { - printf("\n*** marking local variables in block BB%02u (weight=%s)\n", block->bbNum, - refCntWtd2str(lvaMarkRefsWeight)); - } -#endif + JITDUMP("\n*** marking local variables in block BB%02u (weight=%s)\n", block->bbNum, + refCntWtd2str(block->getBBWeight(this))); - MarkLocalVarsVisitor visitor(this); - for (GenTree* tree = block->FirstNonPhiDef(); tree; tree = tree->gtNext) + for (GenTreeStmt* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->getNextStmt()) { - assert(tree->gtOper == GT_STMT); - -#if ASSERTION_PROP - lvaMarkRefsCurStmt = tree; -#endif - -#ifdef DEBUG - if (verbose) - { - gtDispTree(tree); - } -#endif - - visitor.WalkTree(&tree->gtStmt.gtStmtExpr, nullptr); + MarkLocalVarsVisitor visitor(this, block, stmt); + DISPTREE(stmt); + visitor.WalkTree(&stmt->gtStmtExpr, nullptr); } } diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 44034e7336..500bad4269 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -17735,7 +17735,6 @@ void Compiler::fgRetypeImplicitByRefArgs() #if FEATURE_MULTIREG_ARGS fieldVarDsc->lvOtherArgReg = REG_NA; #endif - fieldVarDsc->lvPrefReg = 0; } // Hijack lvFieldLclStart to record the new temp number. diff --git a/src/jit/target.h b/src/jit/target.h index 3cbdca0f56..d3520d0220 100644 --- a/src/jit/target.h +++ b/src/jit/target.h @@ -1588,12 +1588,9 @@ C_ASSERT((FEATURE_TAILCALL_OPT == 0) || (FEATURE_FASTTAILCALL == 1)); #if CPU_HAS_BYTE_REGS #define RBM_BYTE_REGS (RBM_EAX|RBM_ECX|RBM_EDX|RBM_EBX) #define RBM_NON_BYTE_REGS (RBM_ESI|RBM_EDI) - // We reuse the ESP register as a flag for byteable registers in lvPrefReg - #define RBM_BYTE_REG_FLAG RBM_ESP #else #define RBM_BYTE_REGS RBM_ALLINT #define RBM_NON_BYTE_REGS RBM_NONE - #define RBM_BYTE_REG_FLAG RBM_NONE #endif // clang-format on diff --git a/src/jit/utils.cpp b/src/jit/utils.cpp index 2b120dd347..b73f79f447 100644 --- a/src/jit/utils.cpp +++ b/src/jit/utils.cpp @@ -380,15 +380,6 @@ void dspRegMask(regMaskTP regMask, size_t minSiz) regPrev = regNum; } -#if CPU_HAS_BYTE_REGS - if (regMask & RBM_BYTE_REG_FLAG) - { - const char* nam = "BYTE"; - printf("%s%s", sep, nam); - minSiz -= (strlen(sep) + strlen(nam)); - } -#endif - if (strlen(sep) > 0) { // We've already printed something. |