rust-lang / rust-lang/rust

CGU reuse tracking used by incr. comp. testing is inaccurate wrt ThinLTO CGU reuse

Open
#119,076 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-incr-comp A-testsuite C-cleanup T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Since https://github.com/rust-lang/rust/pull/115964, CGU reuse tracking does not report "post-lto" reuse when the compiler discovers that the cached post-LTO version of a CGU can be re-used during the ThinLTO phase in the LLVM backend.

Due to this some tests in https://github.com/rust-lang/rust/tree/cda4736f1eaad8af6f49388baa9b7e480df8e329/tests/incremental/thinlto state "pre-lto" even though we actually expect the "post-lto" artifacts to be reusable. We should look into

  • restoring accurate reporting for the LLVM backend, and
  • trying to make the tests in question compatible with other backends that don't have ThinLTO.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PR 115964 and the CGU reuse tracking used by the LLVM backend. Run or inspect the cases under tests/incremental/thinlto, comparing their reported "pre-lto" and expected "post-lto" reuse. Done means LLVM reporting is accurate and the affected tests work with backends that do not support ThinLTO.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.