about summary refs log tree commit diff
path: root/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
AgeCommit message (Collapse)AuthorLines
2024-04-22coverage: Move mir-opt coverage tests into a subdirectoryZalathar-55/+0
2024-03-24Clean up unnecessary headers/flags in coverage mir-opt testsZalathar-5/+5
These headers and flags were historically needed, but are now unnecessary due to various changes in how coverage information is stored in MIR.
2024-01-11coverage: Add enums to accommodate other kinds of coverage mappingsZalathar-5/+5
2023-10-19Allow to run filecheck in mir-opt tests.Camille GILLOT-5/+5
2023-10-18coverage: Store expression data in function coverage infoZalathar-2/+4
Even though expression details are now stored in the info structure, we still need to inject `ExpressionUsed` statements into MIR, because if one is missing during codegen then we know that it was optimized out and we can remap all of its associated code regions to zero.
2023-10-18coverage: Store all of a function's mappings in function coverage infoZalathar-4/+10
Previously, mappings were attached to individual coverage statements in MIR. That necessitated special handling in MIR optimizations to avoid deleting those statements, since otherwise codegen would be unable to reassemble the original list of mappings. With this change, a function's list of mappings is now attached to its MIR body, and survives intact even if individual statements are deleted by optimizations.
2023-10-03coverage: Store each BCB's code regions in one coverage statementZalathar-2/+1
If a BCB has more than one code region, those extra regions can now all be stored in the same coverage statement, instead of being stored in additional statements.
2023-10-03coverage: Let each coverage statement hold a vector of code regionsZalathar-5/+5
This makes it possible for a `StatementKind::Coverage` to hold more than one code region, but that capability is not yet used.
2023-08-01Make coverage counter IDs count up from 0, not 1Zalathar-4/+4
Operand types are now tracked explicitly, so there is no need to reserve ID 0 for the special always-zero counter. As part of the renumbering, this change fixes an off-by-one error in the way counters were counted by the `coverageinfo` query. As a result, functions should now have exactly the number of counters they actually need, instead of always having an extra counter that is never used.
2023-08-01Make coverage expression IDs count up from 0, not down from `u32::MAX`Zalathar-3/+3
Operand types are now tracked explicitly, so there is no need for expression IDs to avoid counter IDs by descending from `u32::MAX`. Instead they can just count up from 0, and can be used directly as indices when necessary.
2023-08-01Replace `ExpressionOperandId` with enum `Operand`Zalathar-3/+3
Because the three kinds of operand are now distinguished explicitly, we no longer need fiddly code to disambiguate counter IDs and expression IDs based on the total number of counters/expressions in a function. This does increase the size of operands from 4 bytes to 8 bytes, but that shouldn't be a big deal since they are mostly stored inside boxed structures, and the current coverage code is not particularly size-optimized anyway.
2023-06-15Remove comments from mir-opt MIR dumpsBen Kimock-24/+21
2023-04-06Bless testsGary Guo-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+51