Skip to content

Commit

Permalink
Delete a legacy local for arm32. (#59380)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreenko authored Sep 21, 2021
1 parent 02523f7 commit 5f38670
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
8 changes: 0 additions & 8 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -4009,10 +4009,6 @@ class Compiler
void CheckRetypedAsScalar(CORINFO_FIELD_HANDLE fieldHnd, var_types requestedType);
#endif // DEBUG

#ifdef TARGET_ARM
bool GetRequiresScratchVar();
#endif // TARGET_ARM

private:
bool CanPromoteStructVar(unsigned lclNum);
bool ShouldPromoteStructVar(unsigned lclNum);
Expand All @@ -4026,10 +4022,6 @@ class Compiler
Compiler* compiler;
lvaStructPromotionInfo structPromotionInfo;

#ifdef TARGET_ARM
bool requiresScratchVar;
#endif // TARGET_ARM

#ifdef DEBUG
typedef JitHashTable<CORINFO_FIELD_HANDLE, JitPtrKeyFuncs<CORINFO_FIELD_STRUCT_>, var_types>
RetypedAsScalarFieldsMap;
Expand Down
25 changes: 0 additions & 25 deletions src/coreclr/jit/lclvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,29 +1629,12 @@ bool Compiler::lvaFieldOffsetCmp::operator()(const lvaStructFieldInfo& field1, c
Compiler::StructPromotionHelper::StructPromotionHelper(Compiler* compiler)
: compiler(compiler)
, structPromotionInfo()
#ifdef TARGET_ARM
, requiresScratchVar(false)
#endif // TARGET_ARM
#ifdef DEBUG
, retypedFieldsMap(compiler->getAllocator(CMK_DebugOnly))
#endif // DEBUG
{
}

#ifdef TARGET_ARM
//--------------------------------------------------------------------------------------------
// GetRequiresScratchVar - do we need a stack area to assemble small fields in order to place them in a register.
//
// Return value:
// true if there was a small promoted variable and scratch var is required .
//
bool Compiler::StructPromotionHelper::GetRequiresScratchVar()
{
return requiresScratchVar;
}

#endif // TARGET_ARM

//--------------------------------------------------------------------------------------------
// TryPromoteStructVar - promote struct var if it is possible and profitable.
//
Expand Down Expand Up @@ -1844,14 +1827,6 @@ bool Compiler::StructPromotionHelper::CanPromoteStructType(CORINFO_CLASS_HANDLE
// Don't promote vars whose struct types violates the invariant. (Alignment == size for primitives.)
return false;
}
// If we have any small fields we will allocate a single PromotedStructScratch local var for the method.
// This is a stack area that we use to assemble the small fields in order to place them in a register
// argument.
//
if (fieldInfo.fldSize < TARGET_POINTER_SIZE)
{
requiresScratchVar = true;
}
#endif // TARGET_ARM
}

Expand Down
14 changes: 0 additions & 14 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16985,20 +16985,6 @@ void Compiler::fgPromoteStructs()
}
}

#ifdef TARGET_ARM
if (structPromotionHelper->GetRequiresScratchVar())
{
// Ensure that the scratch variable is allocated, in case we
// pass a promoted struct as an argument.
if (lvaPromotedStructAssemblyScratchVar == BAD_VAR_NUM)
{
lvaPromotedStructAssemblyScratchVar =
lvaGrabTempWithImplicitUse(false DEBUGARG("promoted struct assembly scratch var."));
lvaTable[lvaPromotedStructAssemblyScratchVar].lvType = TYP_I_IMPL;
}
}
#endif // TARGET_ARM

#ifdef DEBUG
if (verbose)
{
Expand Down

0 comments on commit 5f38670

Please sign in to comment.