about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-14 13:17:16 +0000
committerbors <bors@rust-lang.org>2017-01-14 13:17:16 +0000
commitef04fc82b198487b0ffb1832304714519f9f1a35 (patch)
treec8c575d60cac53b8d3c90685fe5e489e953e193e /src/test/run-pass/thinlto
parentb4c0207148f58163af00d81428bdc74da651928c (diff)
parentfc9dfcacf87eb5bb24271cdbb3863345fd27d751 (diff)
downloadrust-ef04fc82b198487b0ffb1832304714519f9f1a35.tar.gz
rust-ef04fc82b198487b0ffb1832304714519f9f1a35.zip
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
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions