coverage: Don't create counters for code that was removed by MIR opts

This commit is contained in:
Zalathar 2025-01-25 18:24:02 +11:00
parent 20d051ec87
commit bf1f254b13
10 changed files with 103 additions and 134 deletions

View file

@ -80,28 +80,30 @@ fn make_node_flow_priority_list(
pub(crate) fn transcribe_counters( pub(crate) fn transcribe_counters(
old: &NodeCounters<BasicCoverageBlock>, old: &NodeCounters<BasicCoverageBlock>,
bcb_needs_counter: &DenseBitSet<BasicCoverageBlock>, bcb_needs_counter: &DenseBitSet<BasicCoverageBlock>,
bcbs_seen: &DenseBitSet<BasicCoverageBlock>,
) -> CoverageCounters { ) -> CoverageCounters {
let mut new = CoverageCounters::with_num_bcbs(bcb_needs_counter.domain_size()); let mut new = CoverageCounters::with_num_bcbs(bcb_needs_counter.domain_size());
for bcb in bcb_needs_counter.iter() { for bcb in bcb_needs_counter.iter() {
if !bcbs_seen.contains(bcb) {
// This BCB's code was removed by MIR opts, so its counter is always zero.
new.set_node_counter(bcb, CovTerm::Zero);
continue;
}
// Our counter-creation algorithm doesn't guarantee that a node's list // Our counter-creation algorithm doesn't guarantee that a node's list
// of terms starts or ends with a positive term, so partition the // of terms starts or ends with a positive term, so partition the
// counters into "positive" and "negative" lists for easier handling. // counters into "positive" and "negative" lists for easier handling.
let (mut pos, mut neg): (Vec<_>, Vec<_>) = let (mut pos, mut neg): (Vec<_>, Vec<_>) = old.counter_terms[bcb]
old.counter_terms[bcb].iter().partition_map(|&CounterTerm { node, op }| match op { .iter()
// Filter out any BCBs that were removed by MIR opts;
// this treats them as having an execution count of 0.
.filter(|term| bcbs_seen.contains(term.node))
.partition_map(|&CounterTerm { node, op }| match op {
Op::Add => Either::Left(node), Op::Add => Either::Left(node),
Op::Subtract => Either::Right(node), Op::Subtract => Either::Right(node),
}); });
if pos.is_empty() {
// If we somehow end up with no positive terms, fall back to
// creating a physical counter. There's no known way for this
// to happen, but we can avoid an ICE if it does.
debug_assert!(false, "{bcb:?} has no positive counter terms");
pos = vec![bcb];
neg = vec![];
}
// These intermediate sorts are not strictly necessary, but were helpful // These intermediate sorts are not strictly necessary, but were helpful
// in reducing churn when switching to the current counter-creation scheme. // in reducing churn when switching to the current counter-creation scheme.
// They also help to slightly decrease the overall size of the expression // They also help to slightly decrease the overall size of the expression
@ -119,7 +121,7 @@ pub(crate) fn transcribe_counters(
pos.sort(); pos.sort();
neg.sort(); neg.sort();
let pos_counter = new.make_sum(&pos).expect("`pos` should not be empty"); let pos_counter = new.make_sum(&pos).unwrap_or(CovTerm::Zero);
let new_counter = new.make_subtracted_sum(pos_counter, &neg); let new_counter = new.make_subtracted_sum(pos_counter, &neg);
new.set_node_counter(bcb, new_counter); new.set_node_counter(bcb, new_counter);
} }

View file

@ -127,8 +127,12 @@ fn coverage_ids_info<'tcx>(
} }
} }
// FIXME(Zalathar): It should be possible to sort `priority_list[1..]` by
// `!bcbs_seen.contains(bcb)` to simplify the mappings even further, at the
// expense of some churn in the tests. When doing so, also consider removing
// the sorts in `transcribe_counters`.
let node_counters = make_node_counters(&fn_cov_info.node_flow_data, &fn_cov_info.priority_list); let node_counters = make_node_counters(&fn_cov_info.node_flow_data, &fn_cov_info.priority_list);
let coverage_counters = transcribe_counters(&node_counters, &bcb_needs_counter); let coverage_counters = transcribe_counters(&node_counters, &bcb_needs_counter, &bcbs_seen);
let mut counters_seen = DenseBitSet::new_empty(coverage_counters.node_counters.len()); let mut counters_seen = DenseBitSet::new_empty(coverage_counters.node_counters.len());
let mut expressions_seen = DenseBitSet::new_filled(coverage_counters.expressions.len()); let mut expressions_seen = DenseBitSet::new_filled(coverage_counters.expressions.len());

View file

@ -1,15 +1,13 @@
Function name: assert_not::main Function name: assert_not::main
Raw bytes (31): 0x[01, 01, 01, 0d, 00, 05, 01, 06, 01, 01, 12, 05, 02, 05, 00, 14, 09, 01, 05, 00, 14, 0d, 01, 05, 00, 16, 02, 01, 01, 00, 02] Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 01, 12, 05, 02, 05, 00, 14, 09, 01, 05, 00, 14, 0d, 01, 05, 00, 16, 0d, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(3), rhs = Zero
Number of file 0 mappings: 5 Number of file 0 mappings: 5
- Code(Counter(0)) at (prev + 6, 1) to (start + 1, 18) - Code(Counter(0)) at (prev + 6, 1) to (start + 1, 18)
- Code(Counter(1)) at (prev + 2, 5) to (start + 0, 20) - Code(Counter(1)) at (prev + 2, 5) to (start + 0, 20)
- Code(Counter(2)) at (prev + 1, 5) to (start + 0, 20) - Code(Counter(2)) at (prev + 1, 5) to (start + 0, 20)
- Code(Counter(3)) at (prev + 1, 5) to (start + 0, 22) - Code(Counter(3)) at (prev + 1, 5) to (start + 0, 22)
- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) - Code(Counter(3)) at (prev + 1, 1) to (start + 0, 2)
= (c3 - Zero)
Highest counter ID seen: c3 Highest counter ID seen: c3

View file

@ -9,15 +9,13 @@ Number of file 0 mappings: 2
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: bad_counter_ids::eq_bad_message Function name: bad_counter_ids::eq_bad_message
Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 29, 01, 02, 0f, 02, 02, 20, 00, 2b, 00, 01, 01, 00, 02] Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 02, 0f, 01, 02, 20, 00, 2b, 00, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 3 Number of file 0 mappings: 3
- Code(Counter(0)) at (prev + 41, 1) to (start + 2, 15) - Code(Counter(0)) at (prev + 41, 1) to (start + 2, 15)
- Code(Expression(0, Sub)) at (prev + 2, 32) to (start + 0, 43) - Code(Counter(0)) at (prev + 2, 32) to (start + 0, 43)
= (c0 - Zero)
- Code(Zero) at (prev + 1, 1) to (start + 0, 2) - Code(Zero) at (prev + 1, 1) to (start + 0, 2)
Highest counter ID seen: c0 Highest counter ID seen: c0
@ -64,27 +62,23 @@ Number of file 0 mappings: 3
Highest counter ID seen: c1 Highest counter ID seen: c1
Function name: bad_counter_ids::ne_good Function name: bad_counter_ids::ne_good
Raw bytes (16): 0x[01, 01, 01, 01, 00, 02, 01, 1a, 01, 02, 1f, 02, 03, 01, 00, 02] Raw bytes (14): 0x[01, 01, 00, 02, 01, 1a, 01, 02, 1f, 01, 03, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 2 Number of file 0 mappings: 2
- Code(Counter(0)) at (prev + 26, 1) to (start + 2, 31) - Code(Counter(0)) at (prev + 26, 1) to (start + 2, 31)
- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2)
= (c0 - Zero)
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: bad_counter_ids::ne_good_message Function name: bad_counter_ids::ne_good_message
Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 1f, 01, 02, 0f, 00, 02, 20, 00, 2b, 02, 01, 01, 00, 02] Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 01, 02, 0f, 00, 02, 20, 00, 2b, 01, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 3 Number of file 0 mappings: 3
- Code(Counter(0)) at (prev + 31, 1) to (start + 2, 15) - Code(Counter(0)) at (prev + 31, 1) to (start + 2, 15)
- Code(Zero) at (prev + 2, 32) to (start + 0, 43) - Code(Zero) at (prev + 2, 32) to (start + 0, 43)
- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
= (c0 - Zero)
Highest counter ID seen: c0 Highest counter ID seen: c0

View file

@ -8,44 +8,38 @@ Number of file 0 mappings: 1
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: fn_sig_into_try::b Function name: fn_sig_into_try::b
Raw bytes (26): 0x[01, 01, 01, 01, 00, 04, 01, 11, 01, 03, 0f, 00, 03, 0f, 00, 10, 02, 01, 05, 00, 0c, 01, 01, 01, 00, 02] Raw bytes (24): 0x[01, 01, 00, 04, 01, 11, 01, 03, 0f, 00, 03, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 17, 1) to (start + 3, 15) - Code(Counter(0)) at (prev + 17, 1) to (start + 3, 15)
- Code(Zero) at (prev + 3, 15) to (start + 0, 16) - Code(Zero) at (prev + 3, 15) to (start + 0, 16)
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12)
= (c0 - Zero)
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: fn_sig_into_try::c Function name: fn_sig_into_try::c
Raw bytes (26): 0x[01, 01, 01, 01, 00, 04, 01, 18, 01, 03, 17, 00, 03, 17, 00, 18, 02, 01, 05, 00, 0c, 01, 01, 01, 00, 02] Raw bytes (24): 0x[01, 01, 00, 04, 01, 18, 01, 03, 17, 00, 03, 17, 00, 18, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 24, 1) to (start + 3, 23) - Code(Counter(0)) at (prev + 24, 1) to (start + 3, 23)
- Code(Zero) at (prev + 3, 23) to (start + 0, 24) - Code(Zero) at (prev + 3, 23) to (start + 0, 24)
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12)
= (c0 - Zero)
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: fn_sig_into_try::d Function name: fn_sig_into_try::d
Raw bytes (26): 0x[01, 01, 01, 01, 00, 04, 01, 1f, 01, 04, 0f, 00, 04, 0f, 00, 10, 02, 01, 05, 00, 0c, 01, 01, 01, 00, 02] Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 01, 04, 0f, 00, 04, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 4 Number of file 0 mappings: 4
- Code(Counter(0)) at (prev + 31, 1) to (start + 4, 15) - Code(Counter(0)) at (prev + 31, 1) to (start + 4, 15)
- Code(Zero) at (prev + 4, 15) to (start + 0, 16) - Code(Zero) at (prev + 4, 15) to (start + 0, 16)
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 12)
= (c0 - Zero)
- Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2) - Code(Counter(0)) at (prev + 1, 1) to (start + 0, 2)
Highest counter ID seen: c0 Highest counter ID seen: c0

View file

