Skip to content

Include llvm-profgen in llvm-tools component #155525

@zamazan4ik

Description

@zamazan4ik

Hi!

I want to propose adding a llvm-profgen tool to the llvm-tools component with motivation to simplify Sampling PGO (SPGO) scenarios for the Rust ecosystem. As a part of the #117023 issue, I want to make as easy as possible SPGO scenarios for Rust users since SPGO resolves some critical issues with Instrumentation PGO (like runtime overhead) that limits PGO adoption in the ecosystem.

Having this tool as a part of llvm-tools (or llvm-tools-preview - I am not sure about a difference between them) simplifies downloading the tool for Rust users. This tool is pretty small so it will not bloat the component a lot. Alternative approches (from Clang docs) like AutoFDO set of tools are too hard to ship propeply since AutoFDO usually lags behind actual LLVM for several versions, requires applying patches for fixing builds with the latest LLVM, etc. llvm-profgen doesn't have such a limitation and is more LLVM-friendly (since it's in the upstream already). Additional motivation for having it delivered by Rustup and not somehow externally - possible issues with SPGO profile format compatibility between different LLVM versions - by providing the tool with matching to the used by Rustc LLVM version will remove such nasty issues in the future. Since we already have llvm-profdata I think from consistency perspective having llvm-profgen would be a nice addition too.

I tried to follow process about requesting a new tool in a similar way to other requests:

If the issue requires some additional discussions somewhere else or even an RFC (like it's done for clang above) - just let me know, I'll do it.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-llvm-bintoolsArea: LLVM bintools (`llvm-nm` et.). Note that `llvm-tools{,-preview` has no stability guarantees.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions