-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Stop creating "location" commas #83814
Changes from 6 commits
6af4141
89910ac
5f19c59
ce62726
298c2d1
768c3ff
2ec8474
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -163,12 +163,10 @@ GenTree* MorphInitBlockHelper::Morph() | |
// | ||
void MorphInitBlockHelper::PrepareDst() | ||
{ | ||
GenTree* origDst = m_asg->gtGetOp1(); | ||
m_dst = MorphBlock(m_comp, origDst, true); | ||
if (m_dst != origDst) | ||
{ | ||
m_asg->gtOp1 = m_dst; | ||
} | ||
m_dst = m_asg->gtGetOp1(); | ||
|
||
// Commas cannot be destinations. | ||
assert(!m_dst->OperIs(GT_COMMA)); | ||
|
||
if (m_asg->TypeGet() != m_dst->TypeGet()) | ||
{ | ||
|
@@ -213,7 +211,7 @@ void MorphInitBlockHelper::PrepareDst() | |
#if defined(DEBUG) | ||
if (m_comp->verbose) | ||
{ | ||
printf("PrepareDst for [%06u] ", m_comp->dspTreeID(origDst)); | ||
printf("PrepareDst for [%06u] ", m_comp->dspTreeID(m_dst)); | ||
if (m_dstLclNode != nullptr) | ||
{ | ||
printf("have found a local var V%02u.\n", m_dstLclNum); | ||
|
@@ -1595,6 +1593,12 @@ GenTree* Compiler::fgMorphInitBlock(GenTree* tree) | |
// | ||
GenTree* Compiler::fgMorphStoreDynBlock(GenTreeStoreDynBlk* tree) | ||
{ | ||
if (!tree->Data()->OperIs(GT_CNS_INT, GT_INIT_VAL)) | ||
{ | ||
// Data is a location. | ||
tree->Data()->gtFlags |= GTF_DONT_CSE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're relying on this NO_CSE, seems prudent to set it in import as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I decided to leave this here only, I think we should either set it on all locations in the importer or none of them, and today we don't set it on any of them. As you probably know we rely on this flag for the similar purpose in I guess today only the IND form of locations is allowed for |
||
} | ||
|
||
tree->Addr() = fgMorphTree(tree->Addr()); | ||
tree->Data() = fgMorphTree(tree->Data()); | ||
tree->gtDynamicSize = fgMorphTree(tree->gtDynamicSize); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent->OperIsLocal
looks a bit unnecessary asLCL_VAR/LCL_FLD
LHSs cannot have children, andSTORE_LCL_VAR/FLD
(when those start appearing here) won't need to be restricted like this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed that check.