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

Remove unused emitter call types and improve INS_tail_i_jmp handling #59495

Merged
merged 3 commits into from
Sep 24, 2021

Conversation

jakobbotsch
Copy link
Member

The size estimation for INS_tail_i_jmp instructions was working by
accident: we were always regarding these as requiring rex.w
prefixes, even when they did not. Fix the logic so that rex.w is not
considered required for 8-byte tail jumps, but add it manually for the
forms where it is really necessary.

There were also a lot of unused emitter call types that I have removed.

cc @dotnet/jit-contrib

The size estimation for INS_tail_i_jmp instructions was working by
accident: we were always regarding these as requiring rex.w
prefixes, even when they did not. Fix the logic so that rex.w is not
considered required for 8-byte tail jumps, but add it manually for the
forms where it is really necessary.

There were also a lot of unused emitter call types that I have removed.
@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 Sep 22, 2021
@ghost
Copy link

ghost commented Sep 22, 2021

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

Issue Details

The size estimation for INS_tail_i_jmp instructions was working by
accident: we were always regarding these as requiring rex.w
prefixes, even when they did not. Fix the logic so that rex.w is not
considered required for 8-byte tail jumps, but add it manually for the
forms where it is really necessary.

There were also a lot of unused emitter call types that I have removed.

cc @dotnet/jit-contrib

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM.

asm diffs?


// EC_FUNC_VIRTUAL, // Call to a virtual method (using the vtable)
Copy link
Member

Choose a reason for hiding this comment

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

At this point, I think there's not much point in keeping all the non-ARM cases here. They were initially left in during the port to make it easier to compare to x86. If you're going to delete this, I would delete the other commented-out cases (EC_FUNC_TOKEN_INDIR, EC_INDIR_SR, etc.), as well as the huge comment just above.

EC_INDIR_R, // Indirect call via register
// EC_INDIR_SR, // Indirect call via stack-reference (local var)
// EC_INDIR_C, // Indirect call via static class var
Copy link
Member

Choose a reason for hiding this comment

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

same comment here about deleting non-arm cases

@jakobbotsch
Copy link
Member Author

asm diffs?

No diffs on {x64, arm64}x{windows, linux}.

@jakobbotsch
Copy link
Member Author

Failures are #59541

@jakobbotsch jakobbotsch merged commit 84a6225 into dotnet:main Sep 24, 2021
@jakobbotsch jakobbotsch deleted the clean-up-call-emission branch September 24, 2021 13:47
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
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