LLVM 18.0.0git
|
A Counter mapping context is used to connect the counters, expressions and the obtained counter values. More...
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
Public Member Functions | |
CounterMappingContext (ArrayRef< CounterExpression > Expressions, ArrayRef< uint64_t > CounterValues=std::nullopt) | |
void | setCounts (ArrayRef< uint64_t > Counts) |
void | setBitmapBytes (ArrayRef< uint8_t > Bytes) |
void | dump (const Counter &C, raw_ostream &OS) const |
void | dump (const Counter &C) const |
Expected< int64_t > | evaluate (const Counter &C) const |
Return the number of times that a region of code associated with this counter was executed. | |
Expected< BitVector > | evaluateBitmap (const CounterMappingRegion *MCDCDecision) const |
Return the number of times that a region of code associated with this counter was executed. | |
Expected< MCDCRecord > | evaluateMCDCRegion (CounterMappingRegion Region, BitVector Bitmap, ArrayRef< CounterMappingRegion > Branches) |
Return an MCDC record that indicates executed test vectors and condition pairs. | |
unsigned | getMaxCounterID (const Counter &C) const |
A Counter mapping context is used to connect the counters, expressions and the obtained counter values.
Definition at line 544 of file CoverageMapping.h.
|
inline |
Definition at line 550 of file CoverageMapping.h.
Definition at line 558 of file CoverageMapping.h.
References llvm::CallingConv::C, llvm::dbgs(), and dump().
Referenced by dump().
void CounterMappingContext::dump | ( | const Counter & | C, |
raw_ostream & | OS | ||
) | const |
Definition at line 140 of file CoverageMapping.cpp.
References llvm::CallingConv::C, llvm::consumeError(), llvm::coverage::Counter::CounterValueReference, dump(), E, llvm::ArrayRef< T >::empty(), evaluate(), llvm::coverage::Counter::Expression, OS, llvm::coverage::CounterExpression::Subtract, and llvm::coverage::Counter::Zero.
Referenced by dump().
Return the number of times that a region of code associated with this counter was executed.
Definition at line 170 of file CoverageMapping.cpp.
References llvm::argument_out_of_domain, llvm::CallingConv::C, llvm::coverage::Counter::CounterValueReference, E, llvm::errorCodeToError(), evaluate(), llvm::coverage::Counter::Expression, LHS, llvm_unreachable, RHS, llvm::ArrayRef< T >::size(), llvm::coverage::CounterExpression::Subtract, and llvm::coverage::Counter::Zero.
Referenced by dump(), and evaluate().
Expected< BitVector > CounterMappingContext::evaluateBitmap | ( | const CounterMappingRegion * | MCDCDecision | ) | const |
Return the number of times that a region of code associated with this counter was executed.
Definition at line 194 of file CoverageMapping.cpp.
References llvm::alignTo(), llvm::coverage::CounterMappingRegion::MCDCParameters::BitmapIdx, llvm::Data, llvm::coverage::CounterMappingRegion::MCDCParams, NC, and llvm::coverage::CounterMappingRegion::MCDCParameters::NumConditions.
Expected< MCDCRecord > CounterMappingContext::evaluateMCDCRegion | ( | CounterMappingRegion | Region, |
BitVector | Bitmap, | ||
ArrayRef< CounterMappingRegion > | Branches | ||
) |
Return an MCDC record that indicates executed test vectors and condition pairs.
Definition at line 434 of file CoverageMapping.cpp.
References MCDCRecordProcessor::processMCDCRecord().
Definition at line 442 of file CoverageMapping.cpp.
References llvm::CallingConv::C, llvm::coverage::Counter::CounterValueReference, E, llvm::coverage::Counter::Expression, getMaxCounterID(), llvm_unreachable, and llvm::coverage::Counter::Zero.
Referenced by getMaxCounterID(), and getMaxCounterID().
|
inline |
Definition at line 555 of file CoverageMapping.h.
Definition at line 554 of file CoverageMapping.h.