about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/back/write.rs
AgeCommit message (Collapse)AuthorLines
2020-04-07Use assoc integer constants in librustc_*Linus Färnstrand-1/+1
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-4/+4
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-27Remove `no_integrated_as` mode.Nicholas Nethercote-65/+1
Specifically, remove both `-Z no_integrated_as` and `TargetOptions::no_integrated_as`. The latter was only used for the `msp430_none_elf` platform, for which it's no longer required.
2020-03-26Introduce `EmitObj`.Nicholas Nethercote-32/+49
Currently, there are three fields in `ModuleConfig` that dictate how object files are emitted: `emit_obj`, `obj_is_bitcode`, and `embed_bitcode`. Some of the combinations of these fields are nonsensical, in particular having both `obj_is_bitcode` and `embed_bitcode` true at the same time. Also, currently: - we needlessly emit and then delete a bytecode file if `obj_is_bitcode` is true but `emit_obj` is false; - we needlessly embed bitcode in the LLVM module if `embed_bitcode` is true and `emit_obj` is false. This commit combines the three fields into one, with a new type `EmitObj` (and the auxiliary `BitcodeSection`) which can encode five different possibilities. In the old code, `set_flags` would set `obj_is_bitcode` and `embed_bitcode` on all three of the configs (`modules`, `allocator`, `metadata`) if the relevant other conditions were met, even if no object code needed to be emitted for one or more of them. Whereas `start_async_codegen` would set `emit_obj`, but only for those configs that need it. In the new code, `start_async_codegen` does all the work of setting `emit_obj`, and it only does that for the configs that need it. `set_flags` no longer sets anything related to object file emission.
2020-03-25Remove `TargetOptions::embed_bitcode`.Nicholas Nethercote-9/+8
It's unused by any existing targets, and soon we'll be embedding full bitcode by default anyway.
2020-03-24Rollup merge of #70289 - nnethercote:refactor-codegen, r=eddybMazdak Farrokhzad-17/+22
Refactor `codegen` `codegen` in `src/librustc_codegen_llvm/back/write.rs` is long and has complex control flow. These commits refactor it and make it easier to understand.
2020-03-23Combine `ModuleConfig::embed_bitcode{,_marker}`.Nicholas Nethercote-14/+22
Because the `(true, true)` combination isn't valid.
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-4/+2
(clippy::let_and_return)
2020-03-19Remove unused `ModuleConfig::emit_lto_bc` field.Nicholas Nethercote-3/+0
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-4/+4
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-2/+2
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-04Don't use "if let" bindings to only check a value and not actually bind ↵Matthias Krüger-1/+1
anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-28simplify condition in start_executing_work()Matthias Krüger-5/+5
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-6/+6
2020-02-12Add support for new pass managerNikita Popov-0/+3
The new pass manager can be enabled using -Z new-llvm-pass-manager=on.
2020-02-10self-profile: Support arguments for generic_activities.Michael Woerister-6/+13
2020-01-23Make ExportedSymbols type more local because it's not supposed to beMichael Woerister-1/+5
used outside of the LLVM backend.
2020-01-20Make sure that all upstream generics get re-exported from Rust dylibs.Michael Woerister-2/+2
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-09Label unmarked timeJohn Kåre Alsaker-2/+7
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-1/+1
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-32/+19
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-30When a codegen worker has a FatalError, propagate it instead of ICE'ing.Felix S. Klock II-8/+18
2019-12-22Format the worldMark Rousskov-292/+275
2019-12-03Move cgu_reuse_tracker to librustc_sessionMark Rousskov-1/+1
2019-12-03Decouple CguReuseTracker from SessionMark Rousskov-1/+1
2019-12-01rustc_plugin: Remove support for plugins adding LLVM passesVadim Petrochenkov-3/+0
2019-11-22Add support for tracking origins of uninitialized memoryTomasz Miąsko-0/+4
2019-11-22Add support for sanitizer recoveryTomasz Miąsko-0/+3
2019-11-22Move sanitizer passes creation from ssa to llvmTomasz Miąsko-17/+5
2019-11-15Remove SourceMapper traitMark Rousskov-2/+3
SourceMap is now in the root of all rustc-specific crates, syntax_pos, so there's no need for the trait object to decouple the dependencies between librustc_errors and libsyntax as was needed previously.
2019-11-12Move self-profile infrastructure to data structuresMark Rousskov-1/+1
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
2019-10-27rustc, rustc_passes: don't depend on syntax_expand.Mazdak Farrokhzad-1/+1
This is done by moving some data definitions to syntax::expand.
2019-10-22self-profiling: Remove module names from some event-ids in codegen backend.Michael Woerister-6/+6
2019-10-17Rollup merge of #65465 - Centril:split-syntax-1, r=petrochenkovMazdak Farrokhzad-1/+1
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-1/+1
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-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+5
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-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-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.