Skip to content

Comments

Simplify ThinLTO handling#152670

Open
bjorn3 wants to merge 6 commits intorust-lang:mainfrom
bjorn3:lto_refactors12
Open

Simplify ThinLTO handling#152670
bjorn3 wants to merge 6 commits intorust-lang:mainfrom
bjorn3:lto_refactors12

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 15, 2026

This reduces the amount of complexity around ThinLTO module buffers. It removes duplication between ModuleBuffer and ThinBuffer (the latter was also used for fat LTO in some cases), clarifies when and where the ThinLTO summary is used (only for --emit thin-link-bitcode, ThinLTO performed by rustc rebuilds the summary every time). This also enables a follow up cleanup to reduce code duplication between red, green and imported codegen units.

Part of rust-lang/compiler-team#908

@bjorn3 bjorn3 added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Feb 15, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2026
@petrochenkov petrochenkov self-assigned this Feb 15, 2026
@petrochenkov
Copy link
Contributor

Blocked on #152566 and #152527.
@rustbot blocked

@petrochenkov petrochenkov removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 15, 2026
@bjorn3 bjorn3 force-pushed the lto_refactors12 branch 3 times, most recently from df90c7e to ecd2f10 Compare February 20, 2026 12:27
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Feb 20, 2026
@bjorn3 bjorn3 marked this pull request as ready for review February 21, 2026 11:48
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 21, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 21, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@bjorn3
Copy link
Member Author

bjorn3 commented Feb 21, 2026

@rustbot ready

#152527 has been merged.

@petrochenkov petrochenkov removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Feb 22, 2026
@petrochenkov
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

📌 Commit 3decb52 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 23, 2026
@Kobzol
Copy link
Member

Kobzol commented Feb 23, 2026

We can perf. in the meantime, just in case.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 23, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 23, 2026
…nkov

Simplify ThinLTO handling

This reduces the amount of complexity around ThinLTO module buffers. It removes duplication between `ModuleBuffer` and `ThinBuffer` (the latter was also used for fat LTO in some cases), clarifies when and where the ThinLTO summary is used (only for `--emit thin-link-bitcode`, ThinLTO performed by rustc rebuilds the summary every time). This also enables a follow up cleanup to reduce code duplication between red, green and imported codegen units.

Part of rust-lang/compiler-team#908
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

☀️ Try build successful (CI)
Build commit: a4404b1 (a4404b1cf3490a3641bdc8adabd6eb7271f1dba8, parent: eeb94be79adc9df7a09ad0b2421f16e60e6d932c)

@rust-timer
Copy link
Collaborator

Queued a4404b1 with parent eeb94be, future comparison URL.
There are currently 0 preceding artifacts in the queue.
It will probably take at least ~1.0 hours until the benchmark run finishes.

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. A-run-make Area: port run-make Makefiles to rmake.rs A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.

5 participants