Niko Matsakis
39a58c38a0
introduce the rather simpler symbol-cache in place of symbol-map
...
The symbol map is not good for incremental: it has inputs from every fn
in existence, and it will change if anything changes. One could imagine
cheating with the symbol-map and exempting it from the usual dependency
tracking, since the results are fully deterministic. Instead, I opted to
just add a per-CGU cache, on the premise that recomputing some symbol
names is not going to be so very expensive.
2017-04-21 17:26:53 -04:00
A.J. Gardner
70fcff6318
Add new TransItem for global_asm trans
2017-04-12 19:12:49 -05:00
Ariel Ben-Yehuda
f2c7917402
translate drop glue using MIR
...
Drop of arrays is now translated in trans::block in an ugly way that I
should clean up in a later PR, and does not handle panics in the middle
of an array drop, but this commit & PR are growing too big.
2017-03-18 02:53:08 +02:00
Ariel Ben-Yehuda
aac5ba5dab
resolve instances to ty::Instance directly
...
This removes the duplication between collector, callee, and (eventually)
MIRI.
2017-03-18 02:53:07 +02:00
Ariel Ben-Yehuda
ffee9566bb
move Instance to rustc and use it in the collector
2017-03-18 02:53:04 +02:00
Ariel Ben-Yehuda
ca8708273b
more through normalization in typeck & trans
...
Fixes #27901 .
Fixes #28828 .
Fixes #38135 .
Fixes #39363 .
2017-03-01 16:56:08 +02:00
Eduard-Mihai Burtescu
45c8c5678a
rustc: rename TyCtxt's map
field to hir
.
2017-01-26 13:41:28 +02:00
Michael Woerister
622730ca10
Remove some out-dated comments from CGU partitioning docs.
2017-01-09 10:06:58 -05:00
Michael Woerister
5f90947c2c
trans: Treat generics like regular functions, not like #[inline] functions during CGU partitioning.
2017-01-09 10:06:58 -05:00
Michael Woerister
4a494ed8df
incr.comp.: Take symbol visibility into account for CGU hashes.
2016-12-09 17:47:56 -05:00
Jeffrey Seyfried
36c8f6b0d3
Cleanup InternedString
.
2016-11-21 09:00:56 +00:00
Jeffrey Seyfried
e85a0d70b8
Use Symbol
instead of InternedString
in the AST, HIR, and various other places.
2016-11-21 09:00:55 +00:00
Jeffrey Seyfried
d2f8fb0a0a
Move syntax::util::interner
-> syntax::symbol
, cleanup.
2016-11-20 23:40:20 +00:00
Eduard Burtescu
3f9eba1c7c
rustc: clean up lookup_item_type and remove TypeScheme.
2016-11-10 16:49:53 +02:00
Nicholas Nethercote
00e48affde
Replace FnvHasher use with FxHasher.
...
This speeds up compilation by 3--6% across most of rustc-benchmarks.
2016-11-08 15:14:59 +11:00
Jonathan Turner
1a7aa75332
Rollup merge of #36960 - michaelwoerister:linker-regression, r=eddyb
...
Linker regression
This should fix the symbol conflicts reported in #36852 .
The PR also makes some debug output a bit more informative.
r? @eddyb
2016-10-06 08:35:42 -07:00
Michael Woerister
457019967b
Add symbol hash to trans::partitioning debug output.
2016-10-04 12:02:19 -04:00
Alex Crichton
10c3134da0
std: Stabilize and deprecate APIs for 1.13
...
This commit is intended to be backported to the 1.13 branch, and works with the
following APIs:
Stabilized
* `i32::checked_abs`
* `i32::wrapping_abs`
* `i32::overflowing_abs`
* `RefCell::try_borrow`
* `RefCell::try_borrow_mut`
* `DefaultHasher`
* `DefaultHasher::new`
* `DefaultHasher::default`
Deprecated
* `BinaryHeap::push_pop`
* `BinaryHeap::replace`
* `SipHash13`
* `SipHash24`
* `SipHasher` - use `DefaultHasher` instead in the `std::collections::hash_map`
module
Closes #28147
Closes #34767
Closes #35057
Closes #35070
2016-10-03 10:34:34 -07:00
Michael Woerister
bfa6fdc72c
trans: Allow base::internalize_symbols() to internalize #[no_mangle] symbols
2016-09-15 20:39:58 -04:00
Michael Woerister
c10176ef66
trans: Only translate #[inline] functions if they are used somewhere.
2016-09-15 11:40:16 -04:00
Niko Matsakis
72694d5829
give apply_param_substs
a SharedCrateContext
...
I plan to put a cache on the shared context, for now at least.
2016-08-31 17:05:53 -04:00
Eduard Burtescu
5222fa58a1
rustc: use accessors for Substs::{types,regions}.
2016-08-27 00:25:04 +03:00
Eduard Burtescu
9453d9b8ad
rustc: remove ParamSpace from Substs.
2016-08-17 06:32:00 +03:00
Eduard Burtescu
c1cfd58cbd
rustc: remove SelfSpace from ParamSpace.
2016-08-17 05:50:57 +03:00
Eduard Burtescu
4158673ad7
rustc: reduce Substs and Generics to a simple immutable API.
2016-08-17 05:50:57 +03:00
Niko Matsakis
2f9fff2191
Keep multiple files per work-product
...
In the older version, a `.o` and ` .bc` file were separate
work-products. This newer version keeps, for each codegen-unit, a set
of files of different kinds. We assume that if any kinds are available
then all the kinds we need are available, since the precise set of
switches will depend on attributes and command-line switches.
Should probably test this: the effect of changing attributes in
particular might not be successfully tracked?
2016-07-28 12:05:45 -04:00
Niko Matsakis
ceeb158e0a
Address mw nits
2016-07-28 12:05:45 -04:00
Niko Matsakis
58d4b8edd3
Modify trans to skip generating .o
files
...
This checks the `previous_work_products` data from the dep-graph and
tries to simply copy a `.o` file if possible. We also add new
work-products into the dep-graph, and create edges to/from the dep-node
for a work-product.
2016-07-28 12:05:45 -04:00
Michael Woerister
1c03bfe3b4
trans: Adjust linkage assignment so that we don't need weak linkage.
2016-07-08 10:42:48 -04:00
Michael Woerister
4c27a3c6d5
trans: Enable falling back to on-demand instantiation for drop-glue and monomorphizations.
...
See issue #34151 for more information.
2016-07-08 10:42:48 -04:00
Michael Woerister
ab80f74670
collector-driven-trans: Take care of nits.
2016-07-08 10:42:47 -04:00
Michael Woerister
3a47103f1d
Fix codegen tests by make sure items are translated in AST order.
2016-07-08 10:42:47 -04:00
Michael Woerister
37a10ecbe8
Make item translation order deterministic by sorting by symbol name.
2016-07-08 10:42:47 -04:00
Michael Woerister
87c1c87dd7
Make drop-glue translation collector-driven.
2016-07-08 10:42:47 -04:00
Michael Woerister
6c8c94b848
Improve linkage assignment in trans::partitioning.
2016-07-08 10:42:47 -04:00
Michael Woerister
65e8a13441
Adapt backend to trans::partitioning dictating the codegen-unit setup.
2016-07-08 10:42:46 -04:00
Niko Matsakis
be7b576cc5
correct typo in comment
2016-05-24 15:08:07 -04:00
Niko Matsakis
02af34def7
always make at least one codegen-unit
...
this allows us to remove the dummy `foo` fn
2016-05-18 21:24:30 -04:00
Michael Woerister
85b155f6f1
trans: Don't try to place declarations during codegen unit partitioning.
2016-05-11 13:58:23 -04:00
Michael Woerister
e3f19cb0b3
trans: Move TransItem to its own module.
2016-05-11 13:49:44 -04:00
Eduard Burtescu
76affa5d6f
rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.
2016-05-11 04:14:58 +03:00
Eduard Burtescu
513d392f7e
rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.
2016-05-11 04:14:58 +03:00
Michael Woerister
b89a5d1f7c
Make FixedCount partitioning handle case where codegen units have to be added.
2016-05-09 16:17:00 -04:00
Michael Woerister
bebcb285ad
Restructure trans_crate() so that codegen unit partitioning happens before creating LocalCrateContexts.
2016-05-09 16:17:00 -04:00
Michael Woerister
0fc9f9a200
Make the codegen unit partitioner also emit item declarations.
2016-04-28 16:53:00 -04:00
Michael Woerister
7f04d35cc6
Add FixedUnitCount codegen unit partitioning strategy.
2016-04-28 14:36:34 -04:00
Michael Woerister
c61f22932d
Let the translation item collector make a distinction between drop-glue kinds
2016-04-28 14:36:34 -04:00
Michael Woerister
e8441b6784
Add initial version of codegen unit partitioning for incremental compilation.
2016-04-15 10:05:53 -04:00