Skip to content

[mono][jit] Reenable branch optimizations when running with llvm.#97189

Merged
vargaz merged 4 commits into
dotnet:mainfrom
vargaz:llvm-branch2
Jan 29, 2024
Merged

[mono][jit] Reenable branch optimizations when running with llvm.#97189
vargaz merged 4 commits into
dotnet:mainfrom
vargaz:llvm-branch2

Conversation

@vargaz

@vargaz vargaz commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@ghost ghost assigned vargaz Jan 19, 2024
@vargaz

vargaz commented Jan 19, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jan 21, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslike

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jan 23, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-wasm

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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

vargaz commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-ioslike

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

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

vargaz commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

/azp runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
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

vargaz commented Jan 25, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
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

vargaz commented Jan 26, 2024

Copy link
Copy Markdown
Contributor Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@vargaz

vargaz commented Jan 26, 2024

Copy link
Copy Markdown
Contributor Author

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

@vargaz

vargaz commented Jan 26, 2024

Copy link
Copy Markdown
Contributor Author

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

@kg kg left a comment

Copy link
Copy Markdown
Contributor

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
@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