@@ -129,7 +129,6 @@ struct PlacedRootMonoItems<'tcx> {
129
129
/// The codegen units, sorted by name to make things deterministic.
130
130
codegen_units : Vec < CodegenUnit < ' tcx > > ,
131
131
132
- roots : FxHashSet < MonoItem < ' tcx > > ,
133
132
internalization_candidates : FxHashSet < MonoItem < ' tcx > > ,
134
133
}
135
134
@@ -150,7 +149,7 @@ where
150
149
// In the first step, we place all regular monomorphizations into their
151
150
// respective 'home' codegen unit. Regular monomorphizations are all
152
151
// functions and statics defined in the local crate.
153
- let PlacedRootMonoItems { mut codegen_units, roots , internalization_candidates } = {
152
+ let PlacedRootMonoItems { mut codegen_units, internalization_candidates } = {
154
153
let _prof_timer = tcx. prof . generic_activity ( "cgu_partitioning_place_roots" ) ;
155
154
place_root_mono_items ( cx, mono_items)
156
155
} ;
@@ -176,7 +175,7 @@ where
176
175
// local functions the definition of which is marked with `#[inline]`.
177
176
let mono_item_placements = {
178
177
let _prof_timer = tcx. prof . generic_activity ( "cgu_partitioning_place_inline_items" ) ;
179
- place_inlined_mono_items ( cx, & mut codegen_units, roots )
178
+ place_inlined_mono_items ( cx, & mut codegen_units)
180
179
} ;
181
180
182
181
for cgu in & mut codegen_units {
@@ -244,7 +243,6 @@ fn place_root_mono_items<'tcx, I>(
244
243
where
245
244
I : Iterator < Item = MonoItem < ' tcx > > ,
246
245
{
247
- let mut roots = FxHashSet :: default ( ) ;
248
246
let mut codegen_units = FxHashMap :: default ( ) ;
249
247
let is_incremental_build = cx. tcx . sess . opts . incremental . is_some ( ) ;
250
248
let mut internalization_candidates = FxHashSet :: default ( ) ;
@@ -295,7 +293,6 @@ where
295
293
}
296
294
297
295
codegen_unit. items_mut ( ) . insert ( mono_item, ( linkage, visibility) ) ;
298
- roots. insert ( mono_item) ;
299
296
}
300
297
301
298
// Always ensure we have at least one CGU; otherwise, if we have a
@@ -308,7 +305,7 @@ where
308
305
let mut codegen_units: Vec < _ > = codegen_units. into_values ( ) . collect ( ) ;
309
306
codegen_units. sort_by ( |a, b| a. name ( ) . as_str ( ) . cmp ( b. name ( ) . as_str ( ) ) ) ;
310
307
311
- PlacedRootMonoItems { codegen_units, roots , internalization_candidates }
308
+ PlacedRootMonoItems { codegen_units, internalization_candidates }
312
309
}
313
310
314
311
// This function requires the CGUs to be sorted by name on input, and ensures
@@ -416,7 +413,6 @@ enum MonoItemPlacement {
416
413
fn place_inlined_mono_items < ' tcx > (
417
414
cx : & PartitioningCx < ' _ , ' tcx > ,
418
415
codegen_units : & mut [ CodegenUnit < ' tcx > ] ,
419
- _roots : FxHashSet < MonoItem < ' tcx > > ,
420
416
) -> FxHashMap < MonoItem < ' tcx > , MonoItemPlacement > {
421
417
for cgu in codegen_units. iter_mut ( ) {
422
418
// Collect all inlined items that need to be available in this codegen unit.
0 commit comments