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

[mono][interp] Reduce redundant moves with calls #79905

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Dec 22, 2022

We were marking INTERP_LOCAL_FLAG_NO_CALL_ARGS for source vars of non calls. With further optimizations, the var could end up being used only for the call but we never unset the flag. Reuse the ref count data instead, which is kept updated following optimizations, to achieve same thing. If cprop is not run then we always duplicate the args, but this is an unused scenario.

@ghost
Copy link

ghost commented Dec 22, 2022

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

Issue Details

We were marking INTERP_LOCAL_FLAG_NO_CALL_ARGS for source vars of non calls. With further optimizations, the var could end up being used only for the call but we never unset the flag. Reuse the ref count data instead, which is kept updated following optimizations, to achieve same thing. If cprop is not run then we always duplicate the args, but this is an unused scenario.

Author: BrzVlad
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@BrzVlad
Copy link
Member Author

BrzVlad commented Jan 4, 2023

This PR is currently blocked by bug in the call args offset allocation: #80175

Failure happens in System.IO.Ports.Tests Debug build, when running xunit with -method System.IO.Ports.Tests.BaudRate_Property.BaudRate_28800 in method CreateTestResultElement, problematic var is 183

@BrzVlad BrzVlad closed this Jan 4, 2023
@kotlarmilos kotlarmilos reopened this Jan 21, 2023
We were marking INTERP_LOCAL_FLAG_NO_CALL_ARGS for source vars of non calls. With further optimizations, the var could end up being used only for the call but we never unset the flag. Reuse the ref count data, which is kept updated following optimizations, to achieve same thing. If cprop is not run then we always duplicate the args, but this is an unused scenario.
@BrzVlad BrzVlad force-pushed the feature-interp-excess-no-call-args branch from 226d05b to d7205fe Compare January 21, 2023 08:14
@BrzVlad BrzVlad merged commit c50c745 into dotnet:main Jan 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants