about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-03-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-21/+55
2019-03-29Auto merge of #58605 - nagisa:fix-the-metadata, r=michaelwoeristerbors-17/+28
Use informational target machine for metadata Since there is nothing to optimise there... Should fix #58323 but haven’t tested locally. r? @michaelwoerister
2019-03-29Use platform dependent mcount functionYuki OKUSHI-1/+29
2019-03-28Rollup merge of #58717 - hellow554:nonzero_parse, r=oli-obkMazdak Farrokhzad-1/+2
Add FromStr impl for NonZero types This is a WIP implementation because I do have some questions regarding the solution. Somebody should ping the lang team on this I guess. Please see the annotations on the code for more details. Closes #58604
2019-03-28fixed shift overflowMarcel Hellwig-1/+2
Fix according to oli-obk (https://github.com/rust-lang/rust/pull/58717#issuecomment-477494457)
2019-03-28Rollup merge of #57987 - parched:va-args, r=joshtriplettMazdak Farrokhzad-2/+2
Fix some AArch64 typos cc @dlrobertson
2019-03-27Give variant parts their own unique idPhilip Craig-14/+25
and bump llvm version in test
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-17/+28
Since there is nothing to optimise there...
2019-03-25Auto merge of #59242 - euclio:asm-ice, r=nagisabors-2/+2
make asm diagnostic instruction optional `DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so the instruction shouldn't be blindly unwrapped. Reopening from #55193. I was unable to trigger the assertion on Windows after rebasing. Fixes #23458. Fixes #55216.
2019-03-24make asm diagnostic instruction optionalAndy Russell-2/+2
`DiagnosticInfoInlineAsm::getInstruction` may return a null pointer, so the instruction shouldn't be blindly unwrapped.
2019-03-24Rollup merge of #59377 - smaeul:patch/system-llvm, r=nikickennytm-3/+5
Correct minimum system LLVM version in tests Since commit 9452a8dfa3ba, the new debug info format is only generated for LLVM 8 and newer versions. However, the tests still assume that LLVM 7 will use the new debug info format. Fix the tests (and a comment in the code) to match the actual version check.
2019-03-23Fix invalid DWARF for enums when using thinltoPhilip Craig-9/+14
We were setting the same identifier for both the DW_TAG_structure_type and the DW_TAG_variant_part. This becomes a problem when using thinlto becauses it uses the identifier as a key for a map of types that is used to delete duplicates based on the ODR, so one of them is deleted as a duplicate, resulting in invalid DWARF. The DW_TAG_variant_part isn't a standalone type, so it doesn't need an identifier. Fix by omitting its identifier.
2019-03-22Correct minimum system LLVM version in testsSamuel Holland-3/+5
Since commit 9452a8dfa3ba, the new debug info format is only generated for LLVM 8 and newer versions. However, the tests still assume that LLVM 7 will use the new debug info format. Fix the tests (and a comment in the code) to match the actual version check.
2019-03-20Add a -Z time option which prints only passes which runs onceJohn Kåre Alsaker-2/+2
2019-03-19Fix AArch64 typo in commentsJames Duley-2/+2
2019-03-16Rollup merge of #59152 - smmalis37:range_contains, r=SimonSapinkennytm-1/+0
Stabilize Range*::contains. Closes https://github.com/rust-lang/rust/issues/32311. There's also a bit of rustfmt on range.rs thrown in for good measure (I forgot to turn off format-on-save in VSCode).
2019-03-15rustc: tie the 'tcx between Print and PrintCx in ty::print.Eduard-Mihai Burtescu-2/+2
2019-03-15rustc: remove fmt::{Debug,Display} from ty::TyKind.Eduard-Mihai Burtescu-12/+11
2019-03-14Auto merge of #58488 - wesleywiser:llvm_prof, r=michaelwoeristerbors-71/+52
Replace TimeLine LLVM profiling with the self profiler
2019-03-12Stabilize Range*::contains.Steven Malis-1/+0
2019-03-11Fix incorrect links in librustc_codegen_llvm documentationNikita Baksalyar-3/+3
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-71/+52
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-2/+3
2019-03-09Auto merge of #59012 - pietroalbini:rollup, r=pietroalbinibors-2/+2
Rollup of 24 pull requests Successful merges: - #58080 (Add FreeBSD armv6 and armv7 targets) - #58204 (On return type `impl Trait` for block with no expr point at last semi) - #58269 (Add librustc and libsyntax to rust-src distribution.) - #58369 (Make the Entry API of HashMap<K, V> Sync and Send) - #58861 (Expand where negative supertrait specific error is shown) - #58877 (Suggest removal of `&` when borrowing macro and appropriate) - #58883 (Suggest appropriate code for unused field when destructuring pattern) - #58891 (Remove stray ` in the docs for the FromIterator implementation for Option) - #58893 (race condition in thread local storage example) - #58906 (Monomorphize generator field types for debuginfo) - #58911 (Regression test for #58435.) - #58912 (Regression test for #58813) - #58916 (Fix release note problems noticed after merging.) - #58918 (Regression test added for an async ICE.) - #58921 (Add an explicit test for issue #50582) - #58926 (Make the lifetime parameters of tcx consistent.) - #58931 (Elide invalid method receiver error when it contains TyErr) - #58940 (Remove JSBackend from config.toml) - #58950 (Add self to mailmap) - #58961 (On incorrect cfg literal/identifier, point at the right span) - #58963 (libstd: implement Error::source for io::Error) - #58970 (delay_span_bug in wfcheck's ty.lift_to_tcx unwrap) - #58984 (Teach `-Z treat-err-as-bug` to take a number of errors to emit) - #59007 (Add a test for invalid const arguments) Failed merges: - #58959 (Add release notes for PR #56243) r? @ghost
2019-03-08Rollup merge of #58926 - gabi-250:tcx-lifetimes, r=petrochenkovPietro Albini-2/+2
Make the lifetime parameters of tcx consistent. I have implemented `codegen_allocator` for my backend, but I've had to make a small change to its signature in `ExtraBackendMethods`. I wonder if this change is justified, or if it is too specific to my use case to be useful to anyone else. `write_metadata` and `codegen_allocator` are both called from `codegen_crate` (in `librustc_codegen_ssa/base.rs`), and they both receive the same `tcx` as an argument: https://github.com/rust-lang/rust/blob/c196097e588b05e86b5ce6de992b2a6e6a7027bd/src/librustc_codegen_ssa/base.rs#L555-L557 and: https://github.com/rust-lang/rust/blob/c196097e588b05e86b5ce6de992b2a6e6a7027bd/src/librustc_codegen_ssa/base.rs#L640-L642 However, `codegen_allocator` accepts a `TyCtxt` with any lifetime parameters (`tcx: TyCtxt<'_, '_, '_>`), while `write_metadata` requires that the `tcx` argument is of type `TyCtxt<'b, 'gcx, 'gcx>`. In my implementation, I've found that it's necessary for `tcx` in `codegen_allocator` to also have the `<'b, 'gcx, 'gcx>` lifetime parameters. Have I misunderstood the purpose of the parameters of `TyCtxt`? I've read [here](https://rust-lang.github.io/rustc-guide/ty.html) that the last two parameters only need to be distinct if the function needs to be used during type inference, but I don't think that is the case here.
2019-03-07HirIdification: replace NodeId method callsljedrz-2/+2
2019-03-05Use non_erasable_generics for codegenvarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-04Make the lifetime parameters of tcx consistent.Gabriela Alexandra Moldovan-2/+2
2019-03-01Auto merge of #58408 - alexcrichton:update-llvm, r=michaelwoeristerbors-127/+0
rustc: Update LLVM, remove dead wasm code This commit updates the LLVM branch to the rebased version of the upstream release/8.x branch. This includes a wasm patch which means that the `rewrite_imports` pass in rustc is no longer needed (yay!) and we can instead rely on `wasm-import-module`, an attribute we're already emitting, to take care of all the work.
2019-02-27Rename variadic to c_variadicDan Robertson-6/+6
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-27Support defining C compatible variadic functionsDan Robertson-22/+86
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-27rename Substs to InternalSubstscsmoe-5/+5
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-26rustc: Update LLVM, remove dead wasm codeAlex Crichton-127/+0
This commit updates the LLVM branch to the rebased version of the upstream release/8.x branch. This includes a wasm patch which means that the `rewrite_imports` pass in rustc is no longer needed (yay!) and we can instead rely on `wasm-import-module`, an attribute we're already emitting, to take care of all the work.
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-69/+73
2019-02-24Auto merge of #58315 - gnzlbg:returns_twice, r=alexcrichtonbors-0/+4
Implement unstable ffi_return_twice attribute This PR implements [RFC2633](https://github.com/rust-lang/rfcs/pull/2633) r? @eddyb
2019-02-24Auto merge of #58691 - Centril:rollup, r=Centrilbors-1/+1
Rollup of 6 pull requests Successful merges: - #57364 (Improve parsing diagnostic for negative supertrait bounds) - #58183 (Clarify guarantees for `Box` allocation) - #58442 (Simplify the unix `Weak` functionality) - #58454 (Refactor Windows stdio and remove stdin double buffering ) - #58511 (Const to op simplification) - #58642 (rustdoc: support methods on primitives in intra-doc links) Failed merges: r? @ghost
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-1/+1
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-24Auto merge of #58304 - gnzlbg:simd_saturated, r=nagisabors-8/+63
Add generic simd saturated add/sub intrinsics r? @eddyb
2019-02-23Implement ffi_returns_twice attributegnzlbg-0/+4
2019-02-21codegen and write_metadata can mutate ModuleLLvm.Gabriela Alexandra Moldovan-2/+2
2019-02-20Allow Self::Module to be mutated.Gabriela Alexandra Moldovan-2/+2
`codegen_allocator` and `write_metadata` mutate the underlying LLVM module. As such, it makes sense for these two functions to receive a mutable reference to the module (as opposed to an immutable one).
2019-02-20Rollup merge of #58562 - dlrobertson:fix_nits, r=alexregkennytm-5/+2
Fix style nits Fix style nits discovered in reading code. r? @alexreg
2019-02-18Fix style nitsDan Robertson-5/+2
Fix style nits discovered in reading code.
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-199/+190
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-1/+1
2019-02-16Rollup merge of #58440 - gnzlbg:v6, r=japarickennytm-0/+2
Whitelist the ARM v6 target-feature
2019-02-16Rollup merge of #58074 - scottmcm:stabilize-sort_by_cached_key, r=SimonSapinkennytm-1/+0
Stabilize slice_sort_by_cached_key I was going to ask on the tracking issue (https://github.com/rust-lang/rust/issues/34447), but decided to just send this and hope for an FCP here. The method was added last March by https://github.com/rust-lang/rust/pull/48639. Signature: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key ```rust impl [T] { pub fn sort_by_cached_key<K, F>(&mut self, f: F) where F: FnMut(&T) -> K, K: Ord; } ``` That's an identical signature to the existing `sort_by_key`, so I think the questions are just naming, implementation, and the usual "do we want this?". The implementation seems to have proven its use in rustc at least, which many uses: https://github.com/rust-lang/rust/search?l=Rust&q=sort_by_cached_key (I'm asking because it's exactly what I just needed the other day: ```rust all_positions.sort_by_cached_key(|&n| data::CITIES.iter() .map(|x| *metric_closure.get_edge(n, x.pos).unwrap()) .sum::<usize>() ); ``` since caching that key is a pretty obviously good idea.) Closes #34447
2019-02-14Whitelist the ARM v8 target-featuregnzlbg-0/+1
2019-02-14Rollup merge of #58378 - alexcrichton:incremental-lto, r=michaelwoeristerMazdak Farrokhzad-44/+137
rustc: Implement incremental "fat" LTO Currently the compiler will produce an error if both incremental compilation and full fat LTO is requested. With recent changes and the advent of incremental ThinLTO, however, all the hard work is already done for us and it's actually not too bad to remove this error! This commit updates the codegen backend to allow incremental full fat LTO. The semantics are that the input modules to LTO are all produce incrementally, but the final LTO step is always done unconditionally regardless of whether the inputs changed or not. The only real incremental win we could have here is if zero of the input modules changed, but that's so rare it's unlikely to be worthwhile to implement such a code path. cc #57968 cc rust-lang/cargo#6643
2019-02-14Rollup merge of #58308 - gnzlbg:context_insert_intr, r=eddybMazdak Farrokhzad-12/+17
Extract block to insert an intrinsic into its own function r? @eddyb