summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2020-01-24Auto merge of #68414 - michaelwoerister:share-drop-glue, r=alexcrichtonbors-24/+71
Also share drop-glue when compiling with -Zshare-generics (i.e. at opt-level=0) This PR adds drop-glue to the set of monomorphizations that can be shared across crates via `-Zshare-generics`. This version of the PR might have detrimental effects on performance as it makes lots of stuff dependent on a single query results (`upstream_monomorphizations_for(def_id_of_drop_in_place)`). That should be fixable but let's do a perf run first. Potentially fixes issue https://github.com/rust-lang/rust/issues/64140. (cc @alexcrichton) The changes here are related to @matthewjasper's https://github.com/rust-lang/rust/pull/67332 but should be mostly orthogonal. r? @ghost
2020-01-24Rollup merge of #68473 - nopsledder:rust_sanitizer_fuchsia, r=alexcrichtonTyler Mandry-1/+1
Enable ASan on Fuchsia This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-15/+48
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-23Make drop-glue take advantage of -Zshare-generics.Michael Woerister-8/+20
2020-01-23Make ExportedSymbols type more local because it's not supposed to beMichael Woerister-4/+6
used outside of the LLVM backend.
2020-01-22Rollup merge of #68410 - tmiasko:msan-lto, r=varkorTyler Mandry-1/+11
Export weak symbols used by MemorySanitizer Export weak symbols defined by MemorySanitizer instrumentation, which are used to implement `-Zsanitizer-memory-track-origins` and `-Zsanitizer-recover=memory`. Previously, when using fat LTO, they would internalized and eliminated. Fixes #68367.
2020-01-23Add `-Z no-link` flagVictor Ding-3/+12
Adds a compiler option to allow rustc compile a crate without linking. With this flag, rustc serializes codegen_results into a .rlink file.
2020-01-22Enable ASan on FuchsiaAaron Green-1/+1
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-21Mark __msan_keep_going as an exported symbol for LTOTomasz Miąsko-2/+6
2020-01-20Mark __msan_track_origins as an exported symbol for LTONikita Popov-1/+7
2020-01-20Make sure that all upstream generics get re-exported from Rust dylibs.Michael Woerister-9/+38
2020-01-20Rollup merge of #68353 - Centril:code-liberation, r=petrochenkovDylan DPC-5/+0
Remove `rustc_error_codes` deps except in `rustc_driver` Remove dependencies on `rustc_error_codes` in all crates except for `rustc_driver`. This has some benefits: 1. Adding a new error code when hacking on the compiler only requires rebuilding at most `rustc_error_codes`, `rustc_driver`, and the reflexive & transitive closure of the crate where the new error code is being added and its reverse dependencies. This improves time-to-UI-tests (TTUT). 2. Adding an error description to an error code only requires rebuilding `rustc_error_codes` and `rustc_driver`. This should substantially improve TTUT. r? @petrochenkov cc @rust-lang/wg-diagnostics
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-5/+0
2020-01-18slice_patterns: remove internal uses of gateMazdak Farrokhzad-1/+1
2020-01-11Auto merge of #67458 - ↵bors-8/+18
pnkfelix:fix-66530-by-propagating-fatal-error-from-worker, r=matthewjasper When a codegen worker has a FatalError, propagate it instead of ICE'ing. Fix #66530
2020-01-11Auto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obkbors-179/+73
Promote references to constants instead of statics r? @oli-obk
2020-01-11Rollup merge of #67889 - Zoxc:parallel-cgus, r=michaelwoeristerMazdak Farrokhzad-13/+82
Compile some CGUs in parallel at the start of codegen This brings the compilation time for `syntex_syntax` from 11.542s to 10.453s with 6 threads in non-incremental debug mode. Just compiling `n` CGUs in parallel at the beginning of codegen seems sufficient to get rid of the staircase effect, at least for `syntex_syntax`. Based on https://github.com/rust-lang/rust/pull/67777. r? @michaelwoerister cc @alexcrichton @Mark-Simulacrum
2020-01-11Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiserMazdak Farrokhzad-22/+36
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
2020-01-10Auto merge of #65241 - tmiasko:no-std-san, r=alexcrichtonbors-52/+42
build-std compatible sanitizer support ### Motivation When using `-Z sanitizer=*` feature it is essential that both user code and standard library is instrumented. Otherwise the utility of sanitizer will be limited, or its use will be impractical like in the case of memory sanitizer. The recently introduced cargo feature build-std makes it possible to rebuild standard library with arbitrary rustc flags. Unfortunately, those changes alone do not make it easy to rebuild standard library with sanitizers, since runtimes are dependencies of std that have to be build in specific environment, generally not available outside rustbuild process. Additionally rebuilding them requires presence of llvm-config and compiler-rt sources. The goal of changes proposed here is to make it possible to avoid rebuilding sanitizer runtimes when rebuilding the std, thus making it possible to instrument standard library for use with sanitizer with simple, although verbose command: ``` env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS=-Zsanitizer=thread cargo test -Zbuild-std --target x86_64-unknown-linux-gnu ``` ### Implementation * Sanitizer runtimes are no long packed into crates. Instead, libraries build from compiler-rt are used as is, after renaming them into `librusc_rt.*`. * rustc obtains runtimes from target libdir for default sysroot, so that they are not required in custom build sysroots created with build-std. * The runtimes are only linked-in into executables to address issue #64629. (in previous design it was hard to avoid linking runtimes into static libraries produced by rustc as demonstrated by sanitizer-staticlib-link test, which still passes despite changes made in #64780). cc @kennytm, @japaric, @firstyear, @choller
2020-01-10Fix some rebasing fallout.Michael Woerister-10/+2
2020-01-10Initial support for recording query keys in self-profiling data.Michael Woerister-3/+3
2020-01-10self-profile: Switch to new approach for event_id generation that enables ↵Michael Woerister-8/+23
query-invocation-specific event_ids.
2020-01-10Errors in promoteds may only cause lints not hard errorsOliver Scherer-8/+7
2020-01-10Add span_bug that notes that shuffle indices must be constantSantiago Pastorino-0/+2
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-66/+52
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-60/+40
2020-01-10Use if let instead of match with one meaningful armSantiago Pastorino-19/+9
2020-01-10Remove StaticKindSantiago Pastorino-6/+1
2020-01-10Remove StaticKind::PromotedSantiago Pastorino-64/+3
2020-01-10Promote `Ref`s to constants instead of staticSantiago Pastorino-3/+6
2020-01-09Label unmarked timeJohn Kåre Alsaker-22/+36
2020-01-09Precompile CGUs while the main thread has the implicit job server tokenJohn Kåre Alsaker-38/+65
2020-01-09Compile some CGUs in parallel at the start of codegenJohn Kåre Alsaker-12/+54
2020-01-10Rollup merge of #67975 - EmbarkStudios:export-statics-wasm, r=alexcrichtonYuki Okushi-1/+1
Export public scalar statics in wasm Fixes #67453 I am not sure which export level statics should get when exporting them in wasm. This small change fixes the issue that I had, but this might not be the correct way to implement this.
2020-01-09Link sanitizer runtimes instead of injecting crate dependenciesTomasz Miąsko-47/+42
2020-01-09Remove sanitizer_runtime attributeTomasz Miąsko-5/+0
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-8/+8
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-7/+9
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-07Always export static variables as SymbolExportLevel::C in wasmmaik-7/+2
2020-01-07Export scalar statics in wasmmaik-1/+6
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-19/+21
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-45/+27
2020-01-04DefId{Map,Set} -> rustc::hir::def_idMazdak Farrokhzad-2/+1
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-4/+5
2020-01-04extract rustc::middle::codegen_fn_attrsMazdak Farrokhzad-2/+3
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-6/+6
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-11/+10
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-16/+16
2019-12-30When a codegen worker has a FatalError, propagate it instead of ICE'ing.Felix S. Klock II-8/+18