about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/errors.rs
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-02-13 17:46:11 -0800
committerGitHub <noreply@github.com>2025-02-13 17:46:11 -0800
commitd82ec9508364f2041d039368c03b800745166dc8 (patch)
treea08e8cbeff5e2de5846a6dd07a8f1be5fbbe2cc4 /compiler/rustc_mir_transform/src/errors.rs
parent82110ca740936c4203193df76a39670c9d04321a (diff)
parentab786d3b98d640b1208eff371c1184e3e8ce1d17 (diff)
downloadrust-d82ec9508364f2041d039368c03b800745166dc8.tar.gz
rust-d82ec9508364f2041d039368c03b800745166dc8.zip
Rollup merge of #136957 - Zalathar:counters, r=oli-obk
coverage: Eliminate more counters by giving them to unreachable nodes

When preparing a function's coverage counters and metadata during codegen, any part of the original coverage graph that was removed by MIR optimizations can be treated as having an execution count of zero.

Somewhat counter-intuitively, if we give those unreachable nodes a _higher_ priority for receiving physical counters (instead of counter expressions), that ends up reducing the total number of physical counters needed.

This works because if a node is unreachable, we don't actually create a physical counter for it. Instead that node gets a fixed zero counter, and any other node that would have relied on that physical counter in its counter expression can just ignore that term completely.
Diffstat (limited to 'compiler/rustc_mir_transform/src/errors.rs')
0 files changed, 0 insertions, 0 deletions