mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 17:44:28 +00:00
Use `DenseBit` for `drop_live_at` in liveness tracing I noticed that `drop_live_at` only ever gets point, and never range, inserts, so I switched it over to `DenseBitSet`. This provides some nice [wins](https://perf.rust-lang.org/compare.html?start=745de6eca673de5329ec68f2689629a5ca45ab35&end=d1837740534cbf87b9fe919b7a89debf46362197&stat=instructions:u) on `serde`. However, the `add_drop_live_facts_for` function expects to receive an `IntervalSet`. I first tried to switch the type of `LiveRegions::AtPoints` from `SparseIntervalMatrix` to `SparseBitMatrix`, but that had [regressions](https://perf.rust-lang.org/compare.html?start=745de6eca673de5329ec68f2689629a5ca45ab35&end=c87f1fbff20351758b66ae945c16e061ab4ae54c&stat=instructions:u). So in this PR, I simply reconstruct an `IntervalSet` from a `DenseBitSet`. Not super pretty, but perf. looks reasonable. Let me know if this makes sense or not! :) r? jackh726