[−][src]Trait rustc_mir::dataflow::framework::GenKill
The legal operations for a transfer function in a gen/kill problem.
This abstraction exists because there are two different contexts in which we call the methods in
GenKillAnalysis. Sometimes we need to store a single transfer function that can be efficiently
applied multiple times, such as when computing the cumulative transfer function for each block.
These cases require a GenKillSet, which in turn requires two BitSets of storage. Oftentimes,
however, we only need to apply an effect once. In these cases, it is more efficient to pass the
BitSet representing the state vector directly into the *_effect methods as opposed to
building up a GenKillSet and then throwing it away.
Required methods
pub fn gen(&mut self, elem: T)[src]
Inserts elem into the state vector.
pub fn kill(&mut self, elem: T)[src]
Removes elem from the state vector.
Provided methods
pub fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)[src]
Calls gen for each element in elems.
pub fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)[src]
Calls kill for each element in elems.