summary refs log tree commit diff
path: root/src/librustc_trans
AgeCommit message (Collapse)AuthorLines
2018-05-21Stabilise inclusive_range_methodsvarkor-1/+0
2018-05-14Introduce OperandValue::nontemporal_store and use it in the intrinsicsAnthony Ramine-78/+64
We use a new MemFlags bitflags type to merge some store code paths.
2018-05-14Introduce OperandValue::volatile_store and use it in the intrinsicsAnthony Ramine-28/+35
Fixes #50371.
2018-05-13rustc: leave space for fields of uninhabited types to allow partial ↵Eduard-Mihai Burtescu-7/+4
initialization.
2018-05-07Auto merge of #50000 - michaelwoerister:cross-lang-lto, r=alexcrichtonbors-3/+13
Add some groundwork for cross-language LTO. Implements part of #49879: - Adds a `-Z cross-lang-lto` flag to rustc - Makes sure that bitcode is embedded in object files if the flag is set. This should already allow for using cross language LTO for staticlibs (where one has to invoke the linker manually anyway). However, `rustc` will not try to enable LTO for its own linker invocations yet. r? @alexcrichton
2018-05-06issue-49938: Reference tagged unions discr(iminant) as tagSamuel Wilson-4/+4
Refer https://github.com/rust-lang/rust/issues/49938 Previously tagged unions' tag was refered to as a discr(iminant). Here the changes use tag instead which is the correct terminology when refering to the memory representation of tagged unions.
2018-05-03Don't run LTO passes in rustc when cross-lang LTO is enabled.Michael Woerister-0/+4
2018-05-03Use correct section name for embedded LLVM bitcode on OSX.Michael Woerister-2/+6
2018-05-03Add -Z cross-lang-lto flag in order to support linker-based LTO.Michael Woerister-1/+2
2018-05-03Declare embedded LLVM bitcode section readonly.Michael Woerister-0/+1
2018-05-02Auto merge of #50278 - eddyb:mir-succ-iter, r=nikomatsakisbors-1/+1
rustc: return iterators from Terminator(Kind)::successors(_mut). Minor cleanup (and potentially speedup) prompted by @nnethercote's `SmallVec` experiments. This PR assumes `.count()` and `.nth(i)` on `iter::Chain<option::IntoIter, slice::Iter(Mut)>` are `O(1)`, but otherwise all of the uses appear to immediately iterate through the successors. r? @nikomatsakis
2018-05-01Auto merge of #50198 - oli-obk:const_prop, r=eddybbors-28/+9
Remove some unused code
2018-05-01rustc: return impl Iterator from Terminator(Kind)::successors(_mut).Eduard-Mihai Burtescu-1/+1
2018-05-01Auto merge of #49724 - kennytm:range-inc-start-end-methods, r=Kimundibors-12/+12
Introduce RangeInclusive::{new, start, end} methods and make the fields private. cc #49022
2018-05-01Auto merge of #48786 - nagisa:fp, r=nikomatsakisbors-2/+0
Add force-frame-pointer flag to allow control of frame pointer ommision Rebase of #47152 plus some changes suggested by https://github.com/rust-lang/rust/issues/48785. Fixes #11906 r? @nikomatsakis
2018-05-01Don't force-enable frame pointers when generating debug infoBjörn Steinbrink-2/+0
We apparently used to generate bad/incomplete debug info causing debuggers not to find symbols of stack allocated variables. This was somehow worked around by having frame pointers. With the current codegen, this seems no longer necessary, so we can remove the code that force-enables frame pointers whenever debug info is requested. Since certain situations, like profiling code profit from having frame pointers, we add a -Cforce-frame-pointers flag to always enable frame pointers. Fixes #11906
2018-05-01Auto merge of #50304 - nox:uninhabited-output, r=eddybbors-3/+3
Mark functions returning uninhabited types as noreturn
2018-05-01Removed direct field usage of RangeInclusive in rustc itself.kennytm-11/+11
2018-04-30Unify MIR assert messages and const eval errorsOliver Schneider-24/+5
2018-04-30Merge ConstMathError into EvalErrorKindOliver Schneider-3/+2
2018-04-30Remove the `rustc_const_math` crateOliver Schneider-4/+2
2018-04-30Remove ConstFloatOliver Schneider-1/+4
2018-04-30Make the fields of RangeInclusive private.kennytm-1/+1
Added new()/start()/end() methods to RangeInclusive. Changed the lowering of `..=` to use RangeInclusive::new().
2018-04-28Add `-C target-feature` to all functionsAlex Crichton-33/+28
Previously the features specified to LLVM via `-C target-feature` were only reflected in the `TargetMachine` but this change *also* reflects these and the base features inside each function itself. This change matches clang and... Closes rust-lang-nursery/stdsimd#427
2018-04-28Mark functions returning uninhabited types as noreturnAnthony Ramine-3/+3
2018-04-28Auto merge of #50164 - nox:rval-range-metadata, r=eddybbors-20/+30
Emit range metadata on calls returning scalars (fixes #50157)
2018-04-27Auto merge of #50290 - kennytm:rollup, r=kennytmbors-1/+9
Rollup of 9 pull requests Successful merges: - #49858 (std: Mark `ptr::Unique` with `#[doc(hidden)]`) - #49968 (Stabilize dyn trait) - #50192 (Add some utilities to `libsyntax`) - #50251 (rustc: Disable threads in LLD for wasm) - #50263 (rustc: Emit `uwtable` for allocator shims) - #50269 (Update `parking_lot` dependencies) - #50273 (Allow #[inline] on closures) - #50284 (fix search load page failure) - #50257 (Don't ICE on tuple struct ctor with incorrect arg count) Failed merges:
2018-04-28Rollup merge of #50263 - alexcrichton:uwtable-allcoators, r=eddybkennytm-0/+4
rustc: Emit `uwtable` for allocator shims This commit emits the `uwtable` attribute to LLVM for platforms that require it for the allocator shims that we generate to ensure that they can hopefully get unwound past. This is a stab in the dark at helping https://bugzilla.mozilla.org/show_bug.cgi?id=1456150 along.
2018-04-28Rollup merge of #50251 - alexcrichton:wasm-no-threads, r=eddybkennytm-1/+5
rustc: Disable threads in LLD for wasm Upstream bug reports (rustwasm/wasm-bindgen#119) show that this may be the culprit of odd crashes/hangs. The linker is a tiny fraction of build time anyway right now so let's disable it and figure out how to possibly reenable it later if necessary.
2018-04-27Auto merge of #50137 - nox:rm-bool-cmp-hack, r=eddybbors-10/+0
Remove hack around comparisons of i1 values (fixes #40980) The regression test still passes without that 2 years old hack. The underlying LLVM bug has probably been fixed upstream since then.
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-18/+18
InternedString
2018-04-26rustc: Emit `uwtable` for allocator shimsAlex Crichton-0/+4
This commit emits the `uwtable` attribute to LLVM for platforms that require it for the allocator shims that we generate to ensure that they can hopefully get unwound past. This is a stab in the dark at helping https://bugzilla.mozilla.org/show_bug.cgi?id=1456150 along.
2018-04-26Emit range metadata on calls returning scalars (fixes #50157)Anthony Ramine-20/+30
2018-04-26Auto merge of #49513 - nox:univariant-fieldless-enum-as-zst, r=eddybbors-7/+37
Treat repr(Rust) univariant fieldless enums as ZSTs This makes all those enums be represented the same way: ```rust enum A1 { B1 } enum A2 { B2 = 0 } enum A3 { B3, C3(!) } ``` Related to #15747. Cc @rust-lang/wg-codegen @rust-lang/lang
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-2/+2
2018-04-26Treat repr(Rust) univariant fieldless enums as a ZST (fixes #15747)Anthony Ramine-1/+20
This makes all those enums be represented the same way: ```rust enum A1 { B1 } enum A2 { B2 = 0 } enum A3 { B3, C3(!) } ```
2018-04-26rustc: Disable threads in LLD for wasmAlex Crichton-1/+5
Upstream bug reports (rustwasm/wasm-bindgen#119) show that this may be the culprit of odd crashes/hangs. The linker is a tiny fraction of build time anyway right now so let's disable it and figure out how to possibly reenable it later if necessary.
2018-04-26rustc_target: move in cabi_* from rustc_trans.Irina Popa-2004/+88
2018-04-26rustc_trans: generalize cabi_* to any context type.Irina Popa-175/+290
2018-04-26rustc_target: move LayoutOf's type parameter to an associated type.Irina Popa-1/+2
2018-04-26rustc_target: move in type definitions from rustc_trans::abi.Irina Popa-207/+21
2018-04-26rustc_target: move in type definitions from ty::layout.Irina Popa-1/+1
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-13/+12
2018-04-26rustc_back: move LinkerFlavor, PanicStrategy, and RelroLevel to target.Irina Popa-7/+6
2018-04-26Consistently use C_uint_big for discriminantsAnthony Ramine-4/+6
2018-04-26Properly look for uninhabitedness when handling discriminantsAnthony Ramine-3/+12
2018-04-25Auto merge of #50016 - tmandry:cleanup-binder, r=nikomatsakisbors-3/+3
Make Binder's field private and clean up its usage AKA "tour de rustc" Closes #49814.
2018-04-25Auto merge of #50134 - andjo403:jobserver, r=michaelwoeristerbors-8/+1
make rustdoc test follow the jobserver limit of threads fix that to many threads is executing at the same time when rustdoc test is executed.
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-3/+3
2018-04-23Auto merge of #49779 - oli-obk:const_err_regression, r=eddybbors-1/+8
Don't report compile-time errors for promoteds Fixes the regression part of #49760, the missing warnings still are missing r? @eddyb