@ -32,16 +32,13 @@ Number of file 0 mappings: 2
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: inline_dead::main::{closure#0} Function name: inline_dead::main::{closure#0}
Raw bytes (23): 0x[01, 01, 02, 07, 00, 01, 00, 03, 01, 07, 17, 01, 16, 00, 01, 17, 00, 18, 02, 01, 05, 00, 06] Raw bytes (19): 0x[01, 01, 00, 03, 01, 07, 17, 01, 16, 00, 01, 17, 00, 18, 01, 01, 05, 00, 06]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 2 Number of expressions: 0
- expression 0 operands: lhs = Expression(1, Add), rhs = Zero
- expression 1 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 3 Number of file 0 mappings: 3
- Code(Counter(0)) at (prev + 7, 23) to (start + 1, 22) - Code(Counter(0)) at (prev + 7, 23) to (start + 1, 22)
- Code(Zero) at (prev + 1, 23) to (start + 0, 24) - Code(Zero) at (prev + 1, 23) to (start + 0, 24)
- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
= ((c0 + Zero) - Zero)
Highest counter ID seen: c0 Highest counter ID seen: c0

View file

@ -59,10 +59,10 @@ Number of file 0 mappings: 1
Highest counter ID seen: c0 Highest counter ID seen: c0
Function name: issue_84561::test3 Function name: issue_84561::test3
Raw bytes (317): 0x[01, 01, 1c, 1d, 21, 25, 29, 21, 25, 2d, 31, 21, 17, 25, 2d, 41, 45, 49, 4d, 51, 55, 33, 51, 49, 4d, 33, 37, 49, 4d, 51, 59, 55, 59, 55, 59, 47, 5d, 55, 59, 61, 65, 71, 75, 69, 6d, 69, 6d, 69, 5f, 6d, 00, 67, 79, 71, 75, 79, 7d, 7d, 81, 01, 33, 01, 08, 01, 03, 1c, 05, 04, 09, 01, 1c, 09, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 11, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 19, 02, 05, 00, 1f, 1d, 01, 05, 00, 0f, 02, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 29, 00, 33, 00, 41, 06, 00, 4b, 00, 5a, 0a, 01, 05, 00, 0f, 2d, 05, 09, 03, 10, 31, 05, 0d, 00, 1b, 0e, 02, 0d, 00, 1c, 12, 04, 09, 05, 06, 35, 06, 05, 03, 06, 39, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 41, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 1a, 05, 09, 03, 0a, 33, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 22, 03, 0d, 00, 1d, 26, 03, 09, 00, 13, 2e, 03, 0d, 00, 1d, 47, 03, 05, 00, 0f, 47, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 42, 02, 0d, 00, 13, 61, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 4a, 02, 0d, 00, 13, 67, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 71, 04, 0d, 00, 13, 56, 02, 0d, 00, 17, 56, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 5a, 02, 15, 00, 1b, 75, 04, 0d, 00, 13, 62, 03, 09, 00, 19, 79, 02, 05, 00, 0f, 6a, 03, 09, 00, 22, 7d, 02, 05, 00, 0f, 6e, 03, 09, 00, 2c, 81, 01, 02, 01, 00, 02] Raw bytes (315): 0x[01, 01, 1b, 1d, 21, 25, 29, 21, 25, 2d, 31, 21, 17, 25, 2d, 41, 45, 49, 4d, 51, 55, 33, 51, 49, 4d, 33, 37, 49, 4d, 51, 59, 55, 59, 55, 59, 47, 5d, 55, 59, 61, 65, 71, 75, 69, 6d, 69, 6d, 69, 6d, 63, 79, 71, 75, 79, 7d, 7d, 81, 01, 33, 01, 08, 01, 03, 1c, 05, 04, 09, 01, 1c, 09, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 11, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 19, 02, 05, 00, 1f, 1d, 01, 05, 00, 0f, 02, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 25, 03, 20, 00, 30, 29, 00, 33, 00, 41, 06, 00, 4b, 00, 5a, 0a, 01, 05, 00, 0f, 2d, 05, 09, 03, 10, 31, 05, 0d, 00, 1b, 0e, 02, 0d, 00, 1c, 12, 04, 09, 05, 06, 35, 06, 05, 03, 06, 39, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 41, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 1a, 05, 09, 03, 0a, 33, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 22, 03, 0d, 00, 1d, 26, 03, 09, 00, 13, 2e, 03, 0d, 00, 1d, 47, 03, 05, 00, 0f, 47, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 42, 02, 0d, 00, 13, 61, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 4a, 02, 0d, 00, 13, 63, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 71, 04, 0d, 00, 13, 5a, 02, 0d, 00, 17, 5a, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 5a, 02, 15, 00, 1b, 75, 04, 0d, 00, 13, 5e, 03, 09, 00, 19, 79, 02, 05, 00, 0f, 66, 03, 09, 00, 22, 7d, 02, 05, 00, 0f, 6a, 03, 09, 00, 2c, 81, 01, 02, 01, 00, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 28 Number of expressions: 27
- expression 0 operands: lhs = Counter(7), rhs = Counter(8) - expression 0 operands: lhs = Counter(7), rhs = Counter(8)
- expression 1 operands: lhs = Counter(9), rhs = Counter(10) - expression 1 operands: lhs = Counter(9), rhs = Counter(10)
- expression 2 operands: lhs = Counter(8), rhs = Counter(9) - expression 2 operands: lhs = Counter(8), rhs = Counter(9)
@ -85,12 +85,11 @@ Number of expressions: 28
- expression 19 operands: lhs = Counter(28), rhs = Counter(29) - expression 19 operands: lhs = Counter(28), rhs = Counter(29)
- expression 20 operands: lhs = Counter(26), rhs = Counter(27) - expression 20 operands: lhs = Counter(26), rhs = Counter(27)
- expression 21 operands: lhs = Counter(26), rhs = Counter(27) - expression 21 operands: lhs = Counter(26), rhs = Counter(27)
- expression 22 operands: lhs = Counter(26), rhs = Expression(23, Add) - expression 22 operands: lhs = Counter(26), rhs = Counter(27)
- expression 23 operands: lhs = Counter(27), rhs = Zero - expression 23 operands: lhs = Expression(24, Add), rhs = Counter(30)
- expression 24 operands: lhs = Expression(25, Add), rhs = Counter(30) - expression 24 operands: lhs = Counter(28), rhs = Counter(29)
- expression 25 operands: lhs = Counter(28), rhs = Counter(29) - expression 25 operands: lhs = Counter(30), rhs = Counter(31)
- expression 26 operands: lhs = Counter(30), rhs = Counter(31) - expression 26 operands: lhs = Counter(31), rhs = Counter(32)
- expression 27 operands: lhs = Counter(31), rhs = Counter(32)
Number of file 0 mappings: 51 Number of file 0 mappings: 51
- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 28) - Code(Counter(0)) at (prev + 8, 1) to (start + 3, 28)
- Code(Counter(1)) at (prev + 4, 9) to (start + 1, 28) - Code(Counter(1)) at (prev + 4, 9) to (start + 1, 28)
@ -142,26 +141,26 @@ Number of file 0 mappings: 51
- Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19) - Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19)
- Code(Expression(18, Sub)) at (prev + 2, 13) to (start + 0, 19) - Code(Expression(18, Sub)) at (prev + 2, 13) to (start + 0, 19)
= (c24 - c25) = (c24 - c25)
- Code(Expression(25, Add)) at (prev + 3, 5) to (start + 0, 15) - Code(Expression(24, Add)) at (prev + 3, 5) to (start + 0, 15)
= (c28 + c29) = (c28 + c29)
- Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19) - Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19)
- Code(Counter(27)) at (prev + 1, 13) to (start + 3, 14) - Code(Counter(27)) at (prev + 1, 13) to (start + 3, 14)
- Code(Counter(28)) at (prev + 4, 13) to (start + 0, 19) - Code(Counter(28)) at (prev + 4, 13) to (start + 0, 19)
- Code(Expression(21, Sub)) at (prev + 2, 13) to (start + 0, 23) - Code(Expression(22, Sub)) at (prev + 2, 13) to (start + 0, 23)
= (c26 - c27) = (c26 - c27)
- Code(Expression(21, Sub)) at (prev + 1, 20) to (start + 0, 27) - Code(Expression(22, Sub)) at (prev + 1, 20) to (start + 0, 27)
= (c26 - c27) = (c26 - c27)
- Code(Zero) at (prev + 1, 21) to (start + 0, 27) - Code(Zero) at (prev + 1, 21) to (start + 0, 27)
- Code(Expression(22, Sub)) at (prev + 2, 21) to (start + 0, 27) - Code(Expression(22, Sub)) at (prev + 2, 21) to (start + 0, 27)
= (c26 - (c27 + Zero)) = (c26 - c27)
- Code(Counter(29)) at (prev + 4, 13) to (start + 0, 19) - Code(Counter(29)) at (prev + 4, 13) to (start + 0, 19)
- Code(Expression(24, Sub)) at (prev + 3, 9) to (start + 0, 25) - Code(Expression(23, Sub)) at (prev + 3, 9) to (start + 0, 25)
= ((c28 + c29) - c30) = ((c28 + c29) - c30)
- Code(Counter(30)) at (prev + 2, 5) to (start + 0, 15) - Code(Counter(30)) at (prev + 2, 5) to (start + 0, 15)
- Code(Expression(26, Sub)) at (prev + 3, 9) to (start + 0, 34) - Code(Expression(25, Sub)) at (prev + 3, 9) to (start + 0, 34)
= (c30 - c31) = (c30 - c31)
- Code(Counter(31)) at (prev + 2, 5) to (start + 0, 15) - Code(Counter(31)) at (prev + 2, 5) to (start + 0, 15)
- Code(Expression(27, Sub)) at (prev + 3, 9) to (start + 0, 44) - Code(Expression(26, Sub)) at (prev + 3, 9) to (start + 0, 44)
= (c31 - c32) = (c31 - c32)
- Code(Counter(32)) at (prev + 2, 1) to (start + 0, 2) - Code(Counter(32)) at (prev + 2, 1) to (start + 0, 2)
Highest counter ID seen: c32 Highest counter ID seen: c32

