about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2019-10-23Rollup merge of #65695 - ↵Yuki Okushi-6/+6
michaelwoerister:fix-self-profiling-work-item-event-names, r=wesleywiser self-profiling: Remove module names from some event-ids in codegen backend. Event-IDs are not supposed to contain argument values. Event-IDs are the equivalent of function names. Proper support for parameters will be added to self-profiling down the line. This PR fixes an oversight from https://github.com/rust-lang/rust/pull/64840. r? @wesleywiser
2019-10-23Rollup merge of #65681 - sunfishcode:followup, r=CentrilYuki Okushi-13/+24
Code cleanups following up on #65576. This makes a few code cleanups to follow up on the review comments in https://github.com/rust-lang/rust/pull/65576. r? @Centril
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-65/+40
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
2019-10-22self-profiling: Remove module names from some event-ids in codegen backend.Michael Woerister-6/+6
2019-10-22Fix issue #64153 by checking for .rcgu.o suffix when trying to identify Rust ↵Michael Woerister-19/+26
generated object files.
2019-10-21Code cleanups following up on #65576.Dan Gohman-13/+24
This makes a few code cleanups to follow up on the review comments in https://github.com/rust-lang/rust/pull/65576.
2019-10-21Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`varkor-0/+1
2019-10-21Use `Symbol` for codegen unit names.Nicholas Nethercote-4/+4
This is a straightforward replacement except for two places where we have to convert to `LocalInternedString` to get a stable sort.
2019-10-21Convert fields within `DefPathData` from `InternedString` to `Symbol`.Nicholas Nethercote-1/+1
It's a full conversion, except in `DefKey::compute_stable_hash()` where a `Symbol` now is converted to an `InternedString` before being hashed. This was necessary to avoid test failures.
2019-10-19Remove unreachable unit tuple compare binop codegenCaleb Behunin-8/+1
2019-10-19Rollup merge of #65448 - eddyb:codegen-box-less-special, r=oli-obkMazdak Farrokhzad-27/+19
rustc_codegen_ssa: remove some unnecessary Box special-casing. Could help simplify #60900. r? @nikomatsakis
2019-10-19Rollup merge of #65576 - sunfishcode:main-needs-argc-argv, r=alexcrichtonMazdak Farrokhzad-7/+18
Don't add `argc` and `argv` arguments to `main` on WASI. Add a target setting to allow targets to specify whether the generated `main` function should be passed `argc` and `argv` arguments. Set it to false on wasm32-wasi, since WASI's `args::args()` calls into the WASI APIs itself. This will allow the WASI toolchain to avoid linking and running command-line argument initialization code when the arguments aren't actually needed.
2019-10-17Don't add `argc` and `argv` arguments to `main` on WASI.Dan Gohman-7/+18
Add a target setting to allow targets to specify whether the generated `main` function should be passed `argc` and `argv` arguments. Set it to false on wasm32-wasi, since WASI's `args::args()` calls into the WASI APIs itself. This will allow the WASI toolchain to avoid linking and running command-line argument initialization code when the arguments aren't actually needed.
2019-10-17Rollup merge of #65465 - Centril:split-syntax-1, r=petrochenkovMazdak Farrokhzad-3/+4
Move syntax::ext to a syntax_expand and refactor some attribute logic Part of https://github.com/rust-lang/rust/pull/65324. r? @petrochenkov
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+2
- Compatible with Emscripten 1.38.46-upstream or later upstream. - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the old incorrect wasm32 C call ABI with the correct one, preserving the old one as wasm32_bindgen_compat for wasm-bindgen compatibility. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-3/+4
2019-10-15rustc_codegen_ssa: remove some unnecessary Box special-casing.Eduard-Mihai Burtescu-27/+19
2019-10-15Refactor: Rename `db` locals to `diag`Philipp Hansch-5/+5
https://github.com/rust-lang/rust/pull/64272 replaced `DiagnosticBuilder` with `Diagnostic` in some places. This commit just renames the DB variable from `db` to `diag` where it wasn't renamed.
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+5
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+5
2019-10-13Add top level provide/provide_extern to cg_ssa and cg_utilsbjorn3-0/+11
2019-10-13Remove MiscMethods::instancesbjorn3-15/+14
2019-10-13Inline functions from cg_ssa::callee and remove the modbjorn3-63/+24
Fixes #65271
2019-10-13s/FuncId/Functionbjorn3-12/+12
2019-10-13Move span_invalid_monomorphization_error from cg_llvm to cg_ssabjorn3-0/+40
The associated long diagnostic didn't get registered before
2019-10-13Remove is_const_integral method from ConstMethodsbjorn3-6/+4
2019-10-13Introduce FuncId backend typebjorn3-10/+13
2019-10-13Auto merge of #65182 - anp:reify-shim, r=eddybbors-1/+18
Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N) Supercedes: https://github.com/rust-lang/rust/pull/65082 Depends on: https://github.com/rust-lang/rust/pull/65037 Tracking issue: https://github.com/rust-lang/rust/issues/47809 [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) steps taken: * [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183) * [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers * [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
2019-10-11Auto merge of #64716 - jonhoo:stabilize-mem-take, r=SimonSapinbors-1/+0
Stabilize mem::take (mem_take) Tracking issue: https://github.com/rust-lang/rust/issues/61129 r? @matklad
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-1/+43
Add llvm.sideeffect to potential infinite loops and recursions LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728 **UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
2019-10-09Reifying callers of Instance::resolve use resolve_for_fn_ptr.Adam Perry-1/+18
2019-10-08Stabilize mem::take (mem_take)Jon Gjengset-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-08Rollup merge of #65081 - Mark-Simulacrum:remove-profile-queries, ↵Mazdak Farrokhzad-1/+1
r=michaelwoerister Remove -Zprofile-queries r? @michaelwoerister Per [zulip thread](https://zulip-archive.rust-lang.org/131828tcompiler/57361RemoveZprofilequeries.html).
2019-10-07Auto merge of #64780 - choller:master, r=michaelwoeristerbors-1/+3
Only add sanitizer runtimes when linking an executable (#64629). This change modifies the code to only add sanitizer runtimes if we are linking an executable, as those runtimes should never be part of libraries. I successfully compiled `mozilla-central` with ASan using this patch.
2019-10-07Rollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoeristerMazdak Farrokhzad-4/+0
remove event that causes panics in measureme tools the measureme tools summarize and crox do not alow a event to go out of scope of the parent event codegen_and_optimize_crate ends after the codegen_crate event r? @wesleywiser cc @michaelwoerister @Mark-Simulacrum
2019-10-07Add feature gate for raw_dylib.Charles Lew-3/+13
2019-10-05Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandryTyler Mandry-2/+5
Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend" This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes. This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-05Rollup merge of #65100 - csmoe:generator, r=nikomatsakisTyler Mandry-1/+1
Replace GeneratorSubsts with SubstsRef Closes #42340 r? @nikomatsakis
2019-10-05Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, ↵Tyler Mandry-2/+5
r=alexcrichton" This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.
2019-10-05remove event that causes panics in measureme toolsAndreas Jonson-4/+0
the measureme tools summarize and crox do not alow a event to go out of scope of the parent event codegen_and_optimize_crate ends after the codegen_crate event
2019-10-04Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichtonbors-5/+2
Upgrade Emscripten targets to use upstream LLVM backend - Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-04clean up GeneratorSubstscsmoe-1/+1
2019-10-04Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-5/+2
- Refactors the Emscripten target spec to share code with other wasm targets. - Replaces the incorrect wasm32 C call ABI with the old asmjs version, which is correct for both wasm32 and JS. - Updates the varargs ABI used by Emscripten and deletes the old one. - Removes the obsolete wasm32-experimental-emscripten target. - Temporarily makes Emscripten targets use panic=abort by default because supporting unwinding will require an LLVM patch.
2019-10-04Rollup merge of #64817 - csmoe:closure, r=nikomatsakisMazdak Farrokhzad-2/+6
Replace ClosureSubsts with SubstsRef Addresses https://github.com/rust-lang/rust/issues/42340 part 3 https://github.com/rust-lang/rust/pull/59312 might benefit from this clean up. r? @nikomatsakis
2019-10-03Remove -Zprofile-queriesMark Rousskov-1/+1
2019-10-03generate ClosureSubsts from SubstsRefcsmoe-3/+4
2019-10-01Rollup merge of #64840 - michaelwoerister:self-profiling-raii-refactor, ↵Tyler Mandry-72/+12
r=wesleywiser SelfProfiler API refactoring and part one of event review This PR refactors the `SelfProfiler` a little bit so that most profiling methods are RAII-based. The codegen backend code already had something similar, this refactoring pulls this functionality up into `SelfProfiler` itself, for general use. The second commit of this PR is a review and update of the existing events we are already recording. Names have been made more consistent. CGU names have been removed from event names. They will be added back in when function parameter recording is implemented. There is still some work to be done for adding new events, especially around trait resolution and the incremental system. r? @wesleywiser
2019-09-30Self-Profiling: Make names of existing events more consistent and use new API.Michael Woerister-72/+12
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-7/+7
2019-09-29remove ClosureSubsts with SubstsRefcsmoe-2/+5