about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
AgeCommit message (Collapse)AuthorLines
2019-07-08normalize use of backticks for compiler messages in librustc_codegenSamy Kacimi-5/+5
https://github.com/rust-lang/rust/issues/60532
2019-07-07Rollup merge of #62286 - petrhosek:rustc-no-duplicate-archives, r=cramertjMazdak Farrokhzad-3/+16
Check if the archive has already been added to avoid duplicates This avoids adding archives multiple times, which results in duplicate objects in the resulting rlib, leading to symbol collision and link failures. This could happen when crate contains multiple link attributes that all reference the same archive.
2019-07-07format a bitRalf Jung-2/+4
2019-07-07Handle null from LLVMRustGetSectionNameValentin Tolmer-5/+10
2019-07-07Remove some dummy dependenciesJohn Kåre Alsaker-0/+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-06Rollup merge of #62422 - lzutao:remove-some-mem-uinit, r=alexcrichtonMazdak Farrokhzad-2/+1
Remove some uses of mem::uninitialized cc #62397 r? @RalfJung
2019-07-06Remove use of mem::uninitialized in code_gen crateLzu Tao-2/+1
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-05Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJungMazdak Farrokhzad-1/+1
Implement mem::{zeroed,uninitialized} in terms of MaybeUninit. Refs #62061 r? @oli-obk
2019-07-04Permit use of mem::uninitialized via allow(deprecated)Mark Rousskov-0/+1
2019-07-04Implement mem::{zeroed,uninitialized} in terms of MaybeUninit.Alex Gaynor-1/+1
Refs #62061
2019-07-04Rollup merge of #62249 - czipperz:use-mem-take-instead-of-replace-default, ↵Mazdak Farrokhzad-2/+3
r=dtolnay,Centril Use mem::take instead of mem::replace with default
2019-07-03Remove needless lifetimesJeremy Stucki-4/+4
2019-07-03Remove needless lifetimesJeremy Stucki-3/+3
2019-07-02Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichtonbors-2/+2
Stabilize support for Profile-guided Optimization This PR makes profile-guided optimization available via the `-C profile-generate` / `-C profile-use` pair of commandline flags and adds end-user documentation for the feature to the [rustc book](https://doc.rust-lang.org/rustc/). The PR thus ticks the last two remaining checkboxes of the [stabilization tracking issue](https://github.com/rust-lang/rust/issues/59913). From the tracking issue: > Profile-guided optimization (PGO) is a common optimization technique for ahead-of-time compilers. It works by collecting data about a program's typical execution (e.g. probability of branches taken, typical runtime values of variables, etc) and then uses this information during program optimization for things like inlining decisions, machine code layout, or indirect call promotion. If you are curious about how this can be used, there is a rendered version of the documentation this PR adds available [here]( https://github.com/michaelwoerister/rust/blob/stabilize-pgo/src/doc/rustc/src/profile-guided-optimization.md). r? @alexcrichton cc @rust-lang/compiler
2019-07-02Check if the archive has already been added to avoid duplicatesPetr Hosek-3/+16
This avoids adding archives multiple times, which results in duplicate objects in the resulting rlib, leading to symbol collision and link failures. This could happen when crate contains multiple link attributes that all reference the same archive.
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-07-01Convert more usages overChris Gregory-2/+2
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-23Rollup merge of #62068 - ia0:fix_meta_var, r=petrochenkovMazdak Farrokhzad-1/+1
Fix meta-variable binding errors in macros The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact. Found by https://github.com/rust-lang/rust/pull/62008
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-1/+1
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-06-22Deny explicit_outlives_requirements in the compilerMatthew Jasper-1/+0
2019-06-22Rollup merge of #61984 - ljedrz:more_node_id_pruning, r=ZoxcMazdak Farrokhzad-1/+1
More NodeId pruning Just another round of the `HirId`ification initiative. r? @Zoxc
2019-06-21Stabilize profile-guided optimization.Michael Woerister-2/+2
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-19Pacify tidyOliver Scherer-1/+3
2019-06-19Change `ByRef` to a struct variant to clarify its fields via namesOliver Scherer-1/+1
2019-06-19Remove the `AllocId` from `ByRef` valuesOliver Scherer-1/+1
`ByRef` const values have no identity beyond their value, we should not treat them as having identity. The `AllocId` often differed between equal constants, because of the way that the miri-engine evaluates constants.
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