summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
AgeCommit message (Collapse)AuthorLines
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
2018-12-04Serialize modules into ThinBuffer after initial optimizationNikita Popov-1/+7
Instead of keeping all modules in memory until thin LTO and only serializing them then, serialize the module immediately after it finishes optimizing.
2018-12-04Remove unnecessary parts of run_fat_lto signatureNikita Popov-3/+2
Fat LTO merges into one module, so only return one module.
2018-12-04Separate out methods for running thin and fat LTONikita Popov-2/+10
2018-11-26libcore: Add va_list lang item and intrinsicsDan Robertson-0/+1
- Add the llvm intrinsics used to manipulate a va_list. - Add the va_list lang item in order to allow implementing VaList in libcore.
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16[eddyb] rustc_codegen_ssa: avoid a `Clone` bound on `TargetMachine`.Eduard-Mihai Burtescu-11/+0
2018-11-16[eddyb] rustc_codegen_llvm: remove unnecessary `'a` from ↵Eduard-Mihai Burtescu-3/+3
`LlvmCodegenBackend` impls.
2018-11-16Separating the back folder between backend-agnostic and LLVM-specific codeDenis Merigoux-69/+96
2018-11-16Added some docs + start to &mut self builder methodsDenis Merigoux-1/+1
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-13/+9