LLVM  14.0.0git
Namespaces | Enumerations | Functions | Variables
Discriminator.h File Reference
#include "llvm/Support/Error.h"
#include <assert.h>
Include dependency graph for Discriminator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 
 llvm::sampleprof
 

Enumerations

enum  llvm::sampleprof::FSDiscriminatorPass {
  llvm::sampleprof::Base = 0, llvm::sampleprof::Pass0 = 0, llvm::sampleprof::Pass1 = 1, llvm::sampleprof::Pass2 = 2,
  llvm::sampleprof::Pass3 = 3, llvm::sampleprof::Pass4 = 4, llvm::sampleprof::PassLast = 4
}
 

Functions

static unsigned getPrefixEncodingFromUnsigned (unsigned U)
 With a given unsigned int U, use up to 13 bits to represent it. More...
 
static unsigned getUnsignedFromPrefixEncoding (unsigned U)
 Reverse transformation as getPrefixEncodingFromUnsigned. More...
 
static unsigned getNextComponentInDiscriminator (unsigned D)
 Returns the next component stored in discriminator. More...
 
static unsigned encodeComponent (unsigned C)
 
static unsigned encodingBits (unsigned C)
 
static unsigned llvm::getNumFSPasses ()
 
static unsigned llvm::getFSPassBitEnd (FSDiscriminatorPass P)
 
static unsigned llvm::getFSPassBitBegin (FSDiscriminatorPass P)
 
static int llvm::getLastFSPassBitBegin ()
 
static unsigned llvm::getLastFSPassBitEnd ()
 
static unsigned llvm::getBaseFSBitBegin ()
 
static unsigned llvm::getBaseFSBitEnd ()
 
static unsigned llvm::getN1Bits (int N)
 

Variables

static const unsigned llvm::BaseDiscriminatorBitWidth = 8
 
static const unsigned llvm::FSDiscriminatorBitWidth = 6
 

Function Documentation

◆ encodeComponent()

static unsigned encodeComponent ( unsigned  C)
inlinestatic

Definition at line 45 of file Discriminator.h.

References getPrefixEncodingFromUnsigned().

Referenced by llvm::DILocation::encodeDiscriminator().

◆ encodingBits()

static unsigned encodingBits ( unsigned  C)
inlinestatic

Definition at line 49 of file Discriminator.h.

Referenced by llvm::DILocation::encodeDiscriminator().

◆ getNextComponentInDiscriminator()

static unsigned getNextComponentInDiscriminator ( unsigned  D)
inlinestatic

Returns the next component stored in discriminator.

Definition at line 38 of file Discriminator.h.

References D.

Referenced by llvm::DILocation::decodeDiscriminator(), llvm::DILocation::getCopyIdentifierFromDiscriminator(), and llvm::DILocation::getDuplicationFactorFromDiscriminator().

◆ getPrefixEncodingFromUnsigned()

static unsigned getPrefixEncodingFromUnsigned ( unsigned  U)
inlinestatic

With a given unsigned int U, use up to 13 bits to represent it.

old_bit 1~5 --> new_bit 1~5 old_bit 6~12 --> new_bit 7~13 new_bit_6 is 0 if higher bits (7~13) are all 0

Definition at line 24 of file Discriminator.h.

Referenced by encodeComponent().

◆ getUnsignedFromPrefixEncoding()

static unsigned getUnsignedFromPrefixEncoding ( unsigned  U)
inlinestatic