@@ -129,7 +129,6 @@ struct PlacedRootMonoItems<'tcx> {
129129 /// The codegen units, sorted by name to make things deterministic.
130130 codegen_units : Vec < CodegenUnit < ' tcx > > ,
131131
132- roots : FxHashSet < MonoItem < ' tcx > > ,
133132 internalization_candidates : FxHashSet < MonoItem < ' tcx > > ,
134133}
135134
@@ -150,7 +149,7 @@ where
150149 // In the first step, we place all regular monomorphizations into their
151150 // respective 'home' codegen unit. Regular monomorphizations are all
152151 // 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 } = {
154153 let _prof_timer = tcx. prof . generic_activity ( "cgu_partitioning_place_roots" ) ;
155154 place_root_mono_items ( cx, mono_items)
156155 } ;
@@ -176,7 +175,7 @@ where
176175 // local functions the definition of which is marked with `#[inline]`.
177176 let mono_item_placements = {
178177 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)
180179 } ;
181180
182181 for cgu in & mut codegen_units {
@@ -244,7 +243,6 @@ fn place_root_mono_items<'tcx, I>(
244243where
245244 I : Iterator < Item = MonoItem < ' tcx > > ,
246245{
247- let mut roots = FxHashSet :: default ( ) ;
248246 let mut codegen_units = FxHashMap :: default ( ) ;
249247 let is_incremental_build = cx. tcx . sess . opts . incremental . is_some ( ) ;
250248 let mut internalization_candidates = FxHashSet :: default ( ) ;
@@ -295,7 +293,6 @@ where
295293 }
296294
297295 codegen_unit. items_mut ( ) . insert ( mono_item, ( linkage, visibility) ) ;
298- roots. insert ( mono_item) ;
299296 }
300297
301298 // Always ensure we have at least one CGU; otherwise, if we have a
@@ -308,7 +305,7 @@ where
308305 let mut codegen_units: Vec < _ > = codegen_units. into_values ( ) . collect ( ) ;
309306 codegen_units. sort_by ( |a, b| a. name ( ) . as_str ( ) . cmp ( b. name ( ) . as_str ( ) ) ) ;
310307
311- PlacedRootMonoItems { codegen_units, roots , internalization_candidates }
308+ PlacedRootMonoItems { codegen_units, internalization_candidates }
312309}
313310
314311// This function requires the CGUs to be sorted by name on input, and ensures
@@ -416,7 +413,6 @@ enum MonoItemPlacement {
416413fn place_inlined_mono_items < ' tcx > (
417414 cx : & PartitioningCx < ' _ , ' tcx > ,
418415 codegen_units : & mut [ CodegenUnit < ' tcx > ] ,
419- _roots : FxHashSet < MonoItem < ' tcx > > ,
420416) -> FxHashMap < MonoItem < ' tcx > , MonoItemPlacement > {
421417 for cgu in codegen_units. iter_mut ( ) {
422418 // Collect all inlined items that need to be available in this codegen unit.
0 commit comments