about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
AgeCommit message (Collapse)AuthorLines
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
2018-11-16Great separation of librustc_codegen_llvm: librustc_codegen_ssa compilesDenis Merigoux-27/+7
2018-11-16Beginning of moving all backend-agnostic code to rustc_codegen_ssaDenis Merigoux-1/+2
2018-11-16Moved Backend interface into rustc_codegen_utilsDenis Merigoux-53/+1
2018-11-16Added compile codegen to backend traitDenis Merigoux-13/+6
2018-11-16Preparing the generalization of base:compile_coodegen_unitDenis Merigoux-3/+19
2018-11-16Generalized base:codegen_crateDenis Merigoux-6/+61
2018-11-16Removed phantomdata no longer necessaryDenis Merigoux-9/+6
Because CodegenContext doesn't implement Backend anymore
2018-11-16Removing LLVM content from CommonMethods -> ConstMethodsDenis Merigoux-30/+0
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-4/+4
2018-11-16Added definition of type traitDenis Merigoux-0/+1
2018-11-16Removed code duplication for CommonWriteMethodsDenis Merigoux-17/+3
2018-11-16CommonWriteMethods are not static any moreDenis Merigoux-6/+52
2018-11-16New files and folders for traitsDenis Merigoux-1/+1
Moved common enums to common
2018-11-16Generalized base.rs#call_memcpy and everything that it usesDenis Merigoux-0/+2
Generalized operand.rs#nontemporal_store and fixed tidy issues Generalized operand.rs#nontemporal_store's implem even more With a BuilderMethod trait implemented by Builder for LLVM Cleaned builder.rs : no more code duplication, no more ValueTrait Full traitification of builder.rs
2018-11-16Work around to fix issue https://github.com/rust-lang/rust/issues/53912Denis Merigoux-1/+4
2018-11-03Move collect_and_partition_mono_items to rustc_mirbjorn3-2/+2
2018-11-03Move cg_llvm::back::linker to cg_utilsbjorn3-25/+5
2018-10-08codegen_llvm: whitespace & formatting improvementsljedrz-1/+1
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-31Support local ThinLTO with incremental compilation.Michael Woerister-28/+12