You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Constant propagation should preserve field sequences #64876
This is a CQ-only issue. We can see cases where (local) constant propagation propagates known addresses of statics and loses field sequences for them. This causes VN to be more pessimistic about those addresses than is necessary.
Fixing this would require saving the field sequence alongside the constant itself in assertions. Unfortunately, currently there is no space available, so some refactoring would be required to make sure there would be no memory consumption regression from this change.
Reacted by Egor Bogatov
Activity
ghost added
untriagedNew issue has not been triaged by the area owner
structAssertionDsc
{
optAssertionKindassertionKind;
structSsaVar
{
unsignedlclNum; // assigned to or property of this local var numberunsignedssaNum;
};
structArrBnd
{
ValueNumvnIdx;
ValueNumvnLen;
};
structAssertionDscOp1
{
optOp1Kindkind; // a normal LclVar, or Exact-type or SubtypeValueNumvn;
union {
SsaVarlcl;
ArrBndbnd;
};
} op1;
structAssertionDscOp2
{
optOp2Kindkind; // a const or copy assignmentValueNumvn;
structIntVal
{
ssize_ticonVal; // integer#if !defined(HOST_64BIT)
unsignedpadding; // unused; ensures iconFlags does not overlap lconVal#endifGenTreeFlagsiconFlags; // gtFlags
};
union {
SsaVarlcl;
IntValu1;
__int64lconVal;
doubledconVal;
IntegralRangeu2;
};
} op2;
we don't need that much space to store iconFlags (currently, we waste 8 bytes on it while there are only 22 possible values and they can't be mixed. - 1 byte is enough (5 bits actually)
Activity
EgorBo commentedon Nov 20, 2022
Memory layout:
Obvious things:
iconFlags(currently, we waste 8 bytes on it while there are only 22 possible values and they can't be mixed. - 1 byte is enough (5 bits actually)