未验证 提交 be6399b6 编写于 作者: S SingleAccretion 提交者: GitHub

Delete "lvOverlappingFields" (#72356)

We used to exclude locals with the flag set from SSA; this should no longer be necessary.
上级 2a2ebf9c
......@@ -530,10 +530,9 @@ public:
// 32-bit target. For implicit byref parameters, this gets hijacked between
// fgRetypeImplicitByRefArgs and fgMarkDemotedImplicitByRefArgs to indicate whether
// references to the arg are being rewritten as references to a promoted shadow local.
unsigned char lvIsStructField : 1; // Is this local var a field of a promoted struct local?
unsigned char lvOverlappingFields : 1; // True when we have a struct with possibly overlapping fields
unsigned char lvContainsHoles : 1; // True when we have a promoted struct that contains holes
unsigned char lvCustomLayout : 1; // True when this struct has "CustomLayout"
unsigned char lvIsStructField : 1; // Is this local var a field of a promoted struct local?
unsigned char lvContainsHoles : 1; // True when we have a promoted struct that contains holes
unsigned char lvCustomLayout : 1; // True when this struct has "CustomLayout"
unsigned char lvIsMultiRegArg : 1; // true if this is a multireg LclVar struct used in an argument context
unsigned char lvIsMultiRegRet : 1; // true if this is a multireg LclVar struct assigned from a multireg call
......
......@@ -1482,11 +1482,6 @@ void Compiler::lvaInitVarDsc(LclVarDsc* varDsc,
compFloatingPointUsed = true;
}
if (typeHnd != NO_CLASS_HANDLE)
{
varDsc->lvOverlappingFields = StructHasOverlappingFields(info.compCompHnd->getClassAttribs(typeHnd));
}
#if FEATURE_IMPLICIT_BYREFS
varDsc->lvIsImplicitByRef = 0;
#endif // FEATURE_IMPLICIT_BYREFS
......@@ -3074,8 +3069,6 @@ void Compiler::lvaSetStruct(unsigned varNum, CORINFO_CLASS_HANDLE typeHnd, bool
unsigned classAttribs = info.compCompHnd->getClassAttribs(typeHnd);
varDsc->lvOverlappingFields = StructHasOverlappingFields(classAttribs);
// Check whether this local is an unsafe value type and requires GS cookie protection.
// GS checks require the stack to be re-ordered, which can't be done with EnC.
if (unsafeValueClsCheck && (classAttribs & CORINFO_FLG_UNSAFE_VALUECLASS) && !opts.compDbgEnC)
......@@ -7930,10 +7923,6 @@ void Compiler::lvaDumpEntry(unsigned lclNum, FrameLayoutState curState, size_t r
if (varDsc->lvStructDoubleAlign)
printf(" double-align");
#endif // !TARGET_64BIT
if (varDsc->lvOverlappingFields)
{
printf(" overlapping-fields");
}
if (compGSReorderStackLayout && !varDsc->lvRegister)
{
......
......@@ -16627,12 +16627,6 @@ PhaseStatus Compiler::fgRetypeImplicitByRefArgs()
// Since the parameter in this position is really a pointer, its type is TYP_BYREF.
varDsc->lvType = TYP_BYREF;
// Since this previously was a TYP_STRUCT and we have changed it to a TYP_BYREF
// make sure that the following flag is not set as these will force SSA to
// exclude tracking/enregistering these LclVars. (see SsaBuilder::IncludeInSsa)
//
varDsc->lvOverlappingFields = 0; // This flag could have been set, clear it.
// The struct parameter may have had its address taken, but the pointer parameter
// cannot -- any uses of the struct parameter's address are uses of the pointer
// parameter's value, and there's no way for the MSIL to reference the pointer
......
......@@ -1644,11 +1644,6 @@ bool SsaBuilder::IncludeInSsa(unsigned lclNum)
// lvPromoted structs are never tracked...
assert(!varDsc->lvPromoted);
if (varDsc->lvOverlappingFields)
{
return false; // Don't use SSA on structs that have overlapping fields
}
if (varDsc->lvIsStructField &&
(m_pCompiler->lvaGetParentPromotionType(lclNum) != Compiler::PROMOTION_TYPE_INDEPENDENT))
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册