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

Split and simplify fgMorphOneAsgBlockOp #76793

Merged

Conversation

SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Oct 9, 2022

The main goal of this change is to extract the parts of fgMorphOneAsgBlockOp that actually do useful work and delete the rest.

To that end:

  1. Import initobj <primitive> as stind <primitive zero>.
  2. Fix some regressions and gather some improvements by retyping certain FP stores to in-memory locals to integer ones. This is where the bulk of the diffs for this change come from. Regressions are due to alignment or the fact some code gets a bit larger (but avoids a load from the data section).
  3. Delete code from fgMorphOneAsgBlockOp: extract the "init block" part to the general block morpher, leave the copy block part as-is (for now).

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 9, 2022
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 9, 2022
@ghost
Copy link

ghost commented Oct 9, 2022

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

The main goal of this change is to extract the parts of fgMorphOneAsgBlockOp that actually do useful and work and delete the rest.

To that end:

  1. Import initobj <primitive> as stind <primitive zero>.
  2. Fix some regressions and gather some improvements by retyping certain FP stores to in-memory locals to integer ones. This is where the bulk of the diffs for this change come from. Regressions are due to alignment or the fact some code gets a bit larger (but avoids a load from the data section).
  3. Delete code from fgMorphOneAsgBlockOp: extract the "init block" part to the general block morpher, leave the copy block part as-is (for now).
Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@SingleAccretion SingleAccretion force-pushed the Slimming-Down-OneAsg-Morphing-Upstream branch from aa5115b to 4284dc3 Compare October 9, 2022 12:51
@SingleAccretion SingleAccretion marked this pull request as ready for review October 9, 2022 15:51
@SingleAccretion
Copy link
Contributor Author

@dotnet/jit-contrib

The CI is down, but this is otherwise ready for review.

No point in creating block nodes for simple types.
Avoids a couple regressions.
A zero-diff checkpoint.
3 small regressions across all of SPMI due to less aggressive
CSEing ("LCL_FLD" is costed cheaper than "IND(ADDR(LCL_VAR))").
PrepareDst will have killed assertions already.
@SingleAccretion
Copy link
Contributor Author

SingleAccretion commented Oct 10, 2022

There are some SIMD-related failures here getting rid of which is best done by waiting for #76745 to land.

#76745 landed.

@SingleAccretion SingleAccretion marked this pull request as ready for review October 31, 2022 17:39
@SingleAccretion
Copy link
Contributor Author

Diffs.

@dotnet/jit-contrib

// Arguments:
// store - The store node
//
void Lowering::TryRetypingFloatingPointStoreToIntegerStore(GenTree* store)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original retyping was done under MinOpts too, so this follows; there is of course an argument to be made it should not.

@jakobbotsch jakobbotsch closed this Nov 8, 2022
@jakobbotsch jakobbotsch reopened this Nov 8, 2022
@jakobbotsch
Copy link
Member

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, Fuzzlyn

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jakobbotsch jakobbotsch merged commit c04cf0c into dotnet:main Nov 9, 2022
@SingleAccretion SingleAccretion deleted the Slimming-Down-OneAsg-Morphing-Upstream branch November 9, 2022 21:04
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants