Skip to content

Store a PathBuf rather than SerializedModule for cached modules#155036

Open
bjorn3 wants to merge 2 commits intorust-lang:mainfrom
bjorn3:lto_refactors16
Open

Store a PathBuf rather than SerializedModule for cached modules#155036
bjorn3 wants to merge 2 commits intorust-lang:mainfrom
bjorn3:lto_refactors16

Conversation

@bjorn3
Copy link
Copy Markdown
Member

@bjorn3 bjorn3 commented Apr 9, 2026

In cg_gcc ModuleBuffer already only contains a path anyway. And for moving LTO into -Zlink-only we will need to serialize MaybeLtoModules. By storing a path cached modules we avoid writing them to the disk a second time during serialization of MaybeLtoModules.

Some further improvements will require changes to cg_gcc that I would prefer landing in the cg_gcc repo to actually test the LTO changes in CI.

Part of rust-lang/compiler-team#908

bjorn3 added 2 commits April 9, 2026 10:57
In cg_gcc ModuleBuffer already only contains a path anyway. And for
moving LTO into -Zlink-only we will need to serialize MaybeLtoModules.
By storing a path cached modules we avoid writing them to the disk a
second time during serialization of MaybeLtoModules.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 69 candidates
  • Random selection from 12 candidates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants