summary refs log tree commit diff
path: root/src/librustc_trans
AgeCommit message (Collapse)AuthorLines
2015-10-01trans: Fix __imp_ creation for i686 MSVCAlex Crichton-3/+13
Turns out the symbol names are slightly different on 32-bit than on 64, so the prefix needs to be tweaked just a bit!
2015-10-01Removed unused parameter.Vadim Chugunov-5/+3
2015-10-01Fix dllimports of static data from rlibsVadim Chugunov-31/+69
2015-09-15Auto merge of #28413 - arielb1:deduplication, r=eddybbors-161/+13
clean a few things discovered during my split_ty work r? @eddyb
2015-09-15Auto merge of #28274 - arielb1:split-ty, r=nikomatsakisbors-15/+17
That file got way too big for its own good. It could be split more - this is just a start. r? @nikomatsakis
2015-09-15deduplicate erase_regionsAriel Ben-Yehuda-161/+13
there is no need for 3 versions of the function
2015-09-14split ty::util and ty::adjustmentAriel Ben-Yehuda-5/+8
2015-09-14Auto merge of #28358 - dotdash:nounwind, r=alexcrichtonbors-11/+9
This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/
2015-09-14Mark all extern functions as nounwindBjörn Steinbrink-0/+1
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
2015-09-14move middle::ty and related modules to middle/ty/Ariel Ben-Yehuda-10/+9
2015-09-13Add an attribute to mark function as unwindingBjörn Steinbrink-1/+2
2015-09-13Centralise the handling of attributes on extern functionsBjörn Steinbrink-10/+6
2015-09-11std: Stabilize/deprecate features for 1.4Alex Crichton-1/+0
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
2015-09-10Auto merge of #28282 - DiamondLovesYou:optional-data-layout, r=alexcrichtonbors-3/+2
NFC.
2015-09-09Refactor `TargetOptions::data_layout` into an `Option`al value to reflect ↵Richard Diamond-3/+2
current usage. NFC.
2015-09-09Auto merge of #28277 - DiamondLovesYou:intrinsic-unnamed-addr, r=huonwbors-0/+2
Intrinsics never have an address, so it doesn't make sense to say that their address is unnamed.
2015-09-06Don't add unnamed address attributes to intrinsics.Richard Diamond-0/+2
Intrinsics never have an address, so it doesn't make sense to say that their address is unnamed.
2015-09-06Auto merge of #28270 - arielb1:raw-fat-ops, r=nrcbors-40/+93
r? @nrc Fixes #17736 Fixes #18829 Fixes #23888 Fixes #28236
2015-09-06implement raw fat pointer opsAriel Ben-Yehuda-40/+93
2015-09-06track, for each upvar, its index in list of upvarsNiko Matsakis-4/+4
2015-09-05Auto merge of #28221 - huonw:simd, r=alexcrichtonbors-6/+47
The ARM equivalents of the AArch64 are annoyingly more complicated (and some of the AArch64 ones are too). I think I've got exposed all the x86 intrinsics from SSE to AVX2 now (at least, the ones that LLVM implements as callable intrinsics).
2015-09-05fixupNick Cameron-1/+2
2015-09-05rustfmt librustc_trans/saveNick Cameron-177/+118
2015-09-04Support return aggregates in platform intrinsics.Huon Wilson-2/+21
This also involved adding `[TYPE;N]` syntax and aggregate indexing support to the generator script: it's the only way to be able to have a parameterised intrinsic that returns an aggregate, since one can't refer to previous elements of the current aggregate (and that was harder to implement).
2015-09-04Support bitcasts in platform intrinsic generator.Huon Wilson-1/+9
2015-09-04Support void in platform intrinsic generator.Huon Wilson-0/+1
2015-09-04Add support for pointers to generator.py.Huon Wilson-3/+16
2015-09-04Auto merge of #28201 - apasel422:issue-26205, r=nikomatsakisbors-6/+8
Closes #26205. r? @eddyb
2015-09-04Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichtonbors-2/+2
r? @alexcrichton
2015-09-03Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakisSteve Klabnik-2/+2
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03Fix multiple mutable autoderefs with `Box`Andrew Paseltiner-6/+8
Closes #26205.
2015-09-03Use consistent terminology for byte string literalsVadim Petrochenkov-2/+2
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03Use `null()`/`null_mut()` instead of `0 as *const T`/`0 as *mut T`Vadim Petrochenkov-10/+12
2015-09-03Use proper span for break and continue labelsSimonas Kazlauskas-2/+2
Fixes #28109
2015-09-03Add an intital HIR and lowering stepNick Cameron-757/+759
2015-08-31Remove some SIMD codepaths from trans.Huon Wilson-43/+9
2015-08-31Auto merge of #28079 - huonw:simd, r=alexcrichtonbors-10/+91
This adds a new Python script (compatible with 2.7 and 3.x) that will consume some JSON files that define a platform's intrinsics. It can output a file that defines the intrinsics in the compiler, or an `extern` block that will import them. The complexity of the generator is to be DRY: platforms (especially ARM and AArch64) have a lot of repetition with their intrinsics, for different versions with different types, so being able to write it once is nice.
2015-08-31Translate constructor arguments for zero-sized tuple structsJames Miller-0/+11
This was preventing any side-effects from the expressions from happening. Fixes #28114
2015-08-30Make a macro a const fn and remove outdated NBTobias Bucher-12/+9
2015-08-29Support different scalar integer widths in Rust v. LLVM.Huon Wilson-18/+29
Some x86 C intrinsics are declared to take `int ...` (i.e. exposed in Rust as `i32`), but LLVM implements them by taking `i8` instead.
2015-08-29Add support for aggregates in platform intrinsics.Huon Wilson-10/+80
This adds support for flattened intrinsics, which are called in Rust with tuples but in LLVM without them (e.g. `foo((a, b))` becomes `foo(a, b)`). Unflattened ones could be supported, but are not yet.
2015-08-29Separate integers into signed and unsigned.Huon Wilson-1/+1
This is necessary to reflect the ARM APIs accurately, since some functions explicitly take an unsigned parameter and a signed one, of the same integer shape, so the no-duplicates check will fail unless we distinguish.
2015-08-27Auto merge of #27999 - dotdash:lt, r=eddybbors-68/+72
The major change here is in the tiny commit at the end and makes it so that we no longer emit lifetime intrinsics for allocas for function arguments. They are live for the whole function anyway, so the intrinsics add no value. This makes the resulting IR more clear, and reduces the peak memory usage and LLVM times by about 1-4%, depending on the crate. The remaining changes are just preparatory cleanups and fixes for missing lifetime intrinsics.
2015-08-27Auto merge of #28020 - dotdash:ref_fat_ptr_be_gone, r=eddybbors-8/+1
r? @eddyb -- we talked about this on IRC a while back but I only now managed to get the change done.
2015-08-26Avoid an extra alloca/memcpy when auto-ref'ing fat pointersBjörn Steinbrink-8/+1
auto_ref() handles fat pointers just fine and unlike ref_fat_ptr() does so without creating an unnecessary copy of the pointer.
2015-08-25move destructors_for_type into AdtDefAriel Ben-Yehuda-8/+7
2015-08-25handle dtors having generics in an order different from their ADTAriel Ben-Yehuda-76/+44
Fixes #27997.
2015-08-25Omit lifetime intrinsics for function arguments and similar top-level itemsBjörn Steinbrink-3/+6
Function arguments are live for the whole function scope, so adding lifetime intrinsics around them adds no value. The same is true for drop hint allocas and everything else that goes directly through lvalue_scratch_datum. So the easiest fix is to emit lifetime intrinsics only for lvalue datums that are created in to_lvalue_datum_in_scope(). The reduces peak memory usage and LLVM times by about 1-4%, depending on the crate.
2015-08-25Prefer alloc_ty() instead of alloca() where possibleBjörn Steinbrink-20/+9
2015-08-25Add missing lifetime intrinsics in a few placesBjörn Steinbrink-3/+9