about summary refs log tree commit diff
path: root/src/librustc_query_system
AgeCommit message (Collapse)AuthorLines
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
2020-03-26Add comment.Camille GILLOT-0/+2
2020-03-26Simplify generics on try_start.Camille GILLOT-5/+4
2020-03-26Move generics on QueryCache.Camille GILLOT-20/+20
2020-03-26Prune dependencies.Camille GILLOT-3/+1
2020-03-26Retire DepGraphSafe and HashStableContext.Camille GILLOT-120/+29
2020-03-26Access QueryStateShard directly.Camille GILLOT-19/+5
2020-03-26Unify key types in get_lookup.Camille GILLOT-4/+4
2020-03-26Rustfmt.Camille GILLOT-249/+239
2020-03-26Make librustc_query_system compile.Camille GILLOT-785/+54
2020-03-26Move query system to librustc_query_system.Camille GILLOT-0/+2304
2020-03-26Generalise Query starting.Camille GILLOT-1/+4
2020-03-26Decouple from DepKind.Camille GILLOT-0/+4
2020-03-23Address review.Camille GILLOT-10/+10
2020-03-23Put extract_def_id back on DepNode.Camille GILLOT-13/+0
2020-03-23Remove assert_ignored and with_ignore_deps.Camille GILLOT-10/+4
2020-03-23Merge ensure_node_can_be_forced into force_from_dep_node.Camille GILLOT-8/+3
2020-03-23Fallout in other crates.Camille GILLOT-13/+2
2020-03-23Make librustc_query_system compile.Camille GILLOT-604/+340
2020-03-23Move dep_graph to new crate librustc_query_system.Camille GILLOT-0/+2015