Skip to content

Stop generating CLS_VAR for 64 bit targets - #66298

Merged
jakobbotsch merged 1 commit into
dotnet:mainfrom
SingleAccretion:Delete-ClsVar-64-Bit
Mar 14, 2022
Merged

jakobbotsch merged 1 commit into
dotnet:mainfrom
SingleAccretion:Delete-ClsVar-64-Bit

Conversation

@SingleAccretion

@SingleAccretion SingleAccretion commented Mar 7, 2022 •

Copy link
Copy Markdown
Contributor

This is the first change that fully disables CLS_VAR - on 64 bit platforms. The reason I am doing it this way is because there will be many more (positive) diffs on x86, and ARM likely requires some CSE heuristic changes and/or quirks to avoid some regressions.

We are not expecting diffs on ARM64. But expecting some limited amount of them on x64, caused by:

  1. "Hoisting" more constants (Do not hoist constants if they will not be CSEed #64039).
  2. Slightly different gtSetEvalOrder behavior: more aggressive reversal of ASG(..., IND(static addr)) (it didn't reverse for leaf CLS_VAR RHSs).
  3. Very subtle changes in register allocation due to more opportunities for reuse of constants.

At first, my goal was to make this a zero-diff change, by mititigating all the above ("and more") with other changes, but after some weeks of looking at the problems from different angles, I "gave up" and decided it would be more productive to accept the diffs.

Diffs.

@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 7, 2022
@ghost

ghost commented Mar 7, 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

This is the first change that fully disables CLS_VAR - on 64 bit platforms. The reason I am doing it this way is because there will be many more (positive) diffs on x86, and ARM likely requires yet one more change to CSE heuristics and/or quirks to avoid some regressions.

We are not expecting diffs on ARM64, and expecting some limited diffs on x64, due to the fact we will now be "hoisting" more constants (#64039).

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr, community-contribution

Milestone: -

@SingleAccretion
SingleAccretion marked this pull request as ready for review March 7, 2022 18:36
@SingleAccretion

Copy link
Copy Markdown
Contributor Author

Actually fewer diffs than I initially feared, very nice (and green CI!).

@dotnet/jit-contrib - the simple part of deleting CLS_VAR.

@jakobbotsch

Copy link
Copy Markdown
Member

Nice! Do you plan to delete CLS_VAR in another change?

@SingleAccretion

SingleAccretion commented Mar 7, 2022 •

Copy link
Copy Markdown
Contributor Author

Yes, there will be at least the x86 change and the ARM change (probably the latter one will actually delete the code).

@jakobbotsch
jakobbotsch merged commit cbc856d into dotnet:main Mar 14, 2022
@SingleAccretion
SingleAccretion deleted the Delete-ClsVar-64-Bit branch March 14, 2022 10:29
@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 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