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

NativeAOT: Loop alignment support for xarch #81206

Merged
merged 5 commits into from
Jan 31, 2023

Conversation

kunalspathak
Copy link
Member

Contributes to #64242

@ghost ghost assigned kunalspathak Jan 26, 2023
@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 Jan 26, 2023
@ghost
Copy link

ghost commented Jan 26, 2023

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

Issue Details

Contributes to #64242

Author: kunalspathak
Assignees: kunalspathak
Labels:

area-CodeGen-coreclr

Milestone: -

@kunalspathak
Copy link
Member Author

@MichalStrehovsky

assert(((size_t)codeBlock & 31) == 0);
// For NativeAOT, codeBlock will not be necessarily aligned, but it is aligned
// in final obj file.
assert((((size_t)codeBlock & 31) == 0) || comp->IsTargetAbi(CORINFO_NATIVEAOT_ABI));
Copy link
Member

Choose a reason for hiding this comment

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

This should check JIT_FLAG_PREJIT instead. This would be a problem for R2R too if/once we enable the alignment for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This would be a problem for R2R too if/once we enable the alignment for it.

Should we go ahead and add loop alignment support for R2R too?

Copy link
Member

Choose a reason for hiding this comment

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

Should we go ahead and add loop alignment support for R2R too?

@dotnet/crossgen-contrib for thoughts - it would probably make sense to enable loop alignment for composite R2R or large version bubbles, but not sure it's worth it for regular R2R that has other throughput issues - it would probably just be a size regression. We'd probably want a way to control this from the EE side. It feels like it's going to be a question out of scope of this PR, but I'll let crossgen2 owners decide.

@kunalspathak kunalspathak marked this pull request as ready for review January 27, 2023 08:18
@kunalspathak
Copy link
Member Author

@dotnet/jit-contrib

src/coreclr/jit/emit.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/compiler.cpp Outdated Show resolved Hide resolved
src/coreclr/jit/emitxarch.cpp Outdated Show resolved Hide resolved
@kunalspathak
Copy link
Member Author

Ping.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@jkotas jkotas merged commit a9416d9 into dotnet:main Jan 31, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 3, 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.

4 participants