@@ -62,8 +62,7 @@ pub trait Dataflow<BD: BitDenotation> {
62
62
fn propagate ( & mut self ) ;
63
63
}
64
64
65
- impl < ' a , ' tcx : ' a , BD > Dataflow < BD > for DataflowBuilder < ' a , ' tcx , BD >
66
- where BD : BitDenotation + DataflowOperator
65
+ impl < ' a , ' tcx : ' a , BD > Dataflow < BD > for DataflowBuilder < ' a , ' tcx , BD > where BD : BitDenotation
67
66
{
68
67
fn dataflow < P > ( & mut self , p : P ) where P : Fn ( & BD , BD :: Idx ) -> & Debug {
69
68
self . flow_state . build_sets ( ) ;
@@ -104,7 +103,7 @@ pub(crate) fn do_dataflow<'a, 'tcx, BD, P>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
104
103
bd : BD ,
105
104
p : P )
106
105
-> DataflowResults < BD >
107
- where BD : BitDenotation + DataflowOperator ,
106
+ where BD : BitDenotation ,
108
107
P : Fn ( & BD , BD :: Idx ) -> & fmt:: Debug
109
108
{
110
109
let name_found = |sess : & Session , attrs : & [ ast:: Attribute ] , name| -> Option < String > {
@@ -137,15 +136,13 @@ pub(crate) fn do_dataflow<'a, 'tcx, BD, P>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
137
136
mbcx. flow_state . results ( )
138
137
}
139
138
140
- struct PropagationContext < ' b , ' a : ' b , ' tcx : ' a , O >
141
- where O : ' b + BitDenotation
139
+ struct PropagationContext < ' b , ' a : ' b , ' tcx : ' a , O > where O : ' b + BitDenotation
142
140
{
143
141
builder : & ' b mut DataflowAnalysis < ' a , ' tcx , O > ,
144
142
changed : bool ,
145
143
}
146
144
147
- impl < ' a , ' tcx : ' a , BD > DataflowAnalysis < ' a , ' tcx , BD >
148
- where BD : BitDenotation + DataflowOperator
145
+ impl < ' a , ' tcx : ' a , BD > DataflowAnalysis < ' a , ' tcx , BD > where BD : BitDenotation
149
146
{
150
147
fn propagate ( & mut self ) {
151
148
let mut temp = IdxSetBuf :: new_empty ( self . flow_state . sets . bits_per_block ) ;
@@ -189,8 +186,7 @@ impl<'a, 'tcx: 'a, BD> DataflowAnalysis<'a, 'tcx, BD>
189
186
}
190
187
}
191
188
192
- impl < ' b , ' a : ' b , ' tcx : ' a , BD > PropagationContext < ' b , ' a , ' tcx , BD >
193
- where BD : BitDenotation + DataflowOperator
189
+ impl < ' b , ' a : ' b , ' tcx : ' a , BD > PropagationContext < ' b , ' a , ' tcx , BD > where BD : BitDenotation
194
190
{
195
191
fn reset ( & mut self , bits : & mut IdxSet < BD :: Idx > ) {
196
192
let e = if BD :: bottom_value ( ) { !0 } else { 0 } ;
@@ -227,8 +223,7 @@ fn dataflow_path(context: &str, prepost: &str, path: &str) -> PathBuf {
227
223
path
228
224
}
229
225
230
- impl < ' a , ' tcx : ' a , BD > DataflowBuilder < ' a , ' tcx , BD >
231
- where BD : BitDenotation
226
+ impl < ' a , ' tcx : ' a , BD > DataflowBuilder < ' a , ' tcx , BD > where BD : BitDenotation
232
227
{
233
228
fn pre_dataflow_instrumentation < P > ( & self , p : P ) -> io:: Result < ( ) >
234
229
where P : Fn ( & BD , BD :: Idx ) -> & Debug
@@ -356,16 +351,14 @@ pub trait DataflowResultsConsumer<'a, 'tcx: 'a> {
356
351
flow_state : & mut Self :: FlowState ) ;
357
352
}
358
353
359
- pub struct DataflowAnalysis < ' a , ' tcx : ' a , O >
360
- where O : BitDenotation
354
+ pub struct DataflowAnalysis < ' a , ' tcx : ' a , O > where O : BitDenotation
361
355
{
362
356
flow_state : DataflowState < O > ,
363
357
dead_unwinds : & ' a IdxSet < mir:: BasicBlock > ,
364
358
mir : & ' a Mir < ' tcx > ,
365
359
}
366
360
367
- impl < ' a , ' tcx : ' a , O > DataflowAnalysis < ' a , ' tcx , O >
368
- where O : BitDenotation
361
+ impl < ' a , ' tcx : ' a , O > DataflowAnalysis < ' a , ' tcx , O > where O : BitDenotation
369
362
{
370
363
pub fn results ( self ) -> DataflowResults < O > {
371
364
DataflowResults ( self . flow_state )
@@ -516,7 +509,7 @@ pub trait DataflowOperator: BitwiseOperator {
516
509
fn bottom_value ( ) -> bool ;
517
510
}
518
511
519
- pub trait BitDenotation {
512
+ pub trait BitDenotation : DataflowOperator {
520
513
/// Specifies what index type is used to access the bitvector.
521
514
type Idx : Idx ;
522
515
@@ -597,8 +590,7 @@ pub trait BitDenotation {
597
590
dest_lval : & mir:: Lvalue ) ;
598
591
}
599
592
600
- impl < ' a , ' tcx : ' a , D > DataflowAnalysis < ' a , ' tcx , D >
601
- where D : BitDenotation + DataflowOperator
593
+ impl < ' a , ' tcx : ' a , D > DataflowAnalysis < ' a , ' tcx , D > where D : BitDenotation
602
594
{
603
595
pub fn new ( _tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
604
596
mir : & ' a Mir < ' tcx > ,
@@ -639,8 +631,7 @@ impl<'a, 'tcx: 'a, D> DataflowAnalysis<'a, 'tcx, D>
639
631
}
640
632
}
641
633
642
- impl < ' a , ' tcx : ' a , D > DataflowAnalysis < ' a , ' tcx , D >
643
- where D : BitDenotation + DataflowOperator
634
+ impl < ' a , ' tcx : ' a , D > DataflowAnalysis < ' a , ' tcx , D > where D : BitDenotation
644
635
{
645
636
/// Propagates the bits of `in_out` into all the successors of `bb`,
646
637
/// using bitwise operator denoted by `self.operator`.
0 commit comments