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 a quirk in regular promotion #88130

Merged
merged 1 commit into from
Jul 1, 2023

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jun 28, 2023

Also fix a bug in LSRA: if we undo promotion of one field of a multi-reg struct and as a result undo for the other fields as well, we must also clear out the largeVectorVars bitset to indicate these are no longer candidates. This was hitting crashes with some of the new promotions done by this change.

Also fix a bug in LSRA: if we undo promotion of one field of a multi-reg
struct and as a result undo for the other fields as well, we must also
clear out the largeVectorVars bitset to indicate these are no longer
candidates.
@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 Jun 28, 2023
@ghost ghost assigned jakobbotsch Jun 28, 2023
@ghost
Copy link

ghost commented Jun 28, 2023

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

Issue Details

Also fix a bug in LSRA: if we undo promotion of one field of a multi-reg struct and as a result undo for the other fields as well, we must also clear out the largeVectorVars bitset to indicate these are no longer candidates.

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @kunalspathak

Some decent diffs (mostly in tests, but a few KB in other collections too).

@jakobbotsch
Copy link
Member Author

Ping @kunalspathak, can you please take a look at this simple change? It will likely end up blocking #88238 otherwise.

@@ -1922,6 +1922,9 @@ void LinearScan::identifyCandidates()
fieldVarDsc->lvLRACandidate = 0;
localVarIntervals[fieldVarDsc->lvVarIndex] = nullptr;
VarSetOps::RemoveElemD(compiler, registerCandidateVars, fieldVarDsc->lvVarIndex);
#if FEATURE_PARTIAL_SIMD_CALLEE_SAVE
VarSetOps::RemoveElemD(compiler, largeVectorVars, fieldVarDsc->lvVarIndex);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it makes sense to check if fieldVarDsc->lvVarIndex was part of largeVectorVars to begin with.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I think just clearing it unconditionally should be ok.

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM

@jakobbotsch jakobbotsch merged commit 7180d7b into dotnet:main Jul 1, 2023
@jakobbotsch jakobbotsch deleted the remove-promotion-quirk branch July 1, 2023 18:36
@ghost ghost locked as resolved and limited conversation to collaborators Jul 31, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants