summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/traits
AgeCommit message (Collapse)AuthorLines
2019-06-19Weave the alignment through `ByRef`Oliver Scherer-0/+1
2019-06-18Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddybbors-2/+2
Refactor C FFI variadics to more closely match their C counterparts, and add Clone implementation We had to make some changes to expose `va_copy` and `va_end` directly to users (mainly for C2Rust, but not exclusively): - redefine the Rust variadic structures to more closely correspond to C: `VaList` now matches `va_list`, and `VaListImpl` matches `__va_list_tag` - add `Clone` for `VaListImpl` - add explicit `as_va_list()` conversion function from `VaListImpl` to `VaList` - add deref coercion from `VaList` to `VaListImpl` - add support for the `asmjs` target All these changes were needed for use cases like: ```Rust let mut ap2 = va_copy(ap); vprintf(fmt, ap2); va_end(&mut ap2); ```
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-2/+2
2019-06-17Expose `VaListImpl` as the Rust equivalent of `__va_list_tag` and implement ↵Andrei Homescu-2/+2
Clone for it.
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-6/+6
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-6/+2
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-11rustc_codegen_*: deny(unused_lifetimes).Eduard-Mihai Burtescu-6/+6
2019-06-03Auto merge of #59148 - lcnr:unchecked_maths, r=eddybbors-0/+6
add support for unchecked math add compiler support for ```rust /// Returns the result of an unchecked addition, resulting in /// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`. pub fn unchecked_add<T>(x: T, y: T) -> T; /// Returns the result of an unchecked substraction, resulting in /// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`. pub fn unchecked_sub<T>(x: T, y: T) -> T; /// Returns the result of an unchecked multiplication, resulting in /// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`. pub fn unchecked_mul<T>(x: T, y: T) -> T; ``` cc https://github.com/rust-lang/rfcs/issues/2508
2019-06-03add support for unchecked mathlcnr/Bastian Kauschke-0/+6
2019-06-02remove reexports of mir::mono::{MonoItem,CodegenUnit}Mark Mansi-1/+1
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-4/+2
2019-05-29Rollup merge of #61297 - eddyb:forsaken-stats, r=nagisaMazdak Farrokhzad-5/+1
Remove LLVM instruction stats and other (obsolete) codegen stats. Both `-Z count_llvm_insns` and `-Z codegen-stats` are removed, as (AFAIK) they have been of little use in the last few years, especially after the transition to MIR->LLVM codegen. Other than for the LLVM instruction counts, `-Z codegen-stats` has long been obsoleted anyway. r? @nagisa cc @rust-lang/compiler
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-5/+1
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-2/+2
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-14removes `AbiMethods`Saleem Jaffer-11/+10
2019-05-05code review fixesSaleem Jaffer-2/+1
2019-05-04adding HasParamEnv traitSaleem Jaffer-2/+9
2019-04-30Move metadata encoding earlier.Nicholas Nethercote-3/+4
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-23rustc_codegen_ssa: rename debuginfo_upvar_decls_ops_sequence to ↵Eduard-Mihai Burtescu-1/+1
debuginfo_upvar_ops_sequence.
2019-03-31Remove redundant importFabian Drinck-1/+0
2019-03-29Use ExactSizeIterator + TrustedLen instead of num_cases arg for switchbjorn3-2/+2
2019-03-29Add a method for emiting a switch.bjorn3-2/+3
2019-03-29Remove inline_asm_call from cg_ssabjorn3-14/+0
`count_insn` is no longer called for inline asm, because it is private to builder.rs
2019-03-29Remove type_variadic_func and typ_array from cg_ssabjorn3-9/+8
2019-03-29Remove a lot of methods from *TypeMethodsbjorn3-64/+6
2019-03-29Remove scalar_lltypes from cg_ssabjorn3-3/+0
2019-03-29Move get_param and set_value_namebjorn3-3/+3
2019-03-29Remove a lot of methods from BuilderMethodsbjorn3-47/+0
2019-03-29[WIP] Make some debug info methods take &mut FunctionDebugContextbjorn3-2/+2
declare_local still takes &FunctionDebugContext, because of borrowck errors
2019-03-29Remove const_{cstr,str_slice,get_elt,get_real} and is_const_real methods ↵bjorn3-9/+9
from cg_ssa This introduces the static_panic_msg trait method to StaticBuilderMethods.
2019-03-29Remove const_{fat_ptr,array,vector,bytes} from cg_ssabjorn3-4/+0
2019-03-29Miscbjorn3-1/+1
2019-03-29Don't use c_uint in cg_ssabjorn3-2/+1
2019-03-15rustc: remove fmt::{Debug,Display} from ty::TyKind.Eduard-Mihai Burtescu-1/+1
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-6/+0
2019-03-04Make the lifetime parameters of tcx consistent.Gabriela Alexandra Moldovan-2/+2
2019-02-27Support defining C compatible variadic functionsDan Robertson-0/+6
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-25librustc_codegen_ssa: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-5/+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-14Rollup merge of #58378 - alexcrichton:incremental-lto, r=michaelwoeristerMazdak Farrokhzad-3/+6
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-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-5/+5
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12rustc: Implement incremental "fat" LTOAlex Crichton-3/+6
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-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-09librustc_codegen_ssa => 2018Taiki Endo-13/+14
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-2/+3
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-1/+1
should be a pure refactoring.