View file

@ -1,85 +1,70 @@
Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
Raw bytes (116): 0x[01, 01, 06, 05, 00, 1d, 00, 0f, 13, 01, 19, 11, 15, 15, 19, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0d, 00, 0e, 05, 01, 0d, 00, 1e, 11, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 19, 03, 0d, 00, 0e, 15, 00, 12, 00, 17, 19, 01, 10, 00, 14, 1d, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 06, 01, 11, 00, 12, 1d, 01, 11, 00, 22, 0a, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 16, 03, 09, 00, 0f, 01, 01, 05, 00, 06] Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 11, 09, 0d, 0d, 11, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 05, 01, 0d, 00, 0e, 05, 01, 0d, 00, 1e, 09, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 11, 03, 0d, 00, 0e, 0d, 00, 12, 00, 17, 11, 01, 10, 00, 14, 15, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 15, 01, 11, 00, 12, 15, 01, 11, 00, 22, 02, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 6 Number of expressions: 4
- expression 0 operands: lhs = Counter(1), rhs = Zero - expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
- expression 1 operands: lhs = Counter(7), rhs = Zero - expression 1 operands: lhs = Counter(0), rhs = Counter(4)
- expression 2 operands: lhs = Expression(3, Add), rhs = Expression(4, Add) - expression 2 operands: lhs = Counter(2), rhs = Counter(3)
- expression 3 operands: lhs = Counter(0), rhs = Counter(6) - expression 3 operands: lhs = Counter(3), rhs = Counter(4)
- expression 4 operands: lhs = Counter(4), rhs = Counter(5)
- expression 5 operands: lhs = Counter(5), rhs = Counter(6)
Number of file 0 mappings: 20 Number of file 0 mappings: 20
- Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16) - Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16)
- Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21) - Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21)
- Code(Zero) at (prev + 1, 23) to (start + 0, 27) - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
- Code(Zero) at (prev + 0, 28) to (start + 0, 30) - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(1)) at (prev + 1, 13) to (start + 0, 14)
= (c1 - Zero)
- Code(Counter(1)) at (prev + 1, 13) to (start + 0, 30) - Code(Counter(1)) at (prev + 1, 13) to (start + 0, 30)
- Code(Counter(4)) at (prev + 0, 30) to (start + 0, 31) - Code(Counter(2)) at (prev + 0, 30) to (start + 0, 31)
- Code(Zero) at (prev + 1, 16) to (start + 1, 10) - Code(Zero) at (prev + 1, 16) to (start + 1, 10)
- Code(Counter(6)) at (prev + 3, 13) to (start + 0, 14) - Code(Counter(4)) at (prev + 3, 13) to (start + 0, 14)
- Code(Counter(5)) at (prev + 0, 18) to (start + 0, 23) - Code(Counter(3)) at (prev + 0, 18) to (start + 0, 23)
- Code(Counter(6)) at (prev + 1, 16) to (start + 0, 20) - Code(Counter(4)) at (prev + 1, 16) to (start + 0, 20)
- Code(Counter(7)) at (prev + 1, 20) to (start + 0, 25) - Code(Counter(5)) at (prev + 1, 20) to (start + 0, 25)
- Code(Zero) at (prev + 1, 27) to (start + 0, 31) - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
- Code(Zero) at (prev + 0, 32) to (start + 0, 34) - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
- Code(Expression(1, Sub)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(5)) at (prev + 1, 17) to (start + 0, 18)
= (c7 - Zero) - Code(Counter(5)) at (prev + 1, 17) to (start + 0, 34)
- Code(Counter(7)) at (prev + 1, 17) to (start + 0, 34) - Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 35)
- Code(Expression(2, Sub)) at (prev + 0, 34) to (start + 0, 35) = ((c0 + c4) - (c2 + c3))
= ((c0 + c6) - (c4 + c5))
- Code(Zero) at (prev + 1, 20) to (start + 1, 14) - Code(Zero) at (prev + 1, 20) to (start + 1, 14)
- Code(Expression(5, Sub)) at (prev + 3, 9) to (start + 0, 15) - Code(Expression(3, Sub)) at (prev + 3, 9) to (start + 0, 15)
= (c5 - c6) = (c3 - c4)
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
Highest counter ID seen: c7 Highest counter ID seen: c5
Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
Raw bytes (122): 0x[01, 01, 09, 01, 00, 01, 00, 0d, 00, 0d, 00, 0d, 00, 1b, 1f, 01, 0d, 09, 1d, 09, 0d, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 06, 01, 0d, 00, 0e, 02, 01, 0d, 00, 1e, 1d, 00, 1e, 00, 1f, 0d, 02, 0d, 00, 0e, 09, 00, 12, 00, 17, 0d, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 12, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 0e, 01, 11, 00, 12, 12, 01, 11, 00, 22, 16, 00, 22, 00, 23, 22, 03, 09, 00, 0f, 01, 01, 05, 00, 06] Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 09, 05, 0d, 05, 09, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1e, 0d, 00, 1e, 00, 1f, 09, 02, 0d, 00, 0e, 05, 00, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 22, 02, 00, 22, 00, 23, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 9 Number of expressions: 4
- expression 0 operands: lhs = Counter(0), rhs = Zero - expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
- expression 1 operands: lhs = Counter(0), rhs = Zero - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
- expression 2 operands: lhs = Counter(3), rhs = Zero - expression 2 operands: lhs = Counter(1), rhs = Counter(3)
- expression 3 operands: lhs = Counter(3), rhs = Zero - expression 3 operands: lhs = Counter(1), rhs = Counter(2)
- expression 4 operands: lhs = Counter(3), rhs = Zero
- expression 5 operands: lhs = Expression(6, Add), rhs = Expression(7, Add)
- expression 6 operands: lhs = Counter(0), rhs = Counter(3)
- expression 7 operands: lhs = Counter(2), rhs = Counter(7)
- expression 8 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 20 Number of file 0 mappings: 20
- Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17) - Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17)
- Code(Zero) at (prev + 1, 18) to (start + 1, 10) - Code(Zero) at (prev + 1, 18) to (start + 1, 10)
- Code(Expression(0, Sub)) at (prev + 2, 16) to (start + 0, 21) - Code(Counter(0)) at (prev + 2, 16) to (start + 0, 21)
= (c0 - Zero)
- Code(Zero) at (prev + 1, 23) to (start + 0, 27) - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
- Code(Zero) at (prev + 0, 28) to (start + 0, 30) - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
- Code(Expression(1, Sub)) at (prev + 1, 13) to (start + 0, 14) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 14)
= (c0 - Zero) - Code(Counter(0)) at (prev + 1, 13) to (start + 0, 30)
- Code(Expression(0, Sub)) at (prev + 1, 13) to (start + 0, 30) - Code(Counter(3)) at (prev + 0, 30) to (start + 0, 31)
= (c0 - Zero) - Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14)
- Code(Counter(7)) at (prev + 0, 30) to (start + 0, 31) - Code(Counter(1)) at (prev + 0, 18) to (start + 0, 23)
- Code(Counter(3)) at (prev + 2, 13) to (start + 0, 14) - Code(Counter(2)) at (prev + 1, 16) to (start + 0, 21)
- Code(Counter(2)) at (prev + 0, 18) to (start + 0, 23)
- Code(Counter(3)) at (prev + 1, 16) to (start + 0, 21)
- Code(Zero) at (prev + 0, 22) to (start + 1, 14) - Code(Zero) at (prev + 0, 22) to (start + 1, 14)
- Code(Expression(4, Sub)) at (prev + 2, 20) to (start + 0, 25) - Code(Counter(2)) at (prev + 2, 20) to (start + 0, 25)
= (c3 - Zero)
- Code(Zero) at (prev + 1, 27) to (start + 0, 31) - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
- Code(Zero) at (prev + 0, 32) to (start + 0, 34) - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
- Code(Expression(3, Sub)) at (prev + 1, 17) to (start + 0, 18) - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 18)
= (c3 - Zero) - Code(Counter(2)) at (prev + 1, 17) to (start + 0, 34)
- Code(Expression(4, Sub)) at (prev + 1, 17) to (start + 0, 34) - Code(Expression(0, Sub)) at (prev + 0, 34) to (start + 0, 35)
= (c3 - Zero) = ((c0 + c2) - (c1 + c3))
- Code(Expression(5, Sub)) at (prev + 0, 34) to (start + 0, 35) - Code(Expression(3, Sub)) at (prev + 3, 9) to (start + 0, 15)
= ((c0 + c3) - (c2 + c7)) = (c1 - c2)
- Code(Expression(8, Sub)) at (prev + 3, 9) to (start + 0, 15)
= (c2 - c3)
- Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6) - Code(Counter(0)) at (prev + 1, 5) to (start + 0, 6)
Highest counter ID seen: c7 Highest counter ID seen: c3
Function name: loops_branches::main Function name: loops_branches::main
Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02] Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02]

