LLVM 17.0.0git
|
A Counter is an abstract value that describes how to compute the execution count for a region of code using the collected profile count data. More...
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
Public Types | |
enum | CounterKind { Zero , CounterValueReference , Expression } |
The CounterExpression kind (Add or Subtract) is encoded in bit 0 next to the CounterKind. More... | |
Public Member Functions | |
Counter ()=default | |
CounterKind | getKind () const |
bool | isZero () const |
bool | isExpression () const |
unsigned | getCounterID () const |
unsigned | getExpressionID () const |
Static Public Member Functions | |
static Counter | getZero () |
Return the counter that represents the number zero. | |
static Counter | getCounter (unsigned CounterId) |
Return the counter that corresponds to a specific profile counter. | |
static Counter | getExpression (unsigned ExpressionId) |
Return the counter that corresponds to a specific addition counter expression. | |
Static Public Attributes | |
static const unsigned | EncodingTagBits = 2 |
static const unsigned | EncodingTagMask = 0x3 |
static const unsigned | EncodingCounterTagAndExpansionRegionTagBits |
Friends | |
bool | operator== (const Counter &LHS, const Counter &RHS) |
bool | operator!= (const Counter &LHS, const Counter &RHS) |
bool | operator< (const Counter &LHS, const Counter &RHS) |
A Counter is an abstract value that describes how to compute the execution count for a region of code using the collected profile count data.
Definition at line 100 of file CoverageMapping.h.
The CounterExpression kind (Add or Subtract) is encoded in bit 0 next to the CounterKind.
This means CounterKind has to leave bit 0 free.
Enumerator | |
---|---|
Zero | |
CounterValueReference | |
Expression |
Definition at line 103 of file CoverageMapping.h.
|
default |
Referenced by getCounter(), getExpression(), and getZero().
Return the counter that corresponds to a specific profile counter.
Definition at line 144 of file CoverageMapping.h.
References Counter(), and CounterValueReference.
|
inline |
Definition at line 124 of file CoverageMapping.h.
Return the counter that corresponds to a specific addition counter expression.
Definition at line 150 of file CoverageMapping.h.
References Counter().
|
inline |
Definition at line 126 of file CoverageMapping.h.
|
inline |
Definition at line 118 of file CoverageMapping.h.
|
inlinestatic |
Return the counter that represents the number zero.
Definition at line 141 of file CoverageMapping.h.
References Counter().
|
inline |
Definition at line 122 of file CoverageMapping.h.
References Expression.
|
inline |
Definition at line 120 of file CoverageMapping.h.
References Zero.
Referenced by llvm::coverage::CoverageMappingWriter::write().
Definition at line 132 of file CoverageMapping.h.
Definition at line 136 of file CoverageMapping.h.
Definition at line 128 of file CoverageMapping.h.
Definition at line 106 of file CoverageMapping.h.
Referenced by llvm::coverage::CoverageMappingWriter::write().
Definition at line 104 of file CoverageMapping.h.
Referenced by encodeCounter(), and llvm::coverage::CoverageMappingWriter::write().
Definition at line 105 of file CoverageMapping.h.
Referenced by llvm::coverage::RawCoverageMappingDummyChecker::isDummy().