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

Deleting field sequences from LCL_FLD and VNF_PtrToArrElem #68986

Merged
merged 6 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 0 additions & 6 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,6 @@ class LclVarDsc
unsigned char lvInSsa : 1; // The variable is in SSA form (set by SsaBuilder)
unsigned char lvIsCSE : 1; // Indicates if this LclVar is a CSE variable.
unsigned char lvHasLdAddrOp : 1; // has ldloca or ldarga opcode on this local.
unsigned char lvStackByref : 1; // This is a compiler temporary of TYP_BYREF that is known to point into our local
// stack frame.

unsigned char lvHasILStoreOp : 1; // there is at least one STLOC or STARG on this local
unsigned char lvHasMultipleILStoreOp : 1; // there is more than one STLOC on this local
Expand Down Expand Up @@ -4781,8 +4779,6 @@ class Compiler
// Does value-numbering for a block assignment.
void fgValueNumberBlockAssignment(GenTree* tree);

bool fgValueNumberBlockAssignmentTypeCheck(LclVarDsc* dstVarDsc, FieldSeqNode* dstFldSeq, GenTree* src);

// Does value-numbering for a cast tree.
void fgValueNumberCastTree(GenTree* tree);

Expand Down Expand Up @@ -5701,8 +5697,6 @@ class Compiler
GenTree* fgMorphMultiOp(GenTreeMultiOp* multiOp);
GenTree* fgMorphConst(GenTree* tree);

bool fgMorphCanUseLclFldForCopy(unsigned lclNum1, unsigned lclNum2);

GenTreeLclVar* fgMorphTryFoldObjAsLclVar(GenTreeObj* obj, bool destroyNodes = true);
GenTreeOp* fgMorphCommutative(GenTreeOp* tree);
GenTree* fgMorphCastedBitwiseOp(GenTreeOp* tree);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ inline void GenTree::SetOper(genTreeOps oper, ValueNumberUpdate vnUpdate)
#endif
case GT_LCL_FLD:
AsLclFld()->SetLclOffs(0);
AsLclFld()->SetFieldSeq(FieldSeqStore::NotAField());
AsLclFld()->SetLayout(nullptr);
break;

case GT_CALL:
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/jit/decomposelongs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,9 @@ GenTree* DecomposeLongs::DecomposeLclVar(LIR::Use& use)
m_compiler->lvaSetVarDoNotEnregister(varNum DEBUGARG(DoNotEnregisterReason::LocalField));
loResult->SetOper(GT_LCL_FLD);
loResult->AsLclFld()->SetLclOffs(0);
loResult->AsLclFld()->SetFieldSeq(FieldSeqStore::NotAField());

hiResult->SetOper(GT_LCL_FLD);
hiResult->AsLclFld()->SetLclOffs(4);
hiResult->AsLclFld()->SetFieldSeq(FieldSeqStore::NotAField());
}

return FinalizeDecomposition(use, loResult, hiResult, hiResult);
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/jit/flowgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,13 +961,6 @@ bool Compiler::fgAddrCouldBeNull(GenTree* addr)
{
return false;
}

LclVarDsc* varDsc = lvaGetDesc(varNum);

if (varDsc->lvStackByref)
{
return false;
}
}
else if (addr->gtOper == GT_ADDR)
{
Expand Down
19 changes: 0 additions & 19 deletions src/coreclr/jit/gcinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,25 +346,6 @@ GCInfo::WriteBarrierForm GCInfo::gcWriteBarrierFormFromTargetAddress(GenTree* tg
return GCInfo::WBF_NoBarrier;
}

if (tgtAddr->OperGet() == GT_LCL_VAR)
{
unsigned lclNum = tgtAddr->AsLclVar()->GetLclNum();
LclVarDsc* varDsc = compiler->lvaGetDesc(lclNum);

// Instead of marking LclVar with 'lvStackByref',
// Consider decomposing the Value Number given to this LclVar to see if it was
// created using a GT_ADDR(GT_LCLVAR) or a GT_ADD( GT_ADDR(GT_LCLVAR), Constant)

// We may have an internal compiler temp created in fgMorphCopyBlock() that we know
// points at one of our stack local variables, it will have lvStackByref set to true.
//
if (varDsc->lvStackByref)
{
assert(varDsc->TypeGet() == TYP_BYREF);
return GCInfo::WBF_NoBarrier;
}
}

if (tgtAddr->TypeGet() == TYP_REF)
{
return GCInfo::WBF_BarrierUnchecked;
Expand Down
Loading