Skip to content

Stop using CLS_VAR on x86 - #67335

Merged
BruceForstall merged 1 commit into
dotnet:mainfrom
SingleAccretion:Delete-ClsVar-x86
Apr 3, 2022
Merged

BruceForstall merged 1 commit into
dotnet:mainfrom
SingleAccretion:Delete-ClsVar-x86

Conversation

@SingleAccretion

@SingleAccretion SingleAccretion commented Mar 30, 2022 •

Copy link
Copy Markdown
Contributor

We are expecting sizeable positive diffs:

  1. Decomposition created TYP_BYREF locals when decomposing LONG loads because CLS_VAR_ADDR was typed as TYP_BYREF. The constant nodes are typed TYP_I_IMPL, thus the created locals do not need zero-initialization.
  2. mov static_addr turns out to have a smaller encoding than lea [static_addr].

We will also see some regressions:

  1. The aforementioned lack of zero-initialization can perturb the RA -- these are the two large (in absolute terms) regressions in the runtime tests.
  2. More aggressive swapping of ASG(..., <former CLS_VAR>) does not always pay off.

Diffs (locally obtained).

@ghost ghost added community-contribution Indicates that the PR has been added by a community member area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Mar 30, 2022
@ghost

ghost commented Mar 30, 2022

Copy link
Copy Markdown

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

Issue Details

We are expecting sizeable positive diffs:

  1. Decomposition created TYP_BYREF locals when decomposing LONG loads because CLS_VAR_ADDR was typed as TYP_BYREF. The constant nodes are typed TYP_I_IMPL, thus the created locals do not need zero-initialization.
  2. mov static_addr turns out to have a smaller encoding than lea [static_addr].

We will also see some regressions:

  1. The aforementioned lack of zero-initialization can perturb the RA -- these are the two large (in absolute terms) regressions in the runtime tests.
  2. More aggressive swapping of ASG(..., <former CLS_VAR> does not always pay off.
Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@SingleAccretion
SingleAccretion force-pushed the Delete-ClsVar-x86 branch 2 times, most recently from f8bdc1c to 470cf48 Compare March 30, 2022 17:49
@SingleAccretion
SingleAccretion marked this pull request as ready for review April 1, 2022 21:46
@SingleAccretion

Copy link
Copy Markdown
Contributor Author

@dotnet/jit-contrib

@BruceForstall
BruceForstall self-requested a review April 2, 2022 00:32
@BruceForstall

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@SingleAccretion

Copy link
Copy Markdown
Contributor Author

No x86 failures.

There are a number of ARM/64 failures that #67486 should (hopefully) fix.

@BruceForstall

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@BruceForstall
BruceForstall merged commit 966a4a7 into dotnet:main Apr 3, 2022
@SingleAccretion
SingleAccretion deleted the Delete-ClsVar-x86 branch April 3, 2022 19:33
@ghost ghost locked as resolved and limited conversation to collaborators May 4, 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.

3 participants