1313//! be taken to preserve the correctness of such implicit dataflow across all
1414//! transformations, and it's overall far more fragile than the local dataflow
1515//! of e.g. phi nodes (or their alternative "block arguments"), or in SPIR-T's
16- //! case, `ControlRegion ` inputs and `ControlNode ` outputs (inspired by RVSDG,
16+ //! case, `Region ` inputs and `Node ` outputs (inspired by RVSDG,
1717//! which has even stricter isolation/locality in its regions).
1818
1919use crate :: { FxIndexMap , FxIndexSet } ;
@@ -228,10 +228,13 @@ impl<'a, BlockId: Copy + Eq + Hash, DefId: Copy + Eq + Hash, DefType: Copy>
228228 . map ( |block_id| BlockIdx ( self . def_map . blocks_by_id . get_index_of ( & block_id) . unwrap ( ) ) ) ;
229229
230230 if self . blocks [ target_block_idx] . preds . insert ( source_block_idx) {
231- self . add_uses_to ( source_block_idx, AddUsesSource :: PropagateBackwardsAcrossEdge {
232- target : target_block_idx,
233- only_dirty : false ,
234- } ) ;
231+ self . add_uses_to (
232+ source_block_idx,
233+ AddUsesSource :: PropagateBackwardsAcrossEdge {
234+ target : target_block_idx,
235+ only_dirty : false ,
236+ } ,
237+ ) ;
235238 }
236239 }
237240
@@ -240,10 +243,13 @@ impl<'a, BlockId: Copy + Eq + Hash, DefId: Copy + Eq + Hash, DefType: Copy>
240243 for i in 0 ..self . blocks [ block_idx] . preds . len ( ) {
241244 let pred_block_idx = self . blocks [ block_idx] . preds [ i] ;
242245
243- self . add_uses_to ( pred_block_idx, AddUsesSource :: PropagateBackwardsAcrossEdge {
244- target : block_idx,
245- only_dirty : true ,
246- } ) ;
246+ self . add_uses_to (
247+ pred_block_idx,
248+ AddUsesSource :: PropagateBackwardsAcrossEdge {
249+ target : block_idx,
250+ only_dirty : true ,
251+ } ,
252+ ) ;
247253 }
248254 self . blocks [ block_idx] . dirty_chunks . clear ( ) ;
249255 }
@@ -452,6 +458,8 @@ mod data {
452458
453459 // HACK(eddyb) most of the need for this arises from avoidance of
454460 // `unsafe` code (i.e. `MaybeUninit<V>` could suffice in most cases).
461+ // FIXME(eddyb) figure out if keeping this around is useful at all.
462+ #[ allow( unused) ]
455463 pub enum WrapNonDefaultValueInOption { }
456464 impl < V > ValueStorage < V > for WrapNonDefaultValueInOption {
457465 type Slot = Option < V > ;
@@ -556,7 +564,7 @@ mod data {
556564 self . contains ( k) . then ( || self . entry ( k) . remove ( ) . unwrap ( ) )
557565 }
558566
559- pub fn keys ( & self ) -> impl Iterator < Item = K > {
567+ pub fn keys ( & self ) -> impl Iterator < Item = K > + use < K , V , VS > {
560568 let mut i = 0 ;
561569 let mut remaining = self . occupied ;
562570 iter:: from_fn ( move || {
0 commit comments