about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-09-26Auto merge of #64816 - Centril:rollup-gbeqot4, r=Centrilbors-7/+14
Rollup of 5 pull requests Successful merges: - #64221 ( Rust 2015: No longer downgrade NLL errors) - #64772 (Remove tx_to_llvm_workers from TyCtxt) - #64783 (Fix issue #64732) - #64787 (Fix ExitStatus on Fuchsia) - #64812 (Add test for E0543) Failed merges: r? @ghost
2019-09-26Rename `ForeignItem.node` to `ForeignItem.kind`varkor-1/+1
2019-09-26Rename `Item.node` to `Item.kind`varkor-1/+1
2019-09-26Rollup merge of #64772 - Mark-Simulacrum:no-tyctxt-tx, r=eddybMazdak Farrokhzad-7/+14
Remove tx_to_llvm_workers from TyCtxt This can be kept within the codegen backend crates entirely -- there's no reason for us to create it outside and attempt to hold it in the (global) context. Changes here aren't really too easily reviewable I suspect -- not sure if they can be cleaned up by splitting into more commits though, it's just hard to reason about `Box<Any>` in general. If there are thoughts though I'd be happy to hear them. The primary goal of this PR is to get rid of the field on `rustc_interface::Queries`.
2019-09-26Rename some `_sty` variables to `_kind`varkor-4/+4
2019-09-26Rename `subst::Kind` to `subst::GenericArg`varkor-4/+4
2019-09-25Remove tx_to_llvm_workers from TyCtxtMark Rousskov-7/+14
This can be kept within the codegen backend crates entirely
2019-09-25Rename `sty` to `kind`varkor-51/+51
2019-09-17Get rid of special const intrinsic query in favour of `const_eval`Oliver Scherer-23/+13
2019-09-15use println!()Guanqun Lu-3/+3
2019-09-12codegen: be more explicit about setting giving names to allocas.Eduard-Mihai Burtescu-20/+7
2019-09-11Use `Symbol` in `Linker`.Nicholas Nethercote-1/+2
2019-09-07Rollup merge of #64139 - Mark-Simulacrum:strip-legacy-proc-macro, r=petrochenkovMazdak Farrokhzad-9/+2
Migrate internal diagnostic registration to macro_rules Review is best done commit-by-commit. Fixes #64132.
2019-09-06rustc_codegen_llvm: give names to non-alloca variable values.Eduard-Mihai Burtescu-3/+34
2019-09-05Remove rustc_diagnostic_macros featureMark Rousskov-1/+0
2019-09-05Remove codegen dependenciesMark Rousskov-4/+0
Not doing this leads to building two copies of e.g. num_cpus in the sysroot and _llvm deps, leading to conflicts between the two when compiling librustc_codegen_llvm. It's not entirely clear why this is the case after the changes in this PR but likely has something to do with a subtle difference in ordering or similar.
2019-09-05Replace diagnostic plugins with macro_rulesMark Rousskov-4/+2
2019-09-05Rollup merge of #64003 - Dante-Broggi:place-align-in-layout, r=matthewjasperMazdak Farrokhzad-3/+3
place: Passing `align` = `layout.align.abi`, when also passing `layout` Of the calls changed: 7/12 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-09-05Rollup merge of #64141 - nnethercote:minimize-LocalInternedString, ↵Mazdak Farrokhzad-21/+23
r=petrochenkov Minimize uses of `LocalInternedString` `LocalInternedString` is described as "An alternative to `Symbol` and `InternedString`, useful when the chars within the symbol need to be accessed. It is best used for temporary values." This PR makes the code match that comment, by removing all non-local uses of `LocalInternedString`. This allows the removal of a number of operations on `LocalInternedString` and a couple of uses of `unsafe`.
2019-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm`.Nicholas Nethercote-11/+12
2019-09-04Remove `LocalInternedString` uses from `librustc_codegen_llvm/consts.rs`.Nicholas Nethercote-7/+8
2019-09-04Remove `LocalInternedString` uses from `librustc/ty/`.Nicholas Nethercote-4/+4
This is not a compelling change in isolation, but it is a necessary step.
2019-09-02Auto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obkbors-9/+50
Make Allocation::bytes private Fixes #62931. Direct immutable access to the bytes is still possible but redirected through the new method `raw_bytes_with_undef_and_ptr`, similar to `get_bytes_with_undef_and_ptr` but without requiring an interpretation context and not doing *any* relocation or bounds checks. The `size` of the allocation is stored separately which makes access as `Size` and `usize` more ergonomic. cc: @RalfJung
2019-08-30Fixup remaining direct relocation field referencesAndreas Molzer-4/+4
2019-08-29`new_sized` is mostly used without alignDante-Broggi-3/+3
so rename it `new_sized_aligned`. 6/11 use `align` = `layout.align.abi`. `from_const_alloc` uses `alloc.align`, but that is `assert_eq!` to `layout.align.abi`. only 4/11 use something interesting for `align`.
2019-08-29Rollup merge of #63956 - alexcrichton:fix-lto-all-cached, r=michaelwoeristerMazdak Farrokhzad-48/+45
rustc: Handle modules in "fat" LTO more robustly When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes #63349
2019-08-28Address naming and comments from reviewsAndreas Molzer-3/+3
2019-08-27rustc: Handle modules in "fat" LTO more robustlyAlex Crichton-48/+45
When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes #63349
2019-08-25debuginfo: give unique names to closure and generator typesPhilip Craig-3/+7
Closure types have been moved to the namespace where they are defined, and both closure and generator type names now include the disambiguator. This fixes an exception when lldb prints nested closures. Fixes #57822
2019-08-21Fix codegen with explicit allocation byte accessAndreas Molzer-7/+48
2019-08-18Auto merge of #63635 - oli-obk:default-slice-dangles, r=eddybbors-9/+15
Do not generate allocations for zero sized allocations Alternative to https://github.com/rust-lang/rust/issues/62487 r? @eddyb There are other places where we could do this, too, but that would cause `static FOO: () = ();` to not have a unique address
2019-08-17Cast only where necessaryOliver Scherer-4/+5
2019-08-17Remove SyntaxContext from {ast, hir}::{GlobalAsm, InlineAsm}Matthew Jasper-3/+4
We now store it in the `Span` of the expression or item.
2019-08-16Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.Eduard-Mihai Burtescu-4/+4
2019-08-16Do not generate allocations for zero sized allocationsOliver Scherer-8/+13
2019-08-11Auto merge of #63343 - ishitatsuyuki:revert-62150, r=RalfJungbors-1/+1
Back out #62150 Ref: #62825 cc @RalfJung
2019-08-10Revert "Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJung"Tatsuyuki Ishi-1/+1
This reverts commit 1d45156866b54c3fc36edfdfcdd8149ad9cb5711, reversing changes made to 0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.
2019-08-08Explain why we're sorting the modules.Joel Galenson-0/+1
2019-08-08Sort fat LTO modules later and add a test.Joel Galenson-2/+4
2019-08-07Auto merge of #61919 - alexreg:fix-atb-1, r=nikomatsakisbors-7/+7
Fix for "ambiguous associated type" issue with ATBs Fixes #61752. r? @nikomatsakis CC @Centril
2019-08-07Auto merge of #63152 - estebank:big-array, r=oli-obkbors-1/+6
Always error on `SizeOverflow` during mir evaluation Fix #55878, fix #25116. r? @oli-obk
2019-08-06Rollup merge of #63296 - alexcrichton:deduplicate-demangle, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Deduplicate rustc_demangle in librustc_codegen_llvm This commit removes the crates.io dependency of `rustc-demangle` from `rustc_codegen_llvm`. This crate is actually already pulled in to part of the `librustc_driver` build and with the upcoming pipelining implementation in Cargo it causes build issues if `rustc-demangle` is left to its own devices. This is not currently required, but once pipelining is enabled for rustc's own build it will be required to build correctly.
2019-08-05Fiddle param env through to `try_eval_bits` in most placesOliver Scherer-1/+1
2019-08-05Don't abort on unevaluated constants without at least tryting to eval themOliver Scherer-1/+1
2019-08-05A few cosmetic improvements.Alexander Regueiro-7/+7
2019-08-04tweak output and testsEsteban Küber-4/+1
2019-08-04review comments: clean upEsteban Küber-3/+3
2019-08-03Simplify change to layout_ofEsteban Küber-4/+0
2019-08-03Point to local place span on "type too big" errorEsteban Küber-1/+13
2019-08-02assert consistencyRalf Jung-3/+3