about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2018-06-03Rollup merge of #51323 - nikic:switch-int-lowering, r=nagisaMark Simulacrum-5/+14
Generate br for all two target SwitchInts Instead of only for booleans. This means that `if let` also becomes a br. Apart from making the IR slightly simpler, this is supported by FastISel (#4353).
2018-06-02Generate br for all two target SwitchIntsNikita Popov-5/+14
Instead of only for booleans. This means that if let also becomes a br. Apart from making the IR slightly simpler, this is supported by FastISel.
2018-06-02Auto merge of #51063 - mixi:musl-bootstrap, r=alexcrichtonbors-0/+16
Fix building rustc on and for musl hosts. This fixes all problems I had when trying to compile rustc on a musl-based distribution (with `crt-static = false` in `config.toml`). This is a fixed version of what ended up being #50105, making it possible to compile rustc on musl targets. The differences to the old (now merged and subsequently reverted) pull request are: - The commit (6d9154a830dd9773fe8a4e34e1fc3dfb1ca6f935) that caused the regression for which the original commits were reverted in #50709 is left out. This means the corresponding bug #36710 is still not fixed with `+crt-static`. - The test for issue 36710 is skipped for musl targets (until the issue is properly fixed). - Building cargo-vendor if `crt-static = false` is needed was broken (cargo-vendor links to some shared libraries if they exist on the system and this produces broken binaries with `+crt-static`) CC @alexcrichton
2018-05-31musl: don't use the included startfiles with -crt-staticJohannes Nixdorf-0/+16
This fixes (only for -crt-static) #36710.
2018-05-30rustc: rename mir::LocalDecl's syntactic_source_info to source_info.Eduard-Mihai Burtescu-1/+1
2018-05-30rustc: turn mir::LocalDecl's visibility_source_info into a SourceScope.Eduard-Mihai Burtescu-3/+6
2018-05-30rustc: rename mir::LocalDecl's source_info to visibility_source_info.Eduard-Mihai Burtescu-3/+3
2018-05-30rustc: rename mir::VisibilityScope to mir::SourceScope.Eduard-Mihai Burtescu-14/+14
2018-05-29rust-lang/rust#27282: Add `StatementKind::ReadForMatch` to MIR.Felix S. Klock II-0/+1
(This is just the data structure changes and some boilerplate match code that followed from it; the actual emission of these statements comes in a follow-up commit.)
2018-05-29Auto merge of #50475 - csmoe:debr, r=nikomatsakisbors-1/+1
Refactor DebruijnIndex to be 0-based Fixes #49813
2018-05-28stop invoking `DebruijnIndex::new` directlyNiko Matsakis-1/+1
Co-authored-by: csmoe <35686186+csmoe@users.noreply.github.com>
2018-05-28Auto merge of #50521 - gnzlbg:simd_float, r=alexcrichtonbors-0/+470
Add simd math intrinsics and gather/scatter This PR adds simd math intrinsics for floating-point vectors (sqrt, sin, cos, pow, exp, log, fma, abs, etc.) and the generic simd gather/scatter intrinsics.
2018-05-26Auto merge of #51072 - petrochenkov:ifield, r=eddybbors-3/+3
Use `Ident`s for fields in HIR Continuation of https://github.com/rust-lang/rust/pull/49718, part of https://github.com/rust-lang/rust/issues/49300
2018-05-26Use `Ident`s for fields in HIRVadim Petrochenkov-3/+3
2018-05-26Auto merge of #51041 - alexcrichton:better-unwind, r=nikomatsakisbors-16/+24
std: Ensure OOM is classified as `nounwind` OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
2018-05-26Auto merge of #51035 - oli-obk:unsupported_crate_type, r=eddybbors-1/+1
Don't ICE if crate has no valid crate types left fixes #50993
2018-05-24std: Ensure OOM is classified as `nounwind`Alex Crichton-16/+24
OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
2018-05-24Revert "Ensure llvm doesn't trigger an assert for crazy transmutes"Oliver Schneider-2/+5
This reverts commit 776c632e2a9a044fd134321a9d561e28994ff3ff.
2018-05-24Ensure llvm doesn't trigger an assert for crazy transmutesOliver Schneider-5/+2
2018-05-24Replace `ScalarKind` with `Primitive`Oliver Schneider-2/+3
2018-05-24primval -> scalar renameOliver Schneider-8/+8
2018-05-24change `Value::Bytes` to `Value::Bits`Oliver Schneider-4/+6
2018-05-24Rename MemoryPointer to PointerOliver Schneider-2/+2
2018-05-24Eliminate the `Pointer` wrapper typeOliver Schneider-1/+1
2018-05-24Differentiate between interpret::Scalar and layout::ScalarOliver Schneider-6/+6
2018-05-24Rename ByVal(Pair) to Scalar(Pair)Oliver Schneider-3/+3
2018-05-24Rename PrimVal to ScalarOliver Schneider-6/+6
2018-05-24Add constant for `Size::from_bytes(0)`Oliver Schneider-12/+12
2018-05-24Don't ICE if crate has no valid crate types leftOliver Schneider-1/+1
2018-05-24refactorgnzlbg-60/+30
2018-05-24enable fast-math flagsgnzlbg-3/+5
2018-05-24fix tidygnzlbg-6/+16
2018-05-24add simd float intrinsics and gather/scattergnzlbg-0/+488
2018-05-24Auto merge of #51023 - kennytm:rollup, r=kennytmbors-2/+6
Rollup of 9 pull requests Successful merges: - #50864 (Add NetBSD/arm target specs) - #50956 (rust-gdb: work around the re-used -d argument in cgdb) - #50964 (Make sure that queries have predictable symbol names.) - #50965 (Update LLVM to pull in another wasm fix) - #50972 (Add -Z no-parallel-llvm flag) - #50979 (Fix span for type-only arguments) - #50981 (Shrink `LiveNode`.) - #50995 (move type out of unsafe block) - #51011 ( rustdoc: hide macro export statements from docs) Failed merges:
2018-05-24Auto merge of #50949 - eddyb:debuginfo, r=mwbors-33/+5
rustc_codegen_llvm: remove some debuginfo cruft. (The second commit passes tests locally but might not on older LLVM versions) r? @nikomatsakis
2018-05-24Rollup merge of #50972 - nikic:no-parallel, r=michaelwoeristerkennytm-2/+6
Add -Z no-parallel-llvm flag Codegen issues commonly only manifest under specific circumstances, e.g. if multiple codegen units are used and ThinLTO is enabled. However, these configuration are threaded, making the use of LLVM debugging facilities hard, as output is interleaved. This patch adds a -Z no-parallel-llvm flag, which allows disabling parallelization of codegen and linking, while otherwise preserving behavior with regard to codegen units and LTO.
2018-05-22Add -Z no-parallel-llvm flagNikita Popov-2/+6
Codegen issues commonly only manifest under specific circumstances, e.g. if multiple codegen units are used and ThinLTO is enabled. However, these configuration are threaded, making the use of LLVM debugging facilities hard, as output is interleaved. This patch adds a -Z no-parallel-llvm flag, which allows disabling parallelization of codegen and linking, while otherwise preserving behavior with regard to codegen units and LTO.
2018-05-22Use SortedMap instead of BTreeMap for relocations in MIRI.Michael Woerister-1/+1
2018-05-22Introduce AllocType which indicates what AllocIds point toJohn Kåre Alsaker-26/+22
2018-05-21rustc_codegen_llvm: remove closure env alloca hack around upvar debuginfo.Eduard-Mihai Burtescu-22/+2
2018-05-21rustc_codegen_llvm: remove debuginfo::VariableKind::CapturedVariable.Eduard-Mihai Burtescu-11/+3
2018-05-21rustc: use intern_* instead of mk_* where possible.Eduard-Mihai Burtescu-2/+4
2018-05-21rustc: don't call Kind::from directly, use .into() instead.Eduard-Mihai Burtescu-2/+1
2018-05-20Auto merge of #50841 - oli-obk:promote_errors_to_panics, r=eddybbors-2/+2
Don't lint numeric overflows in promoteds in release mode r? @eddyb mitigates #50814
2018-05-20Auto merge of #50803 - varkor:never-transmute-never, r=eddybbors-3/+14
Fix an ICE when attempting to transmute an uninhabited type Fixes https://github.com/rust-lang/rust/issues/50570.
2018-05-19Auto merge of #50893 - kennytm:rollup, r=kennytmbors-8/+17
Rollup of 8 pull requests Successful merges: - #50531 (Cleanup uses of TypeIdHasher and replace them with StableHasher) - #50819 (Fix potential divide by zero) - #50827 (Update LLVM to 56c931901cfb85cd6f7ed44c7d7520a8de1edf97) - #50829 (CheckLoopVisitor: also visit break expressions) - #50854 (in which the unused shorthand field pattern debacle/saga continues) - #50858 (Reorder description for snippets in rustdoc documentation) - #50883 (Fix warning when building stage0 libcore) - #50889 (Update clippy) Failed merges:
2018-05-20Rollup merge of #50819 - cjkenn:cjkenn/div-by-zero, r=kennytmkennytm-2/+6
Fix potential divide by zero This should fix #50761 I had trouble reproducing with the provided code, but looking at the stack trace would indicate that this code is the likely cause. I made a number of assumptions here, because I don't have enough context on how the register size is set: 1. I assumed `rest.unit.size.bytes()` can be 0, and it's ok if it's set to 0 before this function is called 2. I assumed that if `rest.unit.size.bytes()` is 0, that we want `rest_count` to also be 0.
2018-05-19use if let to avoid potential div by zerocjkenn-2/+6
remove semicolon -_- Add rem_bytes to conditional to avoid error when performing mod by 0 Add test file to confirm compilation passes. Ensure we don't divide or mod by zero in llvm_type. Include test file from issue.
2018-05-19Rollup merge of #50531 - iancormac84:merge-typeidhasher-cleanup, ↵kennytm-6/+11
r=michaelwoerister Cleanup uses of TypeIdHasher and replace them with StableHasher Fixes #50424 r? @michaelwoerister
2018-05-19Use `Size` instead of `u64` in mir interpretationOliver Schneider-5/+6