Mark-Simulacrum
9a198534e2
Remove unused imports
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
88b2024a28
Cleanup instruction counting
2016-12-20 20:03:29 -07:00
Mark-Simulacrum
85ab08084d
Remove global builder
2016-12-20 20:03:28 -07:00
Mark-Simulacrum
8ed11209d6
Minor cleanup to context
2016-12-20 20:03:27 -07:00
Mark-Simulacrum
28f511cfbd
Remove global Builder
2016-12-20 20:02:52 -07:00
Vadzim Dambrouski
9d764fc3c1
Do not generate '@' character in symbol names.
...
MSP430 assembler does not like '@' character in symbol names, so we should
only use alphanumerics when we generate a new name.
Fixes #38116
2016-12-12 21:56:52 +03:00
Michael Woerister
4a494ed8df
incr.comp.: Take symbol visibility into account for CGU hashes.
2016-12-09 17:47:56 -05:00
Michael Woerister
5fd7c2bfef
trans: Rename reachable
to exported_symbols
where appropriate.
2016-12-05 11:05:25 -05:00
Mark-Simulacrum
bb35d50cad
Refactor TyTrait to contain a interned ExistentialPredicate slice.
...
Renames TyTrait to TyDynamic.
2016-11-28 18:09:13 -07:00
Jeffrey Seyfried
d2f8fb0a0a
Move syntax::util::interner
-> syntax::symbol
, cleanup.
2016-11-20 23:40:20 +00:00
Michael Woerister
276f052a80
Remove unused method CrateContext::rotate().
2016-11-13 19:49:57 -05:00
Michael Woerister
5b093ebab2
Make names of types used in LLVM IR stable.
...
Before this PR, type names could depend on the cratenum being used
for a given crate and also on the source location of closures.
Both are undesirable for incremental compilation where we cache
LLVM IR and don't want it to depend on formatting or in which
order crates are loaded.
2016-11-13 19:49:46 -05:00
Luqman Aden
c2f1e5d164
Get rid of superfluous HashMap in LocalCrateContext. We only need the str slice type.
2016-11-10 16:15:06 -05: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
Michael Woerister
a2a2763e6d
Replace all uses of SHA-256 with BLAKE2b.
2016-10-30 19:14:18 -04:00
Eduard Burtescu
e34792b181
rustc: move the MIR map into TyCtxt.
2016-10-28 13:55:49 +03:00
Eduard Burtescu
36340ba994
rustc: move mir::repr::* to mir.
2016-10-28 10:37:24 +03:00
Michael Woerister
e6aa92c432
trans: Make names of internal symbols independent of CGU translation order.
...
Every codegen unit gets its own local counter for generating new symbol
names. This makes bitcode and object files reproducible at the binary
level even when incremental compilation is used.
2016-10-21 14:58:53 -04:00
Austin Hicks
4038189688
Optimize struct_field_ptr
2016-09-24 18:21:12 -04:00
Austin Hicks
f16068e577
Completely kill represent_type
and the adt::Repr
type that goes with it.
2016-09-24 18:21:10 -04:00
Vadim Petrochenkov
f2b672d556
Refactor TyStruct
/TyEnum
/TyUnion
into TyAdt
2016-09-08 22:17:53 +03:00
Niko Matsakis
00d208eea8
remove normalize_infer_ctxt
constructor
2016-08-31 22:06:01 -04:00
Niko Matsakis
c5be6f6cc6
add cache to shared context for proj
2016-08-31 17:05:53 -04:00
bors
aa05a15363
Auto merge of #36027 - eddyb:unsized-prefix, r=nagisa
...
rustc_trans: don't round up the DST prefix size to its alignment.
Fixes #35815 by using `ty::layout` and `min_size` to compute the size of the DST prefix.
`ty::layout::Struct::min_size` is not rounded up to alignment, which could be smaller for the DST field.
2016-08-27 21:20:28 -07:00
Eduard Burtescu
3e313d9528
rustc_trans: don't round up the DST prefix size to its alignment.
2016-08-27 08:51:55 +03:00
Eduard Burtescu
dffd238f8b
rustc: pass ty::Region behind an interned 'tcx reference.
2016-08-27 01:15:06 +03:00
Eduard Burtescu
25cf8001b1
Remove AST from metadata except for consts and const fns.
2016-08-24 13:23:38 +03:00
Eduard Burtescu
d0654ae5e5
rustc_trans: remove the bulk of old trans and most of its support code.
2016-08-24 13:23:37 +03:00
Eduard Burtescu
4158673ad7
rustc: reduce Substs and Generics to a simple immutable API.
2016-08-17 05:50:57 +03:00
bors
1222f5d52b
Auto merge of #34845 - bitshifter:issue-30961, r=alexcrichton
...
Add help for target CPUs, features, relocation and code models.
Fix for https://github.com/rust-lang/rust/issues/30961 . Requires PR https://github.com/rust-lang/llvm/pull/45 to be accepted first, and the .gitmodules for llvm to be updated before this can be merged.
2016-08-10 21:42:48 -07:00
bors
e1d2bc2916
Auto merge of #35166 - nikomatsakis:incr-comp-ice-34991-2, r=mw
...
Address ICEs running w/ incremental compilation and building glium
Fixes for various ICEs I encountered trying to build glium with incremental compilation enabled. Building glium now works. Of the 4 ICEs, I have test cases for 3 of them -- I didn't isolate a test for the last commit and kind of want to go do other things -- most notably, figuring out why incremental isn't saving much *effort*.
But if it seems worthwhile and I can come back and try to narrow down the problem.
r? @michaelwoerister
Fixes #34991
Fixes #32015
2016-08-09 10:00:54 -07:00
Niko Matsakis
8fdc72f830
track MIR through the dep-graph
...
Per the discussion on #34765 , we make one `DepNode::Mir` variant and use
it to represent both the MIR tracking map as well as passes that operate
on MIR. We also track loads of cached MIR (which naturally comes from
metadata).
Note that the "HAIR" pass adds a read of TypeckItemBody because it uses
a myriad of tables that are not individually tracked.
2016-08-08 18:44:24 -04:00
Cameron Hart
cbb88faad7
Merge branch 'master' into issue-30961
2016-08-06 15:50:48 +10:00
Ariel Ben-Yehuda
696691e3c4
audit LLVM C++ types in ArchiveWrapper and PassWrapper
2016-08-03 15:08:47 +03:00
bors
28ce3e8a55
Auto merge of #35163 - sanxiyn:rollup, r=sanxiyn
...
Rollup of 8 pull requests
- Successful merges: #34802 , #35033 , #35085 , #35114 , #35134 , #35140 , #35141 , #35157
- Failed merges:
2016-08-01 08:57:32 -07:00
Michael Woerister
d5a5149617
Move caching of HIR-inlining into CStore in order to avoid duplicating inlined HIR.
2016-08-01 04:09:12 -04:00
Alex Crichton
e8f76661f1
rustc: Fix data-layout for AArch64 targets
...
Also relax the assertion whenever we have a custom LLVM root as LLVM may
disagree about exact specifics.
2016-07-29 10:29:44 +02:00
Jan-Erik Rediger
1798c1aa59
Refactor determining of relocation model into methods
2016-07-29 10:29:44 +02:00
Jan-Erik Rediger
9e706f90cb
[LLVM-3.9] Configure PIE at the module level instead of compilation unit level
...
This was deleted here[1] which appears to be replaced by this[2]
which is a new setPIELevel function on the LLVM module itself.
[1]: http://reviews.llvm.org/D19753
[2]: http://reviews.llvm.org/D19671
2016-07-29 10:29:44 +02:00
Jan-Erik Rediger
fba1f8f123
[LLVM-3.9] Setup the compile unit information immediately
...
Since LLVM reversed the order of the debug info graphs, we need to have
a compile unit that exists *before* any functions (`DISubprogram`s) are
created. This allows the LLVM debug info builder to automatically link
the functions to the compile unit.
2016-07-29 10:29:44 +02: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
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
Jonas Schievink
f5d29a3b59
Move variant_size_differences out of trans
...
Also enhances the error message a bit, fixes #30505 on the way, and adds
a test (which was missing).
Closes #34018
2016-07-10 22:12:31 +02:00
Michael Woerister
ac80d41175
trans: Remove tracking of translation item state.
...
The data tracked here was meant to compare the output of the
translation item collector to the set of translation items found
by the on-demand translator.
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
b38e0d0d44
Build SymbolMap for symbol name conflict checking and caching.
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
Jake Goulding
448e254ca0
All intrinsics are available in all supported LLVM versions
2016-06-10 18:26:44 -04:00
Eduard Burtescu
bcec7a5848
rustc: add ReErased to be used by trait selection, MIR and trans.
2016-06-05 13:58:51 +03:00
Eduard Burtescu
a619901e3d
trans: save metadata even with -Z no-trans.
2016-05-25 08:46:36 +03:00
Eduard Burtescu
04464db954
trans: remove item_symbols from metadata and CrateContext.
2016-05-25 01:56:49 +03:00
Eduard Burtescu
14133d33bc
trans: move exported_name's logic into symbol_names.
2016-05-25 01:34:17 +03:00
Eduard Burtescu
0d2c26c261
Mark the metadata symbol as reachable to fix OSX not finding dylibs.
2016-05-19 15:32:03 -07:00
Michael Woerister
802bb578e4
trans: Use CrateContext::empty_substs_for_def_id() instead of Substs::empty() where appropriate.
2016-05-11 17:11:20 -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
118cc9e8e1
Fix some rebasing fallout.
2016-05-09 16:17:00 -04:00
Michael Woerister
00eabcbefa
trans::context: Remove some tcx::tls wackiness
2016-05-09 16:17:00 -04:00
Michael Woerister
0142336a2a
trans: Add some explanatory comments to trans::context types.
2016-05-09 16:17:00 -04:00
Michael Woerister
a8e34dfc29
trans: Make partitioning available in LocalCrateContext.
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
bb8c8c58d3
Make trans::collector only depend on SharedCrateContext.
2016-05-09 16:17:00 -04:00
Michael Woerister
566aa54b49
trans: Make common::fulfill_obligation only depend on SharedCrateContext.
...
Plus make it produce a nicer dependency graph via DepTrackingMap::memoize().
2016-05-09 16:17:00 -04:00
Michael Woerister
b2ea54d2c6
trans: Split LocalCrateContext ownership out of SharedCrateContext.
2016-05-09 16:17:00 -04:00
Eduard Burtescu
e1eca0a110
Translate constants from MIR instead of going through trans::expr/consts.
2016-05-07 07:19:10 +03:00
Eduard Burtescu
fe48a4af84
Compute LLVM-agnostic type layouts in rustc.
...
# Conflicts:
# src/librustc/ty/layout.rs
2016-04-19 16:08:45 +03:00
Eduard Burtescu
0776399eac
Make data-layout mandatory in target specs.
2016-04-19 16:08:45 +03:00
Niko Matsakis
a9b6205aff
break dep-graph into modules, parameterize DepNode
...
it is useful later to customize how change the type we use for reference
items away from DefId
2016-04-06 12:42:46 -04:00
Eduard Burtescu
ffca6c3e15
rustc: move middle::{def,def_id,pat_util} to hir.
2016-04-06 09:14:21 +03:00
Benjamin Herr
c59ea491ea
librustc_trans: use bug!(), span_bug!()
2016-03-31 22:06:52 +02:00
Eduard Burtescu
035a645e64
rustc_trans: move the contents of the trans module to top-level.
2016-03-27 01:23:28 +02:00