about summary refs log tree commit diff
path: root/src/test/codegen-units
AgeCommit message (Collapse)AuthorLines
2016-09-27Fix fallout in tests.Jeffrey Seyfried-4/+4
2016-09-21Auto merge of #36551 - eddyb:meta-games, r=nikomatsakisbors-0/+3
Refactor away RBML from rustc_metadata. RBML and `ty{en,de}code` have had their long-overdue purge. Summary of changes: * Metadata is now a tree encoded in post-order and with relative backward references pointing to children nodes. With auto-deriving and type safety, this makes maintenance and adding new information to metadata painless and bug-free by default. It's also more compact and cache-friendly (cache misses should be proportional to the depth of the node being accessed, not the number of siblings as in EBML/RBML). * Metadata sizes have been reduced, for `libcore` it went down 16% (`8.38MB` -> `7.05MB`) and for `libstd` 14% (`3.53MB` -> `3.03MB`), while encoding more or less the same information * Specialization is used in the bundled `libserialize` (crates.io `rustc_serialize` remains unaffected) to customize the encoding (and more importantly, decoding) of various types, most notably those interned in the `TyCtxt`. Some of this abuses a soundness hole pending a fix (cc @aturon), but when that fix arrives, we'll move to macros 1.1 `#[derive]` and custom `TyCtxt`-aware serialization traits. * Enumerating children of modules from other crates is now orthogonal to describing those items via `Def` - this is a step towards bridging crate-local HIR and cross-crate metadata * `CrateNum` has been moved to `rustc` and both it and `NodeId` are now newtypes instead of `u32` aliases, for specializing their decoding. This is `[syntax-breaking]` (cc @Manishearth ). cc @rust-lang/compiler
2016-09-21Auto merge of #36524 - michaelwoerister:trans-inline-only-on-demand, ↵bors-3/+3
r=nikomatsakis trans: Only instantiate #[inline] functions in codegen units referencing them This PR changes how `#[inline]` functions are translated. Before, there was one "master instance" of the function with `external` linkage and a number of on-demand instances with `available_externally` linkage in each codegen unit that referenced the function. This had two downsides: * Public functions marked with `#[inline]` would be present in machine code of libraries unnecessarily (see #36280 for an example) * LLVM would crash on `i686-pc-windows-msvc` due to what I suspect to be a bug in LLVM's Win32 exception handling code, because it doesn't like `available_externally` there (#36309). This PR changes the behavior, so that there is no master instance and only on-demand instances with `internal` linkage. The downside of this is potential code-bloat if LLVM does not completely inline away the `internal` instances because then there'd be N instances of the function instead of 1. However, this can only become a problem when using more than one codegen unit per crate. cc @rust-lang/compiler
2016-09-20rustc_trans: don't do on-demand drop glue instantiation.Eduard Burtescu-0/+3
2016-09-15Adapt codegen-unit test cases to new behaviourMichael Woerister-3/+3
2016-09-13trans: Let the collector find drop-glue for all vtables, not just VTableImpl.Michael Woerister-6/+0
2016-08-17rustc: move the SelfSpace before TypeSpace in Substs.Eduard Burtescu-5/+5
2016-08-12Make the translation item collector handle *uses* of 'const' items instead ↵Michael Woerister-0/+93
of declarations.
2016-07-08trans: Adjust linkage assignment so that we don't need weak linkage.Michael Woerister-20/+22
2016-07-08Improve linkage assignment in trans::partitioning.Michael Woerister-45/+45
2016-07-08Ignore closure-related translation item collection tests.Michael Woerister-0/+10
2016-06-16fix codegen-units falloutAriel Ben-Yehuda-2/+0
2016-06-04fix fallout in testsAriel Ben-Yehuda-6/+0
2016-05-23trans::collector: Remove some redundant calls to erase_regions().Michael Woerister-0/+4
2016-05-11trans: Make collector handle the drop_in_place() intrinsic.Michael Woerister-0/+41
2016-05-11Add test for collecting items in staticsJames Miller-0/+23
2016-05-11trans: Don't try to place declarations during codegen unit partitioning.Michael Woerister-11/+11
2016-05-07Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnikSteve Klabnik-1/+1
Fix some some duplicate words.
2016-05-06s/aux/auxiliary, because windowsNiko Matsakis-0/+0
For legacy reasons (presumably), Windows does not permit files name aux.
2016-05-06move auxiliary builds to a test-relative `aux`Niko Matsakis-0/+178
Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets.
2016-05-05Fix some some duplicate words.Georg Brandl-1/+1
2016-05-01Fix a race condition caused by concurrently executed codegen unit tests.Michael Woerister-10/+31
2016-04-28Make the codegen unit partitioner also emit item declarations.Michael Woerister-21/+21
2016-04-28Add FixedUnitCount codegen unit partitioning strategy.Michael Woerister-10/+10
2016-04-28Let the translation item collector make a distinction between drop-glue kindsMichael Woerister-5/+14
2016-04-28Fix codegen-units testsJames Miller-6/+2
I'm not sure what the signficance of `drop-glue i8` is, nor why one of the tests had it appear while the others had it disappear. Either way it doesn't seem like the presence or absense of it is the focus of the tests.
2016-04-28Fixup testsJames Miller-6/+0
The drop glue for `i8` is no longer generated as a trans item
2016-04-15Add initial version of codegen unit partitioning for incremental compilation.Michael Woerister-0/+601
2016-04-14Move translation-item-collection tests into subfolder.Michael Woerister-0/+0
2016-03-25fallout: update codegen-units testsNiko Matsakis-74/+74
2016-01-26Implement the translation item collector.Michael Woerister-0/+1346
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.