View file

@ -1,13 +1,11 @@
Function name: no_spans_if_not::affected_function Function name: no_spans_if_not::affected_function
Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 16, 1c, 01, 12, 02, 02, 0d, 00, 0f, 00, 02, 0d, 00, 0f] Raw bytes (19): 0x[01, 01, 00, 03, 01, 16, 1c, 01, 12, 01, 02, 0d, 00, 0f, 00, 02, 0d, 00, 0f]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 3 Number of file 0 mappings: 3
- Code(Counter(0)) at (prev + 22, 28) to (start + 1, 18) - Code(Counter(0)) at (prev + 22, 28) to (start + 1, 18)
- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 15) - Code(Counter(0)) at (prev + 2, 13) to (start + 0, 15)
= (c0 - Zero)
- Code(Zero) at (prev + 2, 13) to (start + 0, 15) - Code(Zero) at (prev + 2, 13) to (start + 0, 15)
Highest counter ID seen: c0 Highest counter ID seen: c0

View file

@ -1,13 +1,11 @@
Function name: tight_inf_loop::main Function name: tight_inf_loop::main
Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 02, 01, 06, 01, 02] Raw bytes (19): 0x[01, 01, 00, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 01, 01, 06, 01, 02]
Number of files: 1 Number of files: 1
- file 0 => global file 1 - file 0 => global file 1
Number of expressions: 1 Number of expressions: 0
- expression 0 operands: lhs = Counter(0), rhs = Zero
Number of file 0 mappings: 3 Number of file 0 mappings: 3
- Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13) - Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13)
- Code(Zero) at (prev + 2, 9) to (start + 0, 16) - Code(Zero) at (prev + 2, 9) to (start + 0, 16)
- Code(Expression(0, Sub)) at (prev + 1, 6) to (start + 1, 2) - Code(Counter(0)) at (prev + 1, 6) to (start + 1, 2)
= (c0 - Zero)
Highest counter ID seen: c0 Highest counter ID seen: c0