pub enum CoverageKind {
SpanMarker,
BlockMarker {
id: BlockMarkerId,
},
CounterIncrement {
id: CounterId,
},
ExpressionUsed {
id: ExpressionId,
},
CondBitmapUpdate {
index: u32,
decision_depth: u16,
},
TestVectorBitmapUpdate {
bitmap_idx: u32,
decision_depth: u16,
},
}
Variants§
SpanMarker
Marks a span that might otherwise not be represented in MIR, so that coverage instrumentation can associate it with its enclosing block/BCB.
Should be erased before codegen (at some point after InstrumentCoverage
).
BlockMarker
Marks its enclosing basic block with an ID that can be referred to by
side data in CoverageInfoHi
.
Should be erased before codegen (at some point after InstrumentCoverage
).
Fields
id: BlockMarkerId
CounterIncrement
Marks the point in MIR control flow represented by a coverage counter.
This is eventually lowered to llvm.instrprof.increment
in LLVM IR.
If this statement does not survive MIR optimizations, any mappings that refer to this counter can have those references simplified to zero.
ExpressionUsed
Marks the point in MIR control-flow represented by a coverage expression.
If this statement does not survive MIR optimizations, any mappings that refer to this expression can have those references simplified to zero.
(This is only inserted for expression IDs that are directly used by mappings. Intermediate expressions with no direct mappings are retained/zeroed based on whether they are transitively used.)
Fields
id: ExpressionId
CondBitmapUpdate
Marks the point in MIR control flow represented by a evaluated condition.
This is eventually lowered to instruments updating mcdc temp variables.
TestVectorBitmapUpdate
Marks the point in MIR control flow represented by a evaluated decision.
This is eventually lowered to llvm.instrprof.mcdc.tvbitmap.update
in LLVM IR.