about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-08 02:24:55 +0000
committerbors <bors@rust-lang.org>2023-09-08 02:24:55 +0000
commit69ec43001afd14bac506c519b47f2a17595086e7 (patch)
treed95b3d5d2931b9294e14a07cdb17a996e6629d5b /compiler/rustc_mir_dataflow/src
parentfeb06732c08f5760778e3e8e56784e79ef01656b (diff)
parente54204c8e914959e8b42a7bd3531706e4a436fd6 (diff)
downloadrust-69ec43001afd14bac506c519b47f2a17595086e7.tar.gz
rust-69ec43001afd14bac506c519b47f2a17595086e7.zip
Auto merge of #115586 - Zalathar:query, r=cjgillot
coverage: Simplify the `coverageinfo` query

The `coverageinfo` query walks through a `mir::Body`'s statements to find the total number of coverage counter IDs and coverage expression IDs that have been used, as this information is needed by coverage codegen.

This PR makes 3 nice simplifications to that query:
- Extract a common iterator over coverage statements, shared by both coverage-related queries
- Simplify the query's visitor from two passes to just one pass
- Explicitly track the highest seen IDs in the visitor, and only convert to a count right at the end

I also updated some related comments. Some had been invalidated by these changes, while others had already been invalidated by previous coverage changes.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src')
0 files changed, 0 insertions, 0 deletions