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][jit] Reenable branch optimizations when running with llvm. #97189

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Jan 19, 2024

No description provided.

@vargaz
Copy link
Contributor Author

vargaz commented Jan 19, 2024

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor Author

vargaz commented Jan 21, 2024

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor Author

vargaz commented Jan 23, 2024

/azp run runtime-wasm

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz vargaz marked this pull request as ready for review January 24, 2024 18:05
@vargaz
Copy link
Contributor Author

vargaz commented Jan 25, 2024

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor Author

vargaz commented Jan 25, 2024

/azp run runtime

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor Author

vargaz commented Jan 25, 2024

This PR will reduce both executable size and aot compiler memory usage by eliminating code early. Previously, we were only running branch optimizations in opt/llc, so if we had code like:
if (Vector.IsSupported)
the aot compiler couldn't figure out that was not needed, so it ended up generating a lot of extra vector generic instances.

@vargaz
Copy link
Contributor Author

vargaz commented Jan 25, 2024

/azp runtime-extra-platforms

Copy link

Command 'runtime-extra-platforms' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@vargaz
Copy link
Contributor Author

vargaz commented Jan 25, 2024

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

This is supposed to return a 16xi8 so there is no need to cast it.
This only worked by accident because the phi handling code casted it
to the right type most of the time.
@vargaz
Copy link
Contributor Author

vargaz commented Jan 26, 2024

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor Author

vargaz commented Jan 26, 2024

This saves around 120k on an aot hello world on wasm.

@vargaz
Copy link
Contributor Author

vargaz commented Jan 26, 2024

Failures are probably unrelated, the llvm lanes are timing out.

Copy link
Member

@kg kg left a comment

Choose a reason for hiding this comment

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

I assume the changes to lhs are to fix crashes you hit while doing this. Looks fine to me.

@vargaz vargaz merged commit 027a43b into dotnet:main Jan 29, 2024
152 of 164 checks passed
@vargaz vargaz deleted the llvm-branch2 branch January 29, 2024 18:34
@github-actions github-actions bot locked and limited conversation to collaborators Feb 29, 2024
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