@@ -55,24 +55,6 @@ pub trait DepContext: Copy {
5555 fn try_force_from_dep_node ( self , dep_node : DepNode < Self :: DepKind > ) -> bool {
5656 debug ! ( "try_force_from_dep_node({:?}) --- trying to force" , dep_node) ;
5757
58- // We must avoid ever having to call `force_from_dep_node()` for a
59- // `DepNode::codegen_unit`:
60- // Since we cannot reconstruct the query key of a `DepNode::codegen_unit`, we
61- // would always end up having to evaluate the first caller of the
62- // `codegen_unit` query that *is* reconstructible. This might very well be
63- // the `compile_codegen_unit` query, thus re-codegenning the whole CGU just
64- // to re-trigger calling the `codegen_unit` query with the right key. At
65- // that point we would already have re-done all the work we are trying to
66- // avoid doing in the first place.
67- // The solution is simple: Just explicitly call the `codegen_unit` query for
68- // each CGU, right after partitioning. This way `try_mark_green` will always
69- // hit the cache instead of having to go through `force_from_dep_node`.
70- // This assertion makes sure, we actually keep applying the solution above.
71- debug_assert ! (
72- !dep_node. kind. is_codegen_unit_query( ) ,
73- "calling force_from_dep_node() on DepKind::codegen_unit"
74- ) ;
75-
7658 let cb = self . dep_kind_info ( dep_node. kind ) ;
7759 if let Some ( f) = cb. force_from_dep_node {
7860 f ( self , dep_node) ;
@@ -136,8 +118,6 @@ pub trait DepKind: Copy + fmt::Debug + Eq + Hash + Send + Encodable<FileEncoder>
136118 /// DepKind to use to create the initial forever-red node.
137119 const RED : Self ;
138120
139- fn is_codegen_unit_query ( self ) -> bool ;
140-
141121 /// Implementation of `std::fmt::Debug` for `DepNode`.
142122 fn debug_node ( node : & DepNode < Self > , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result ;
143123
0 commit comments