@@ -123,13 +123,6 @@ pub enum CoverageKind {
123
123
/// Has no effect during codegen.
124
124
MCDCDecisionOutputMarker { id : DecisionMarkerId , outcome : bool } ,
125
125
126
- /// Declares the number of bytes needed to store the test-vector bitmaps of
127
- /// all the decisions in the function body.
128
- ///
129
- /// In LLVM backend, this is done by inserting a call to the
130
- /// `instrprof.mcdc.parameters` intrinsic.
131
- MCDCBitmapRequire { needed_bytes : u32 } ,
132
-
133
126
/// Marks the point in MIR control flow represented by a coverage counter.
134
127
///
135
128
/// This is eventually lowered to `llvm.instrprof.increment` in LLVM IR.
@@ -147,6 +140,22 @@ pub enum CoverageKind {
147
140
/// mappings. Intermediate expressions with no direct mappings are
148
141
/// retained/zeroed based on whether they are transitively used.)
149
142
ExpressionUsed { id : ExpressionId } ,
143
+
144
+ /// Declares the number of bytes needed to store the test-vector bitmaps of
145
+ /// all the decisions in the function body.
146
+ ///
147
+ /// In LLVM backend, this is done by inserting a call to the
148
+ /// `instrprof.mcdc.parameters` intrinsic.
149
+ MCDCBitmapRequire { needed_bytes : u32 } ,
150
+
151
+ /// Marks a point where the condition bitmap should be set to 0.
152
+ MCDCCondBitmapReset ,
153
+
154
+ /// Marks a point where a bit of the condition bitmap should be set.
155
+ MCDCCondBitmapUpdate { condition_id : u32 , bool_value : bool } ,
156
+
157
+ /// Marks a point where a bit of the global Test Vector bitmap should be set to one.
158
+ MCDCTestBitmapUpdate { needed_bytes : u32 , decision_index : u32 } ,
150
159
}
151
160
152
161
impl Debug for CoverageKind {
@@ -161,14 +170,23 @@ impl Debug for CoverageKind {
161
170
MCDCDecisionEntryMarker { id } => {
162
171
write ! ( fmt, "MCDCDecisionEntryMarker({:?})" , id. index( ) )
163
172
}
164
- & MCDCDecisionOutputMarker { id, outcome } => {
173
+ MCDCDecisionOutputMarker { id, outcome } => {
165
174
write ! ( fmt, "MCDCDecisionOutputMarker({:?}, {})" , id. index( ) , outcome)
166
175
}
176
+ CounterIncrement { id } => write ! ( fmt, "CounterIncrement({:?})" , id. index( ) ) ,
177
+ ExpressionUsed { id } => write ! ( fmt, "ExpressionUsed({:?})" , id. index( ) ) ,
167
178
MCDCBitmapRequire { needed_bytes } => {
168
179
write ! ( fmt, "MCDCBitmapRequire({needed_bytes} bytes)" )
169
180
}
170
- CounterIncrement { id } => write ! ( fmt, "CounterIncrement({:?})" , id. index( ) ) ,
171
- ExpressionUsed { id } => write ! ( fmt, "ExpressionUsed({:?})" , id. index( ) ) ,
181
+ MCDCCondBitmapReset => {
182
+ write ! ( fmt, "MCDCCondBitmapReset()" )
183
+ }
184
+ MCDCCondBitmapUpdate { condition_id, bool_value } => {
185
+ write ! ( fmt, "MCDCCondBitmapUpdate({condition_id}, {bool_value})" )
186
+ }
187
+ MCDCTestBitmapUpdate { needed_bytes, decision_index } => {
188
+ write ! ( fmt, "MCDCTVBitmapUpdate({needed_bytes} bytes, {decision_index})" )
189
+ }
172
190
}
173
191
}
174
192
}
0 commit comments