about summary refs log tree commit diff
path: root/src/librustc_query_system
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-3469/+0
2020-08-15replaced log with tracingGurpreet Singh-2/+2
2020-08-14Rework `rustc_serialize`Matthew Jasper-5/+9
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-12Remove unused tcx parameterMark Rousskov-11/+8
2020-08-03Auto merge of #75055 - cjgillot:clean-cache, r=oli-obkbors-0/+63
Introduce an abstraction for EvaluationCache and SelectionCache The small duplicated code has been moved to librustc_query_system. The remaining changes are some cleanups of structural impls.
2020-08-02Introduce an abstraction for EvaluationCache and SelectionCache.Camille GILLOT-0/+63
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-16apply bootstrap cfgsMark Rousskov-1/+0
2020-06-28Remove `const_if_match` feature gate from librariesDylan MacKenzie-1/+1
2020-06-20Remove uses of `Vec::remove_item`Lukas Kalbertodt-2/+3
2020-06-10Use min_specialization in the remaining rustc cratesMatthew Jasper-4/+7
2020-06-02Rename the crates in source codeVadim Petrochenkov-2/+2
2020-06-02Make things build againVadim Petrochenkov-2/+2
2020-05-31Add descriptions for all queriesMatthew Jasper-23/+0
2020-05-14Rollup merge of #72126 - nnethercote:change-WorkProduct-saved_files, ↵Dylan DPC-2/+2
r=alexcrichton Change `WorkProduct::saved_files` to an `Option`. Because there is at most one file. r? @bjorn3
2020-05-12Change `WorkProduct::saved_files` to an `Option`.Nicholas Nethercote-2/+2
Because there is at most one file.
2020-05-11Rollup merge of #72109 - matthiaskrgr:cl8ppy, r=Dylan-DPCDylan DPC-3/+3
Fix clippy warnings Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed} r? @Dylan-DPC
2020-05-11Fix clippy warningsMatthias Krüger-3/+3
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-10use min_specialization for some rustc crates where it requires no changesRalf Jung-1/+1
2020-05-04Auto merge of #71754 - alexcrichton:no-bitcode-in-cache, r=nnethercotebors-8/+1
Don't copy bytecode files into the incr. comp. cache. It's no longer necessary now that bitcode is embedded into object files. This change meant that `WorkProductFileKind::Bytecode` is no longer necessary, which means that type is no longer necessary, which allowed several places in the code to become simpler. This commit was written by @nnethercote in https://github.com/rust-lang/rust/pull/70458 but that didn't land. In the meantime though we managed to land it in https://github.com/rust-lang/rust/pull/71528 and that doesn't seem to be causing too many fires, so I'm re-sending this patch!
2020-05-01Don't copy bytecode files into the incr. comp. cache.Nicholas Nethercote-8/+1
It's no longer necessary now that bitcode is embedded into object files. This change meant that `WorkProductFileKind::Bytecode` is no longer necessary, which means that type is no longer necessary, which allowed several places in the code to become simpler.
2020-05-01Restrict access.Camille GILLOT-1/+1
2020-05-01Inline a few things.Camille GILLOT-1/+8
2020-05-01Monomorphise the interface.Camille GILLOT-29/+72
2020-05-01Move the DepNode construction to librustc_query_system.Camille GILLOT-6/+39
2020-05-01Monomorphise try_execute_query.Camille GILLOT-43/+38
2020-05-01Monomorphise try_start.Camille GILLOT-18/+26
2020-05-01Monomorphise try_execute_anon_query.Camille GILLOT-15/+34
2020-05-01Monomorphise load_from_disk_and_cache_in_memory.Camille GILLOT-15/+42
2020-05-01Monomorphise force_query_with_job.Camille GILLOT-13/+41
2020-05-01Auto merge of #70674 - cjgillot:query-arena-all, r=matthewjasperbors-36/+142
Have the per-query caches store the results on arenas This PR leverages the cache for each query to serve as storage area for the query results. It introduces a new cache `ArenaCache`, which moves the result to an arena, and only stores the reference in the hash map. This allows to remove a sizeable part of the usage of the global `TyCtxt` arena. I only migrated queries that already used arenas before.
2020-04-29Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercotebors-1/+0
Store LLVM bitcode in object files, not compressed This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-29Store LLVM bitcode in object files, not compressedAlex Crichton-1/+0
This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-28Add inlining.Camille GILLOT-0/+2
2020-04-28Stop leaking memory.Camille GILLOT-7/+6
2020-04-28Introduce ArenaStorage.Camille GILLOT-1/+91
2020-04-28Allow the QueryCache to specify storage.Camille GILLOT-36/+51
2020-04-24Avoid unused Option::map resultsJosh Stone-1/+5
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2020-04-20Remove unused dependenciesShotaro Yamada-1/+0
2020-04-20Auto merge of #71007 - Amanieu:deprecate_asm, r=Mark-Simulacrumbors-1/+1
Deprecate the asm! macro in favor of llvm_asm! Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed. RFC: https://github.com/rust-lang/rfcs/pull/2843
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-1/+1
2020-04-15Update parking_lot dependency to avoid use of deprecated asm!Amanieu d'Antras-1/+1
2020-03-30Add inline attributes for functions used in the query systemJohn Kåre Alsaker-0/+2
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-3/+3
2020-03-27Implement HashStable directly.Camille GILLOT-5/+8
2020-03-27Cleanups.Camille GILLOT-5/+4
2020-03-27Move QueryContext to the parent module.Camille GILLOT-42/+46
2020-03-27Remove the QueryGetter trait.Camille GILLOT-88/+70
2020-03-26Don't allow access to the Session.Camille GILLOT-6/+4
2020-03-26Rename read_query_job -> current_query_job and simplify it.Camille GILLOT-20/+16