about summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-08-13 16:07:41 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-08-13 16:07:48 +0000
commit980143b50c627fc36ef15a2dc25f44f33cbd6bac (patch)
tree63d8762f15b5c20cd32f93605823f8150f8b8d90 /compiler/rustc_interface/src
parent4a6de8e0dd6d6bf805160fca11ed661c00a5c310 (diff)
downloadrust-980143b50c627fc36ef15a2dc25f44f33cbd6bac.tar.gz
rust-980143b50c627fc36ef15a2dc25f44f33cbd6bac.zip
Pass WorkProductMap to build_dep_graph instead of FxIndexMap
Constructing an FxIndexMap is useless work as the iteration order never
matters.
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/queries.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs
index 18d85f0746f..a20a99b611e 100644
--- a/compiler/rustc_interface/src/queries.rs
+++ b/compiler/rustc_interface/src/queries.rs
@@ -5,7 +5,6 @@ use crate::{passes, util};
 use rustc_ast as ast;
 use rustc_codegen_ssa::traits::CodegenBackend;
 use rustc_codegen_ssa::CodegenResults;
-use rustc_data_structures::fx::FxIndexMap;
 use rustc_data_structures::steal::Steal;
 use rustc_data_structures::svh::Svh;
 use rustc_data_structures::sync::{AppendOnlyIndexVec, Lrc, OnceCell, RwLock, WorkerLocal};
@@ -162,15 +161,8 @@ impl<'tcx> Queries<'tcx> {
         dep_graph_future
             .and_then(|future| {
                 let sess = self.session();
-                let (prev_graph, mut prev_work_products) =
+                let (prev_graph, prev_work_products) =
                     sess.time("blocked_on_dep_graph_loading", || future.open().open(sess));
-                // Convert from UnordMap to FxIndexMap by sorting
-                let prev_work_product_ids =
-                    prev_work_products.items().map(|x| *x.0).into_sorted_stable_ord();
-                let prev_work_products = prev_work_product_ids
-                    .into_iter()
-                    .map(|x| (x, prev_work_products.remove(&x).unwrap()))
-                    .collect::<FxIndexMap<_, _>>();
                 rustc_incremental::build_dep_graph(sess, prev_graph, prev_work_products)
             })
             .unwrap_or_else(DepGraph::new_disabled)