Auto merge of #97863 - JakobDegen:bitset-choice, r=nnethercote
`BitSet` related perf improvements This commit makes two changes: 1. Changes `MaybeLiveLocals` to use `ChunkedBitSet` 2. Overrides the `fold` method for the iterator for `ChunkedBitSet` I have local benchmarks verifying that each of these changes individually yield significant perf improvements to #96451 . I'm hoping this will be true outside of that context too. If that is not the case, I'll try to gate things on where they help as needed r? `@nnethercote` who I believe was working on closely related things, cc `@tmiasko` because of the destprop pr
This commit is contained in:
commit
ecdd374e61
5 changed files with 141 additions and 23 deletions
|
@ -30,14 +30,14 @@ impl MaybeLiveLocals {
|
|||
}
|
||||
|
||||
impl<'tcx> AnalysisDomain<'tcx> for MaybeLiveLocals {
|
||||
type Domain = BitSet<Local>;
|
||||
type Domain = ChunkedBitSet<Local>;
|
||||
type Direction = Backward;
|
||||
|
||||
const NAME: &'static str = "liveness";
|
||||
|
||||
fn bottom_value(&self, body: &mir::Body<'tcx>) -> Self::Domain {
|
||||
// bottom = not live
|
||||
BitSet::new_empty(body.local_decls.len())
|
||||
ChunkedBitSet::new_empty(body.local_decls.len())
|
||||
}
|
||||
|
||||
fn initialize_start_block(&self, _: &mir::Body<'tcx>, _: &mut Self::Domain) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue