Skip to content

Commit ec0e4bb

Browse files
committed
Auto merge of #51538 - nikomatsakis:nll-perf-examination, r=<try>
[WIP] Convert NLL ops to caches This is a extension of <#51460>. It uses a lot more caching than we used to do. This caching is not yet as efficient as it could be, but I'm curious to see the current perf results.
2 parents b7c6e8f + 9e67309 commit ec0e4bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2972
-1694
lines changed

src/Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,7 @@ dependencies = [
17811781
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
17821782
"byteorder 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
17831783
"chalk-engine 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
1784+
"either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
17841785
"flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
17851786
"fmt_macros 0.0.0",
17861787
"graphviz 0.0.0",

src/librustc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ crate-type = ["dylib"]
1111
[dependencies]
1212
arena = { path = "../libarena" }
1313
bitflags = "1.0"
14+
either = "1.5.0"
1415
fmt_macros = { path = "../libfmt_macros" }
1516
graphviz = { path = "../libgraphviz" }
1617
jobserver = "0.1"

src/librustc/dep_graph/dep_node.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ use rustc_data_structures::stable_hasher::{StableHasher, HashStable};
7070
use std::fmt;
7171
use std::hash::Hash;
7272
use syntax_pos::symbol::InternedString;
73-
use traits::query::{CanonicalProjectionGoal,
74-
CanonicalTyGoal, CanonicalPredicateGoal};
75-
use ty::{TyCtxt, Instance, InstanceDef, ParamEnv, ParamEnvAnd, PolyTraitRef, Ty};
73+
use traits::query::{
74+
CanonicalProjectionGoal, CanonicalTyGoal, CanonicalTypeOpEqGoal, CanonicalTypeOpSubtypeGoal,
75+
CanonicalPredicateGoal, CanonicalTypeOpProvePredicateGoal, CanonicalTypeOpNormalizeGoal,
76+
};
77+
use ty::{TyCtxt, FnSig, Instance, InstanceDef,
78+
ParamEnv, ParamEnvAnd, Predicate, PolyFnSig, PolyTraitRef, Ty};
7679
use ty::subst::Substs;
7780

7881
// erase!() just makes tokens go away. It's used to specify which macro argument
@@ -647,6 +650,13 @@ define_dep_nodes!( <'tcx>
647650
[] NormalizeTyAfterErasingRegions(ParamEnvAnd<'tcx, Ty<'tcx>>),
648651
[] DropckOutlives(CanonicalTyGoal<'tcx>),
649652
[] EvaluateObligation(CanonicalPredicateGoal<'tcx>),
653+
[] TypeOpEq(CanonicalTypeOpEqGoal<'tcx>),
654+
[] TypeOpSubtype(CanonicalTypeOpSubtypeGoal<'tcx>),
655+
[] TypeOpProvePredicate(CanonicalTypeOpProvePredicateGoal<'tcx>),
656+
[] TypeOpNormalizeTy(CanonicalTypeOpNormalizeGoal<'tcx, Ty<'tcx>>),
657+
[] TypeOpNormalizePredicate(CanonicalTypeOpNormalizeGoal<'tcx, Predicate<'tcx>>),
658+
[] TypeOpNormalizePolyFnSig(CanonicalTypeOpNormalizeGoal<'tcx, PolyFnSig<'tcx>>),
659+
[] TypeOpNormalizeFnSig(CanonicalTypeOpNormalizeGoal<'tcx, FnSig<'tcx>>),
650660

651661
[] SubstituteNormalizeAndTestPredicates { key: (DefId, &'tcx Substs<'tcx>) },
652662

0 commit comments

Comments
 (0)