Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: remove GTF_INX_REFARR_LAYOUT #33098

Merged
merged 6 commits into from
Mar 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/coreclr/src/jit/optcse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,9 @@ class CSE_Heuristic
GenTree* cse = nullptr;
bool isDef;
FieldSeqNode* fldSeq = nullptr;
bool hasZeroMapAnnotation = m_pCompiler->GetZeroOffsetFieldMap()->Lookup(exp, &fldSeq);
bool commaOnly = true;
GenTree* effectiveExp = exp->gtEffectiveVal(commaOnly);
const bool hasZeroMapAnnotation = m_pCompiler->GetZeroOffsetFieldMap()->Lookup(effectiveExp, &fldSeq);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you deleted the place below that uses this bool, is that intentional?


if (IS_CSE_USE(exp->gtCSEnum))
{
Expand Down Expand Up @@ -2907,12 +2909,6 @@ class CSE_Heuristic
// Assign the ssa num for the ref use. Note it may be the reserved num.
ref->AsLclVarCommon()->SetSsaNum(cseSsaNum);

// If it has a zero-offset field seq, copy annotation to the ref
if (hasZeroMapAnnotation)
{
m_pCompiler->fgAddFieldSeqForZeroOffset(ref, fldSeq);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, originally there were two places the zero map annotation got added -- in the def case, and below the join of the use/def. So it was possible to try and add the zero map annotation to the def twice.

Now we just rely on the common one below the join.


/* Create a comma node for the CSE assignment */
cse = m_pCompiler->gtNewOperNode(GT_COMMA, expTyp, origAsg, ref);
cse->gtVNPair = ref->gtVNPair; // The comma's value is the same as 'val'
Expand Down