Skip to content

Conversation

@BruceForstall
Copy link
Contributor

Compute them before loop hoisting, where they are actually used, not at the beginning of value numbering.

Compute them before loop hoisting, where they are actually used,
not at the beginning of value numbering.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 18, 2023
@ghost ghost assigned BruceForstall Feb 18, 2023
@ghost
Copy link

ghost commented Feb 18, 2023

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

Issue Details

Compute them before loop hoisting, where they are actually used, not at the beginning of value numbering.

Author: BruceForstall
Assignees: BruceForstall
Labels:

area-CodeGen-coreclr

Milestone: -

unsigned floatVarsCount = VarSetOps::Count(this, lvaFloatVars);

if (floatVarsCount > 0)
if (!VarSetOps::IsEmpty(this, lvaFloatVars))
Copy link
Member

Choose a reason for hiding this comment

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

It looks like lvaFloatVars doesn't account for SIMD variables (which end up in the same registers and I'd imagine have similar considerations). Is that expected and/or should they be tracked separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR is simply a refactoring of existing code. I've opened #82351 to track this issue. It looks like SIMD type trees get treated as using int registers instead of float registers for the purpose of loop hoisting profitability.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Definitely not something I thought should be handled here, more just an observation/question of the code that was being refactored

@BruceForstall
Copy link
Contributor Author

@AndyAyersMS PTAL
cc @dotnet/jit-contrib

@BruceForstall BruceForstall merged commit 7908e8e into dotnet:main Feb 19, 2023
@BruceForstall BruceForstall deleted the RefactorLongFloatVarsCalculation branch February 19, 2023 19:20
@BruceForstall
Copy link
Contributor Author

Actually shows a small but measurable TP improvement

@ghost ghost locked as resolved and limited conversation to collaborators Mar 22, 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.

3 participants