about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-06-19Weave the alignment through `ByRef`Oliver Scherer-4/+7
2019-06-18Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddybbors-46/+4
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-3/+3
2019-06-17Expose `VaListImpl` as the Rust equivalent of `__va_list_tag` and implement ↵Andrei Homescu-46/+4
Clone for it.
2019-06-16Auto merge of #61881 - glaubitz:sparc64-ffi-abi, r=petrochenkovbors-2/+2
librustc_codegen_llvm: Use repr(transparent) for bitflags over repr(C… …) (#61306) In order to make sure that Rust's bitflags types are passed the same way in the Rust ABI as they are in the C ABI, we need to use the attribute repr(transparent) over the repr(C) attribute for the single-field bitflags structs in in order to prevent ABI mismatches. Thanks to Michael Karcher for finding this bug.
2019-06-16librustc_codegen_llvm: Use repr(transparent) for bitflags over repr(C) (#61306)John Paul Adrian Glaubitz-2/+2
In order to make sure that Rust's bitflags types are passed the same way in the Rust ABI as they are in the C ABI, we need to use the attribute repr(transparent) over the repr(C) attribute for the single-field bitflags structs in in order to prevent ABI mismatches. Thanks to Michael Karcher for finding this bug.
2019-06-15Remove unnecessary `.clone()`Shotaro Yamada-3/+3
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-22/+22
2019-06-12rustc_codegen_llvm: `deny(internal)`.Eduard-Mihai Burtescu-11/+8
2019-06-12rustc_codegen_llvm: `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-13/+11
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-14/+16
2019-06-12rustc: remove some unnecessary lifetimes in -> TyCtxt methods.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-19/+19
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-11/+11
2019-06-11rustc_codegen_*: deny(unused_lifetimes).Eduard-Mihai Burtescu-3/+3
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-06Add intrinsics for floating-point min and maxvarkor-0/+9
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-2/+2
2019-06-03Auto merge of #59148 - lcnr:unchecked_maths, r=eddybbors-1/+59
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 unchecked math intrinsicslcnr/Bastian Kauschke-1/+23
2019-06-03add support for unchecked mathlcnr/Bastian Kauschke-0/+36
2019-06-02query-fy type_nameMark Mansi-1/+1
2019-06-02remove unneeded depsMark Mansi-5/+1
2019-06-02move codegenunitext to rustc::mir::monoMark Mansi-1/+0
2019-06-02move DefPathBasedNames to ty::print::obsoleteMark Mansi-1/+1
2019-06-02remove reexports of mir::mono::{MonoItem,CodegenUnit}Mark Mansi-1/+2
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-11/+6
2019-06-02Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddybMazdak Farrokhzad-3/+1
Fix some issues with `unwrap_usize` instead of `assert_usize` Fixes https://github.com/rust-lang/rust/issues/61337. Fixes https://github.com/rust-lang/rust/issues/61341. Fixes https://github.com/rust-lang/rust/issues/61422. r? @eddyb
2019-06-02Auto merge of #61299 - eddyb:nicer-llvm-builder, r=rkruppebors-184/+85
rustc_codegen_llvm: a couple builder niceties. r? @nagisa cc @sunfishcode @rkruppe
2019-06-02Use `assert_usize` instead of `unwrap_usize` in several placesvarkor-3/+1
2019-06-01rustc_codegen_llvm: replace `fn noname()` with `const UNNAMED`.Eduard-Mihai Burtescu-47/+52
2019-06-01rustc_codegen_llvm: pretty up a few builder methods with a macro.Eduard-Mihai Burtescu-138/+34
2019-06-01Auto merge of #61350 - RalfJung:alloc, r=oli-obkbors-4/+4
light refactoring of global AllocMap * rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names. Cc @oli-obk
2019-05-31Update rustc-demangle version.Eduard-Mihai Burtescu-1/+1
2019-05-31Auto merge of #60166 - oli-obk:type_name, r=eddybbors-3/+2
Make the `type_name` intrinsic deterministic cc @eddyb for the printing infrastructure cc @Centril for the deterministic (coherent?) output r? @sfackler
2019-05-30light refactoring of global AllocMapRalf Jung-4/+4
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
2019-05-30Make the `type_name` intrinsic's output deterministicOliver Scherer-3/+2
2019-05-30Rollup merge of #61231 - pnkfelix:issue-59548-linkage-diagnostic, r=petrochenkovMazdak Farrokhzad-16/+7
Fix linkage diagnostic so it doesn't ICE for external crates Fix linkage diagnostic so it doesn't ICE for external crates (As a drive-by improvement, improved the diagnostic to indicate *why* `*const T` or `*mut T` is required.) Fix #59548 Fix #61232
2019-05-29Rollup merge of #61297 - eddyb:forsaken-stats, r=nagisaMazdak Farrokhzad-143/+20
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: rename away the last occurrence of `insn`.Eduard-Mihai Burtescu-3/+3
2019-05-29rustc_codegen_llvm: remove LLVM instruction count stats.Eduard-Mihai Burtescu-140/+17
2019-05-29Rollup merge of #60928 - TheSirC:fix/60229, r=eddybMazdak Farrokhzad-5/+5
Changes the type `mir::Mir` into `mir::Body` Fixes part 1 of #60229 (previously attempted in #60242). I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date. The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool.
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-5/+5
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-28Rollup merge of #61164 - RalfJung:scalar, r=oli-obkMazdak Farrokhzad-3/+3
rename Scalar::Bits to Scalar::Raw and bits field to data Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor). r? @oli-obk
2019-05-28Rename PgoGenerate to something more general.Michael Woerister-3/+3
2019-05-27Use a PathBuf instead of String for representing the pgo-use path internally.Michael Woerister-5/+3
2019-05-27Refine the message to at least *mention* the attribute itself.Felix S. Klock II-1/+2
Update pre-existing test's diagnostic output accordingly.
2019-05-27Always supply span to check_and_apply_linkage, sidestepping need to add ↵Felix S. Klock II-16/+6
`bug!`s to rustc.