-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #38944 - michaelwoerister:incr-generics-partitioning, r…
…=nikomatsakis trans: Treat generics like regular functions, not like #[inline] function, during CGU partitioning This PR makes generics be treated just like regular functions during CGU partitioning: + the function instantiation is placed in a codegen unit based on the function's DefPath, + unless it is marked with `#[inline]` -- which causes a private copy of the function to be placed in every referencing codegen unit. This has the following effects: + Multi codegen unit builds will become faster because code for generic functions is duplicated less. + Multi codegen unit builds might have lower runtime performance, since generics are not available for inlining automatically any more. + Single codegen unit builds are not affected one way or the other. This partitioning scheme is particularly good for incremental compilation as it drastically reduces the number of false positives during codegen unit invalidation. I'd love to have a benchmark suite for estimating the effect on runtime performance for changes like this one. r? @nikomatsakis cc @rust-lang/compiler
- Loading branch information
Showing
15 changed files
with
175 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.