about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-07-31Deduplicate rustc_demangle in librustc_codegen_llvmAlex Crichton-0/+1
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-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-2/+1
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-0/+1
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-04Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, ↵Mazdak Farrokhzad-0/+1
r=dtolnay,Centril Use mem::take instead of mem::replace with default
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-22Deny explicit_outlives_requirements in the compilerMatthew Jasper-1/+0
2019-06-18rustc: remove unused lifetimes.Eduard-Mihai Burtescu-1/+1
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-5/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-9/+9
2019-06-12rustc_codegen_llvm: `deny(internal)`.Eduard-Mihai Burtescu-0/+1
2019-06-12rustc_codegen_llvm: `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-3/+4
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-7/+7
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-02remove unneeded depsMark Mansi-1/+0
2019-06-02move codegenunitext to rustc::mir::monoMark Mansi-1/+0
2019-06-01rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.Eduard-Mihai Burtescu-0/+1
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-3/+2
2019-04-30Move metadata encoding earlier.Nicholas Nethercote-5/+9
This commit separates metadata encoding (`tcx.encode_metadata`) from the creation of the metadata module (which is now handled by `write_compressed_metadata`, formerly `write_metadata`). The metadata encoding now occurs slightly earlier in the pipeline, at the very start of code generation within `start_codegen`. Metadata *writing* still occurs near the end of compilation; that will be moved forward in subsequent commits.
2019-04-30In JSON output, emit a directive after metadata is generated.Nicholas Nethercote-1/+1
To implement pipelining, Cargo needs to know when metadata generation is finished. This commit adds code to do that. Unfortunately, metadata file writing currently occurs very late during compilation, so pipelining won't produce a speed-up. Moving metadata file writing earlier will be a follow-up. The change involves splitting the existing `Emitter::emit` method in two: `Emitter::emit_diagnostic` and `Emitter::emit_directive`. The JSON directives look like this: ``` {"directive":"metadata file written: liba.rmeta"} ``` The functionality is behind the `-Z emit-directives` option, and also requires `--error-format=json`.
2019-04-20Remove cg_llvm/back/link.rsbjorn3-4/+12
2019-04-20Move almost all of cg_llvm/back/link.rs to cg_ssabjorn3-4/+0
2019-04-17Rename modulesYuki OKUSHI-1/+1
2019-04-12Use measureme in self-profilerWesley Wiser-3/+2
Related to #58372 Related to #58967
2019-03-29Use ExactSizeIterator + TrustedLen instead of num_cases arg for switchbjorn3-0/+1
2019-03-27Use informational target machine for metadataSimonas Kazlauskas-3/+15
Since there is nothing to optimise there...
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-12Stabilize Range*::contains.Steven Malis-1/+0
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-14/+7
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-2/+3
2019-03-04Make the lifetime parameters of tcx consistent.Gabriela Alexandra Moldovan-2/+2
2019-02-25librustc_codegen_llvm: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-6/+10
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-18librustc_codegen_llvm => 2018Taiki Endo-7/+3
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-12Stabilize slice_sort_by_cached_keyScott McMurray-1/+0
2019-02-12rustc: Implement incremental "fat" LTOAlex Crichton-5/+35
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-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-01-26Auto merge of #55641 - nagisa:optimize-attr, r=pnkfelixbors-8/+9
Implement optimize(size) and optimize(speed) attributes This PR implements both `optimize(size)` and `optimize(speed)` attributes. While the functionality itself works fine now, this PR is not yet complete: the code might be messy in places and, most importantly, the compiletest must be improved with functionality to run tests with custom optimization levels. Otherwise the new attribute cannot be tested properly. Oh, and not all of the RFC is implemented – attribute propagation is not implemented for example. # TODO * [x] Improve compiletest so that tests can be written; * [x] Assign a proper error number (E9999 currently, no idea how to allocate a number properly); * [ ] Perhaps reduce the duplication in LLVM attribute assignment code…
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-8/+9
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+0
2019-01-14rustc: Remove platform intrinsics crateAlex Crichton-1/+0
This was originally attempted in #57048 but it was realized that we could fully remove the crate via the `"unadjusted"` ABI on intrinsics. This means that all intrinsics in stdsimd are implemented directly against LLVM rather than using the abstraction layer provided here. That ends up meaning that this crate is no longer used at all. This crate developed long ago to implement the SIMD intrinsics, but we didn't end up using it in the long run. In that case let's remove it!
2018-12-25Remove licensesMark Rousskov-10/+0