Document assumptions made in generator transform for analyses
The generator transform needs to inspect all possible dataflow states. This can be done with half the number of bitset union operations if we can assume that the relevant analyses do not use "before" effects.
This commit is contained in:
parent
def207e262
commit
dd49c6ffd1
2 changed files with 6 additions and 0 deletions
|
|
@ -99,6 +99,9 @@ impl<K> GenKillAnalysis<'tcx> for MaybeBorrowedLocals<K>
|
|||
where
|
||||
K: BorrowAnalysisKind<'tcx>,
|
||||
{
|
||||
// The generator transform relies on the fact that this analysis does **not** use "before"
|
||||
// effects.
|
||||
|
||||
fn statement_effect(
|
||||
&self,
|
||||
trans: &mut impl GenKill<Self::Idx>,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ impl dataflow::AnalysisDomain<'tcx> for MaybeInitializedLocals {
|
|||
}
|
||||
|
||||
impl dataflow::GenKillAnalysis<'tcx> for MaybeInitializedLocals {
|
||||
// The generator transform relies on the fact that this analysis does **not** use "before"
|
||||
// effects.
|
||||
|
||||
fn statement_effect(
|
||||
&self,
|
||||
trans: &mut impl GenKill<Self::Idx>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue