rust/compiler/rustc_mir_transform/src/coverage
Zalathar 229d0983b5 coverage: Simplify the loop that combines blocks into BCBs
The old loop had two separate places where it would flush the acumulated list
of straight-line blocks into a new BCB. One occurred at the start of the loop
body when the current block couldn't be chained into, and the other occurred at
the end of the loop body when the current block couldn't be chained from.

The latter check can be hoisted to the start of the loop body by making it
examine the previous block (which has added itself to the list) instead of the
current block. With that done, we can combine the two separate flushes into one
flush with two possible trigger conditions.
2024-01-14 12:11:25 +11:00
..
spans coverage: Split out SpanFromMir from CoverageSpan 2024-01-05 12:53:23 +11:00
counters.rs coverage: Make coverage_counters a local variable 2023-12-30 22:36:11 +11:00
graph.rs coverage: Simplify the loop that combines blocks into BCBs 2024-01-14 12:11:25 +11:00
mod.rs coverage: Add enums to accommodate other kinds of coverage mappings 2024-01-11 16:43:12 +11:00
query.rs remove redundant imports 2023-12-10 10:56:22 +08:00
spans.rs coverage: Add enums to accommodate other kinds of coverage mappings 2024-01-11 16:43:12 +11:00
tests.rs coverage: Make coverage_counters a local variable 2023-12-30 22:36:11 +11:00