summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2019-07-02Auto merge of #61268 - michaelwoerister:stabilize-pgo, r=alexcrichtonbors-4/+4
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-06-27rustc: Retry SIGILL linker invocationsAlex Crichton-24/+47
We've seen quite a few issues with spurious illegal instructions getting executed on OSX on CI recently. For whatever reason `cc` itself is executing an illegal instruction and we're not really getting any other information about what's happening. Since we're already retrying the linker when it segfaults, let's just continue to retry everything and automatically reinvoke the linker when it fails with an illegal instruction.
2019-06-25Implement From<Local> for Place and PlaceBaseSantiago Pastorino-1/+1
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-4/+4
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-19Change `ByRef` to a struct variant to clarify its fields via namesOliver Scherer-2/+2
2019-06-19Remove the `AllocId` from `ByRef` valuesOliver Scherer-4/+4
`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/+5
2019-06-18Auto merge of #59625 - immunant:copy_variadics_typealias, r=eddybbors-27/+16
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-18Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-22/+22
2019-06-18rustc: reintroduce lifetime bounds where necessary.Eduard-Mihai Burtescu-2/+2
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-50/+50
2019-06-17Expose `VaListImpl` as the Rust equivalent of `__va_list_tag` and implement ↵Andrei Homescu-27/+16
Clone for it.
2019-06-17remove _by_hir_id if there is no NodeId counterpartljedrz-1/+1
2019-06-16Separate librustc_codegen_ssa modulechansuke-95/+94
2019-06-15Auto merge of #59752 - Zoxc:dylib-fix, r=alexcrichtonbors-15/+8
Limit dylib symbols This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-6/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-35/+35
2019-06-12Add a limit_rdylib_exports option and disable it for SolarisJohn Kåre Alsaker-7/+4
2019-06-12Limit dylib symbolsJohn Kåre Alsaker-9/+5
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-64/+54
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-33/+33
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-13/+13
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-16/+16
2019-06-12Rollup merge of #61688 - RalfJung:is-floating-point, r=cramertjMazdak Farrokhzad-2/+2
is_fp and is_floating_point do the same thing, remove the former also consistently mark all these `is_*` methods for inlining
2019-06-11is_fp and is_floating_point do the same thing, remove the formerRalf Jung-2/+2
also consistently mark all these is_* methods for inlining
2019-06-11Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-4/+1
2019-06-11rustc_codegen_*: deny(unused_lifetimes).Eduard-Mihai Burtescu-8/+9
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-07Revert "Make LocalAnalizer visitor iterate instead of recurse"Santiago Pastorino-48/+37
This reverts commit 0cfaa28bc5edda198571fca9410cbc9f71b8d17a.
2019-06-06Rollup merge of #61559 - spastorino:make-visitors-iterate, r=oli-obkMazdak Farrokhzad-37/+48
Make visitors iterate r? @oli-obk The second commit is not completely equivalent, unsure if the code is wrong or not. Tests pass though, otherwise we would need to iterate in the opposite direction as it happened in other parts of the code.
2019-06-06Make LocalAnalizer visitor iterate instead of recurseSantiago Pastorino-37/+48
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-37/+38
2019-06-05Add `walk_chain`.Nicholas Nethercote-8/+1
This combines multiple `HygieneData::with` calls on a hot path.
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 last dependency of codegen on rustc_mirMark Mansi-1/+0
2019-06-02query-ify const_fieldMark Mansi-7/+2
2019-06-02remove unneeded depsMark Mansi-3/+0
2019-06-02remove as_mono_itemMark Mansi-19/+22
2019-06-02move codegenunitext to rustc::mir::monoMark Mansi-1/+0
2019-06-02move monoitemext to inherent methodsMark Mansi-17/+18
2019-06-02move DefPathBasedNames to ty::print::obsoleteMark Mansi-0/+1
2019-06-02remove reexports of mir::mono::{MonoItem,CodegenUnit}Mark Mansi-3/+3
2019-06-02deduplicate ty::Instance constructorsMark Mansi-6/+6
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-8/+4
2019-06-01Auto merge of #61350 - RalfJung:alloc, r=oli-obkbors-1/+1
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