@@ -83,8 +83,6 @@ impl<'a, 'tcx> TransItem<'tcx> {
83
83
// that the incoming edges to a particular fn are from a
84
84
// particular set.
85
85
86
- self . register_reads ( ccx) ;
87
-
88
86
match * self {
89
87
TransItem :: Static ( node_id) => {
90
88
let def_id = ccx. tcx ( ) . map . local_def_id ( node_id) ;
@@ -120,46 +118,6 @@ impl<'a, 'tcx> TransItem<'tcx> {
120
118
ccx. codegen_unit( ) . name( ) ) ;
121
119
}
122
120
123
- /// If necessary, creates a subtask for trans'ing a particular item and registers reads on
124
- /// `TypeckItemBody` and `Hir`.
125
- fn register_reads ( & self , ccx : & CrateContext < ' a , ' tcx > ) {
126
- let tcx = ccx. tcx ( ) ;
127
- let def_id = match * self {
128
- TransItem :: Static ( node_id) => {
129
- tcx. map . local_def_id ( node_id)
130
- }
131
- TransItem :: Fn ( instance) => {
132
- if let Some ( node) = tcx. map . as_local_node_id ( instance. def ) {
133
- if let hir_map:: Node :: NodeItem ( _) = tcx. map . get ( node) {
134
- // This already is a "real" item
135
- instance. def
136
- } else {
137
- // Get the enclosing item and register a read on it
138
- tcx. map . get_parent_did ( node)
139
- }
140
- } else {
141
- // Translating an inlined item from another crate? Don't track anything.
142
- return ;
143
- }
144
- }
145
- TransItem :: DropGlue ( _) => {
146
- // Nothing to track for drop glue
147
- return ;
148
- }
149
- } ;
150
-
151
- tcx. dep_graph . with_task ( DepNode :: TransCrateItem ( def_id) , || {
152
- tcx. dep_graph . read ( DepNode :: Hir ( def_id) ) ;
153
-
154
- // We are going to be accessing various tables
155
- // generated by TypeckItemBody; we also assume
156
- // that the body passes type check. These tables
157
- // are not individually tracked, so just register
158
- // a read here.
159
- tcx. dep_graph . read ( DepNode :: TypeckItemBody ( def_id) ) ;
160
- } ) ;
161
- }
162
-
163
121
pub fn predefine ( & self ,
164
122
ccx : & CrateContext < ' a , ' tcx > ,
165
123
linkage : llvm:: Linkage ) {
0 commit comments