Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Decomposing 64-bit storeind instruction to 32-bit storeind instructions#5380

Merged
sejongoh merged 1 commit into
dotnet:masterfrom
sejongoh:x86_decompose_storeind
Jun 20, 2016
Merged

Decomposing 64-bit storeind instruction to 32-bit storeind instructions#5380
sejongoh merged 1 commit into
dotnet:masterfrom
sejongoh:x86_decompose_storeind

Conversation

@sejongoh
Copy link
Copy Markdown

@sejongoh sejongoh commented Jun 1, 2016

Decompose 64-bit storeind instruction.

@sejongoh
Copy link
Copy Markdown
Author

sejongoh commented Jun 1, 2016

Opened for testing

@sejongoh
Copy link
Copy Markdown
Author

sejongoh commented Jun 9, 2016

@dotnet-bot test Windows_NT x86 ryujit Checked Build and Test

@sejongoh
Copy link
Copy Markdown
Author

sejongoh commented Jun 9, 2016

@dotnet-bot test this

@sejongoh
Copy link
Copy Markdown
Author

sejongoh commented Jun 9, 2016

@dotnet-bot test Windows_NT x86 ryujit Checked Build and Test

@sejongoh sejongoh force-pushed the x86_decompose_storeind branch from d5b0906 to ef9a8dc Compare June 10, 2016 18:04
@sejongoh
Copy link
Copy Markdown
Author

@dotnet-bot test Windows_NT x86 ryujit Checked Build and Test

@sejongoh
Copy link
Copy Markdown
Author

@dotnet-bot test Ubuntu x64 Checked Build and Test

@sejongoh sejongoh force-pushed the x86_decompose_storeind branch 3 times, most recently from 1960742 to ccddd11 Compare June 16, 2016 17:46
@sejongoh
Copy link
Copy Markdown
Author

@BruceForstall PTAL.

Comment thread src/jit/lower.cpp Outdated
}

// Internal links of storeIndHigh tree
dataHigh->gtNext = addrBaseHigh;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can't we use SimpleLinkNodeAfter or something similar? This kind of manual linking hurts the readability of the code.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would second the suggestion (and apologies for my delay, as I'm out of office this week).

@mikedn
Copy link
Copy Markdown

mikedn commented Jun 16, 2016

Side note not really related to this PR: IMO it would be better to pull decomposition stuff in a separate class in a separate file. JIT already suffers a lot from huge classes and files.

@CarolEidt
Copy link
Copy Markdown

@mikedn - I like the idea of pulling out the decomposition code.

@sejongoh sejongoh force-pushed the x86_decompose_storeind branch from ccddd11 to 5341479 Compare June 17, 2016 21:56
@sejongoh
Copy link
Copy Markdown
Author

@CarolEidt @mikedn I will open an issue for pulling out the decomposition code.

@sejongoh
Copy link
Copy Markdown
Author

@mikedn @CarolEidt PTAL

Comment thread src/jit/lower.cpp
comp->gtDispTree(dataHighStmt);
}
#endif
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Doesn't dataHighStmt need the same workaround for embedded statements?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think that dataHighStmt is not a new statement as long as gtLong->gtOp.gtOp2 comes after gtLong->gtOp.gtOp1 in the linear order. Do you think that we could have the REVERSE flag on gtLong node? If so, we need the same workaround here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Right, without GTF_REVERSE_OPS dataHighStmt should never become a top-level statement, the GT_LCL_VAR node produced by dataLowStmt prevents that. I don't see any code setting GTF_REVERSE_OPS on GT_LONG nodes and hopefully no such code will ever be added as it would simply complicate things more. So not applying the workaround here seems the right thing to do.

@mikedn
Copy link
Copy Markdown

mikedn commented Jun 18, 2016

I don't think I mentioned that this probably won't generate very good code, when I played with decomposing GT_STOREIND I ended up with something like

lea eax, [ebx+ecx]
mov [eax], esi
mov [eax+4], edi

due to the address temporary.

Anyway, IMO this is good enough to be merged. CQ issues and other implementation issues such as redundancy of the workaround code can be addressed later when more decomposition work is done and we hopefully get a better picture of the whole thing.

The embedded statement stuff seems a bit nightmarish and I still wonder if switching to linear IR wouldn't be easier.

@sejongoh
Copy link
Copy Markdown
Author

@mikedn @CarolEidt Thanks for thorough review! What we want here is simply breaking a store into two stores. IMO, IR manipulation is quite complicated and hope that we can improve this.

@sejongoh sejongoh force-pushed the x86_decompose_storeind branch from 5341479 to 15c8b69 Compare June 19, 2016 23:21
@sejongoh sejongoh force-pushed the x86_decompose_storeind branch from 15c8b69 to 780400f Compare June 19, 2016 23:28
@sejongoh
Copy link
Copy Markdown
Author

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test

@sejongoh
Copy link
Copy Markdown
Author

@dotnet-bot test Ubuntu x64 Checked Build and Test

@sejongoh
Copy link
Copy Markdown
Author

@dotnet-bot test OSX x64 Checked Build and Test

@sejongoh sejongoh merged commit b464dc3 into dotnet:master Jun 20, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…oreind

Decomposing 64-bit storeind instruction to 32-bit storeind instructions

Commit migrated from dotnet/coreclr@b464dc3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants