LLVM: llvm::coverage::mcdc::TVIdxBuilder Class Reference (original) (raw)
Compute TestVector Indices "TVIdx" from the Conds graph. More...
#include "[llvm/ProfileData/Coverage/CoverageMapping.h](CoverageMapping%5F8h%5Fsource.html)"
| Public Attributes | |
|---|---|
| SmallVector< MCDCNode > | SavedNodes |
| This is no longer needed after the assignment. | |
| SmallVector< std::array< int, 2 > > | Indices |
| Output: Index for TestVectors bitmap (These are not CondIDs) | |
| int | NumTestVectors |
| Output: The number of test vectors. |
| Static Public Attributes | |
|---|---|
| static constexpr auto | HardMaxTVs |
| Hard limit of test vectors. |
Compute TestVector Indices "TVIdx" from the Conds graph.
Clang CodeGen handles the bitmap index based on TVIdx. llvm-cov reconstructs conditions from TVIdx.
For each leaf "The final decision",
- TVIdx should be unique.
- TVIdx has the Width.
- The width represents the number of possible paths.
- The minimum width is 1 "deterministic".
- The order of leaves are sorted by Width DESC. It expects latter TVIdx(s) (with Width=1) could be pruned and altered to other simple branch conditions.
Definition at line 648 of file CoverageMapping.h.
Calculate and assign Indices.
Parameters
| NextIDs | The list of {FalseID, TrueID} indexed by ID The first element [0] should be the root node. |
|---|---|
| Offset | Offset of index to final decisions. |
-Width
Ord
Cond (0 or 1)
Definition at line 283 of file CoverageMapping.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorImpl< T >::erase(), HardMaxTVs, I, Indices, N, NumTestVectors, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SavedNodes, llvm::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::sort().
◆ HardMaxTVs
| auto llvm::coverage::mcdc::TVIdxBuilder::HardMaxTVs | staticconstexpr |
|---|
Initial value:
=
std::numeric_limits<decltype(NumTestVectors)>::max()
int NumTestVectors
Output: The number of test vectors.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
Hard limit of test vectors.
Definition at line 670 of file CoverageMapping.h.
Referenced by TVIdxBuilder().
◆ Indices
SmallVector<std::array<int, 2> > llvm::coverage::mcdc::TVIdxBuilder::Indices
◆ NumTestVectors
int llvm::coverage::mcdc::TVIdxBuilder::NumTestVectors
◆ SavedNodes
The documentation for this class was generated from the following files:
- include/llvm/ProfileData/Coverage/CoverageMapping.h
- lib/ProfileData/Coverage/CoverageMapping.cpp