about summary refs log tree commit diff
path: root/src/librustc_trans
AgeCommit message (Collapse)AuthorLines
2018-04-29musl: don't use the included startfiles with -crt-staticJohannes Nixdorf-0/+16
This fixes #36710 with -crt-static.
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
2018-04-23make rustdoc test follow the jobserver limit of threadsfix that to many ↵Andreas Jonson-8/+1
threads is executing at the same timewhen rustdoc test is executed.
2018-04-22Remove unused AllocatorTy::BangSteven Fackler-2/+0
2018-04-21rustc: Always emit `uwtable` on AndroidAlex Crichton-1/+1
Long ago (#40549) we enabled the `uwtable` attribute on Windows by default (even with `-C panic=abort`) to allow unwinding binaries for [stack unwinding information][winstack]. It looks like this same issue is [plaguing][arm1] Gecko's Android platforms [as well][arm2]. This commit applies the same fix as #40549 except that this time it's applied for all Android targets. Generating a `-C panic=abort` binary for `armv7-linux-androideabi` before this commit generated a number of `cantunwind` functions (detected with `readelf -u`) but after this commit they all list appropriate unwind information. Closes #49867 [winstack]: https://bugzilla.mozilla.org/show_bug.cgi?id=1302078 [arm1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1453220 [arm2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1451741
2018-04-21Remove hack around comparisons of i1 values (fixes #40980)Anthony Ramine-10/+0
The regression test still passes without that 2 years old hack. The underlying LLVM bug has probably been fixed upstream since then.
2018-04-19wasm: Increase default stack size to 1MBAlex Crichton-0/+1
This commit increases the dfeault stack size allocated to the wasm32-unknown-unknown target to 1MB by default. Currently the default stack size is one wasm page, or 64 kilobytes. This default stack is quite small and has caused a stack overflow or two in the wild by accident. The current "best practice" for fixing this is to pass `-Clink-args='-z stack-size=$bigger'` but that's not great nor always easy to do. A default of 1MB matches more closely with other platforms where it's "pretty big" by default. Note that it was tested and if the users uses `-C link-args` to pass a custom stack size that's still resepected as lld seems to take the first argument, and where rustc is passing it will always be last.
2018-04-18rustc_trans: also check dominators for SSA values in mir::analyze.Eduard-Mihai Burtescu-27/+60
Fixes #50041
2018-04-17Clean up attribute handling in create_function_debug_context().Michael Woerister-4/+5
2018-04-17Support #[no_debug] for global variables.Michael Woerister-3/+10
2018-04-17Auto merge of #49664 - alexcrichton:stable-simd, r=BurntSushibors-31/+96
Stabilize x86/x86_64 SIMD This commit stabilizes the SIMD in Rust for the x86/x86_64 platforms. Notably this commit is stabilizing: * The `std::arch::{x86, x86_64}` modules and the intrinsics contained inside. * The `is_x86_feature_detected!` macro in the standard library * The `#[target_feature(enable = "...")]` attribute * The `#[cfg(target_feature = "...")]` matcher Stabilization of the module and intrinsics were primarily done in rust-lang-nursery/stdsimd#414 and the two attribute stabilizations are done in this commit. The standard library is also tweaked a bit with the new way that stdsimd is integrated. Note that other architectures like `std::arch::arm` are not stabilized as part of this commit, they will likely stabilize in the future after they've been implemented and fleshed out. Similarly the `std::simd` module is also not being stabilized in this commit, only `std::arch`. Finally, nothing related to `__m64` is stabilized in this commit either (MMX), only SSE and up types and intrinsics are stabilized. Closes #29717 Closes #44839 Closes #48556
2018-04-16Separately gate each target_feature featureAlex Crichton-31/+96
Use an explicit whitelist for what features are actually stable and can be enabled.
2018-04-17Remove `underscore_lifetimes` and `match_default_bindings` from active ↵kennytm-1/+0
feature list These are already stabilized in 1.26.
2018-04-15Only warn on erroneous promoted constantsOliver Schneider-1/+8
2018-04-15Auto merge of #49833 - oli-obk:incremental_miri_regression, r=michaelwoeristerbors-8/+7
Don't recurse into allocations, use a global table instead r? @michaelwoerister fixes #49663
2018-04-14Auto merge of #49289 - varkor:emit-metadata-without-link, r=michaelwoeristerbors-2/+3
Make --emit=metadata output metadata regardless of link Fixes #40109. I'm not sure whether this condition was important here or not, but I can't see why it is required (removing it doesn't cause the error the comment warns about, so I'm assuming it's safe). If this is too heavy-handed, I can special-case on `OutputType::Metadata`. r? @nrc
2018-04-14Stop referring to statics' AllocIds directlyOliver Schneider-8/+7
2018-04-12Restore Global.oom() functionalitySimon Sapin-0/+2
… now that #[global_allocator] does not define a symbol for it
2018-04-12Use the GlobalAlloc trait for #[global_allocator]Simon Sapin-25/+3
2018-04-12Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoeristerbors-20/+23
Even more thread-safety changes r? @michaelwoerister
2018-04-12Rollup merge of #49857 - Amanieu:aarch64_fp, r=alexcrichtonkennytm-0/+1
Fix "fp" target feature for AArch64 This fixes the following warning on AArch64: ``` '+fp' is not a recognized feature for this target (ignoring feature) ``` Fixes #49782
2018-04-11Rollup merge of #49525 - varkor:sort_by_cached_key-conversion, r=scottmcmkennytm-2/+4
Use sort_by_cached_key where appropriate A follow-up to https://github.com/rust-lang/rust/pull/48639, converting various slice sorting calls to `sort_by_cached_key` when the key functions are more expensive.
2018-04-11Auto merge of #49715 - Mark-Simulacrum:deny-warnings, r=alexcrichtonbors-1/+0
Move deny(warnings) into rustbuild This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-11Auto merge of #49695 - michaelwoerister:unhygienic-ty-min, r=nikomatsakisbors-3/+3
Use InternedString instead of Symbol for type parameter types (2) Reduced alternative to #49266. Let's see if this causes a performance regression.