about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa
AgeCommit message (Collapse)AuthorLines
2020-02-03rustc_codegen_ssa: don't treat inlined variables as debuginfo arguments.Eduard-Mihai Burtescu-4/+1
2020-02-03rustc_codegen_ssa: convert mir::VarDebugInfo into a custom PerLocalVarDebugInfo.Eduard-Mihai Burtescu-54/+133
2020-02-03rustc_codegen_ssa: split declare_local into create_dbg_var and dbg_var_addr.Eduard-Mihai Burtescu-10/+26
2020-02-01Auto merge of #68133 - Centril:slimmer-syntax, r=petrochenkovbors-2/+3
Slimmer syntax High-level summary of changes: - The `syntax::node_count` pass is moved into `rustc_ast_passes`. This works towards improving #65031 by making compiling `syntax` go faster. - The `syntax::{GLOBALS, with_globals, ..}` business is consolidated into `syntax::attr` for cleaner code and future possible improvements. - The pretty printer loses its dependency on `ParseSess`, opting to use `SourceMap` & friends directly instead. - Some drive by cleanup of `syntax::attr::HasAttr` happens. - Builtin attribute logic (`syntax::attr::builtin`) + `syntax::attr::allow_internal_unstable` is moved into a new `rustc_attr` crate. More logic from `syntax::attr` should be moved into that crate over time. This also means that `syntax` loses all mentions of `ParseSess`, which enables the next point. - The pretty printer `syntax::print` is moved into a new crate `rustc_ast_pretty`. - `rustc_session::node_id` is moved back as `syntax::node_id`. As a result, `syntax` gets to drop dependencies on `rustc_session` (and implicitly `rustc_target`), `rustc_error_codes`, and `rustc_errors`. Moreover `rustc_hir` gets to drop its dependency on `rustc_session` as well. At this point, these crates are mostly "pure data crates", which is approaching a desirable end state. - We should consider renaming `syntax` to `rustc_ast` now.
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-2/+3
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-02-01Auto merge of #68180 - ajpaverd:cfguard-rust, r=nagisabors-1/+26
Add support for Control Flow Guard on Windows. LLVM now supports Windows Control Flow Guard (CFG): https://github.com/llvm/llvm-project/commit/d157a9bc8ba1085cc4808c6941412322a7fd884e This patch adds support for rustc to emit the required LLVM module flags to enable CFG metadata (cfguard=1) or metadata and checks (cfguard=2). The LLVM module flags are ignored on unsupported targets and operating systems.
2020-01-31Drop cfg(bootstrap) codeMark Rousskov-1/+0
2020-01-28Add support for Control Flow Guard on Windows.Andrew Paverd-1/+26
This patch enables rustc to emit the required LLVM module flags to enable Control Flow Guard metadata (cfguard=1) or metadata and checks (cfguard=2). The LLVM module flags are ignored on unsupported targets and operating systems.
2020-01-28Place::ty_from takes local by valueSantiago Pastorino-2/+2
2020-01-28Local field on PlaceRef and RootPlace is not a reference anymoreSantiago Pastorino-9/+9
2020-01-28codegen_place and related functions can take PlaceRef by valueSantiago Pastorino-19/+19
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