LLVM 20.0.0git
|
Compute TestVector Indices "TVIdx" from the Conds graph. More...
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
Classes | |
struct | MCDCNode |
Public Member Functions | |
TVIdxBuilder (const SmallVectorImpl< ConditionIDs > &NextIDs, int Offset=0) | |
Calculate and assign Indices. | |
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",
Definition at line 625 of file CoverageMapping.h.
mcdc::TVIdxBuilder::TVIdxBuilder | ( | const SmallVectorImpl< ConditionIDs > & | NextIDs, |
int | Offset = 0 |
||
) |
Calculate and assign Indices.
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
ID
Cond (0 or 1)
Definition at line 224 of file CoverageMapping.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::CallingConv::C, llvm::SmallVectorBase< Size_T >::empty(), llvm::SmallVectorImpl< T >::erase(), HardMaxTVs, I, Idx, Indices, N, NumTestVectors, llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SavedNodes, llvm::SmallVectorBase< Size_T >::size(), llvm::size(), and llvm::sort().
|
staticconstexpr |
Hard limit of test vectors.
Definition at line 647 of file CoverageMapping.h.
Referenced by TVIdxBuilder().
SmallVector<std::array<int, 2> > llvm::coverage::mcdc::TVIdxBuilder::Indices |
Output: Index for TestVectors bitmap (These are not CondIDs)
Definition at line 640 of file CoverageMapping.h.
Referenced by TVIdxBuilder().
int llvm::coverage::mcdc::TVIdxBuilder::NumTestVectors |
Output: The number of test vectors.
Error with HardMaxTVs if the number has exploded.
Definition at line 644 of file CoverageMapping.h.
Referenced by TVIdxBuilder().
SmallVector<MCDCNode> llvm::coverage::mcdc::TVIdxBuilder::SavedNodes |
This is no longer needed after the assignment.
It may be used in assert() for reconfirmation.
Definition at line 636 of file CoverageMapping.h.
Referenced by TVIdxBuilder().