@@ -123,13 +123,6 @@ pub enum CoverageKind {
123123 /// Has no effect during codegen.
124124 MCDCDecisionOutputMarker { id : DecisionMarkerId , outcome : bool } ,
125125
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-
133126 /// Marks the point in MIR control flow represented by a coverage counter.
134127 ///
135128 /// This is eventually lowered to `llvm.instrprof.increment` in LLVM IR.
@@ -147,6 +140,22 @@ pub enum CoverageKind {
147140 /// mappings. Intermediate expressions with no direct mappings are
148141 /// retained/zeroed based on whether they are transitively used.)
149142 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 } ,
150159}
151160
152161impl Debug for CoverageKind {
@@ -161,14 +170,23 @@ impl Debug for CoverageKind {
161170 MCDCDecisionEntryMarker { id } => {
162171 write ! ( fmt, "MCDCDecisionEntryMarker({:?})" , id. index( ) )
163172 }
164- & MCDCDecisionOutputMarker { id, outcome } => {
173+ MCDCDecisionOutputMarker { id, outcome } => {
165174 write ! ( fmt, "MCDCDecisionOutputMarker({:?}, {})" , id. index( ) , outcome)
166175 }
176+ CounterIncrement { id } => write ! ( fmt, "CounterIncrement({:?})" , id. index( ) ) ,
177+ ExpressionUsed { id } => write ! ( fmt, "ExpressionUsed({:?})" , id. index( ) ) ,
167178 MCDCBitmapRequire { needed_bytes } => {
168179 write ! ( fmt, "MCDCBitmapRequire({needed_bytes} bytes)" )
169180 }
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+ }
172190 }
173191 }
174192}
0 commit comments