Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
InstrProfiling.cpp File Reference
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/ProfileData/InstrProfCorrelator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Instrumentation.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <string>
#include "llvm/ProfileData/InstrProfData.inc"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define DEBUG_TYPE   "instrprof"
#define VALUE_PROF_FUNC_PARAM(ParamType, ParamName, ParamLLVMType)
#define INSTR_PROF_VISIBILITY
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define INSTR_PROF_DATA_DEFINED
#define INSTR_PROF_COMMA   ,
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VTABLE_DATA_DEFINED
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
#define INSTR_PROF_COMMA
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_DATA_INC
#define INSTR_PROF_SIMPLE_QUOTE(x)
#define INSTR_PROF_QUOTE(x)
#define INSTR_PROF_SIMPLE_CONCAT(x, y)
#define INSTR_PROF_CONCAT(x, y)
#define INSTR_PROF_RAW_MAGIC_64
#define INSTR_PROF_RAW_MAGIC_32
#define INSTR_PROF_RAW_VERSION   10
#define INSTR_PROF_INDEX_VERSION   12
#define INSTR_PROF_COVMAP_VERSION   6
#define VARIANT_MASKS_ALL   0xffffffff00000000ULL
#define GET_VERSION(V)
#define VARIANT_MASK_INSTR_LOOP_ENTRIES   (0x1ULL << 55)
#define VARIANT_MASK_IR_PROF   (0x1ULL << 56)
#define VARIANT_MASK_CSIR_PROF   (0x1ULL << 57)
#define VARIANT_MASK_INSTR_ENTRY   (0x1ULL << 58)
#define VARIANT_MASK_DBG_CORRELATE   (0x1ULL << 59)
#define VARIANT_MASK_BYTE_COVERAGE   (0x1ULL << 60)
#define VARIANT_MASK_FUNCTION_ENTRY_ONLY   (0x1ULL << 61)
#define VARIANT_MASK_MEMPROF   (0x1ULL << 62)
#define VARIANT_MASK_TEMPORAL_PROF   (0x1ULL << 63)
#define INSTR_PROF_RAW_VERSION_VAR   __llvm_profile_raw_version
#define INSTR_PROF_PROFILE_RUNTIME_VAR   __llvm_profile_runtime
#define INSTR_PROF_PROFILE_COUNTER_BIAS_VAR   __llvm_profile_counter_bias
#define INSTR_PROF_PROFILE_BITMAP_BIAS_VAR   __llvm_profile_bitmap_bias
#define INSTR_PROF_PROFILE_SET_TIMESTAMP   __llvm_profile_set_timestamp
#define INSTR_PROF_PROFILE_SAMPLING_VAR   __llvm_profile_sampling
#define INSTR_PROF_PROFILE_NAME_VAR   __llvm_profile_filename
#define INSTR_PROF_DATA_COMMON   __llvm_prf_data
#define INSTR_PROF_NAME_COMMON   __llvm_prf_names
#define INSTR_PROF_VNAME_COMMON   __llvm_prf_vns
#define INSTR_PROF_CNTS_COMMON   __llvm_prf_cnts
#define INSTR_PROF_BITS_COMMON   __llvm_prf_bits
#define INSTR_PROF_VALS_COMMON   __llvm_prf_vals
#define INSTR_PROF_VNODES_COMMON   __llvm_prf_vnds
#define INSTR_PROF_VTAB_COMMON   __llvm_prf_vtab
#define INSTR_PROF_COVMAP_COMMON   __llvm_covmap
#define INSTR_PROF_COVFUN_COMMON   __llvm_covfun
#define INSTR_PROF_COVDATA_COMMON   __llvm_covdata
#define INSTR_PROF_COVNAME_COMMON   __llvm_covnames
#define INSTR_PROF_COVINIT_COMMON   __llvm_covinit
#define INSTR_PROF_DATA_COFF   ".lprfd$M"
#define INSTR_PROF_NAME_COFF   ".lprfn$M"
#define INSTR_PROF_VNAME_COFF   ".lprfvn$M"
#define INSTR_PROF_CNTS_COFF   ".lprfc$M"
#define INSTR_PROF_BITS_COFF   ".lprfb$M"
#define INSTR_PROF_VALS_COFF   ".lprfv$M"
#define INSTR_PROF_VNODES_COFF   ".lprfnd$M"
#define INSTR_PROF_VTAB_COFF   ".lprfvt$M"
#define INSTR_PROF_COVMAP_COFF   ".lcovmap$M"
#define INSTR_PROF_COVFUN_COFF   ".lcovfun$M"
#define INSTR_PROF_COVDATA_COFF   ".lcovd"
#define INSTR_PROF_COVNAME_COFF   ".lcovn"
#define INSTR_PROF_COVINIT_COFF   ".lcovd$M"
#define INSTR_PROF_DATA_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON)
#define INSTR_PROF_NAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON)
#define INSTR_PROF_CNTS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON)
#define INSTR_PROF_BITS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_BITS_COMMON)
#define INSTR_PROF_VTAB_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VTAB_COMMON)
#define INSTR_PROF_VNAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VNAME_COMMON)
#define INSTR_PROF_VALS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON)
#define INSTR_PROF_VNODES_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON)
#define INSTR_PROF_COVMAP_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON)
#define INSTR_PROF_COVFUN_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVFUN_COMMON)
#define INSTR_PROF_COVDATA_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVDATA_COMMON)
#define INSTR_PROF_COVNAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVNAME_COMMON)
#define INSTR_PROF_COVINIT_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVINIT_COMMON)
#define INSTR_PROF_SECT_START(Sect)
#define INSTR_PROF_SECT_STOP(Sect)
#define INSTR_PROF_VALUE_PROF_FUNC   __llvm_profile_instrument_target
#define INSTR_PROF_VALUE_PROF_FUNC_STR    INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_FUNC)
#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC   __llvm_profile_instrument_memop
#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC_STR    INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_MEMOP_FUNC)
#define INSTR_PROF_DATA_ALIGNMENT   8
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VTABLE_DATA_DEFINED
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
#define INSTR_PROF_COMMA
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA_DEFINED
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
#define INSTR_PROF_COMMA
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA_DEFINED
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
#define INSTR_PROF_COMMA
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_MIN_VAL_COUNTS   10
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
#define INSTR_PROF_DATA_DEFINED
#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
#define INSTR_PROF_COMMA
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)

Functions

cl::opt< boolllvm::DebugInfoCorrelate ("debug-info-correlate", cl::desc("Use debug info to correlate profiles. (Deprecated, use " "-profile-correlate=debug-info)"), cl::init(false))
LLVM_ABI cl::opt< InstrProfCorrelator::ProfCorrelatorKindllvm::ProfileCorrelate ("profile-correlate", cl::desc("Use debug info or binary file to correlate profiles."), cl::init(InstrProfCorrelator::NONE), cl::values(clEnumValN(InstrProfCorrelator::NONE, "", "No profile correlation"), clEnumValN(InstrProfCorrelator::DEBUG_INFO, "debug-info", "Use debug info to correlate"), clEnumValN(InstrProfCorrelator::BINARY, "binary", "Use binary to correlate")))
static bool needsRuntimeHookUnconditionally (const Triple &TT)
static bool containsProfilingIntrinsics (Module &M)
 Check if the module contains uses of any profiling intrinsics.
static FunctionCallee getOrInsertValueProfilingCall (Module &M, const TargetLibraryInfo &TLI, ValueProfilingCallType CallType=ValueProfilingCallType::Default)
static std::string getVarName (InstrProfInstBase *Inc, StringRef Prefix, bool &Renamed)
 Get the name of a profiling variable for a particular function.
static bool shouldRecordFunctionAddr (Function *F)
static bool shouldUsePublicSymbol (Function *Fn)
static ConstantgetFuncAddrForProfData (Function *Fn)
static bool needsRuntimeRegistrationOfSectionRange (const Triple &TT)
static bool shouldRecordVTableAddr (GlobalVariable *GV)
static ConstantgetVTableAddrForProfData (GlobalVariable *GV)
LLVM_ABI void llvm::createProfileSamplingVar (Module &M)

Macro Definition Documentation

◆ COVINIT_FUNC [1/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVINIT_FUNC [2/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVINIT_FUNC [3/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVINIT_FUNC [4/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVINIT_FUNC [5/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVINIT_FUNC [6/6]

#define COVINIT_FUNC ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [1/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [2/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [3/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [4/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [5/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_FUNC_RECORD [6/6]

#define COVMAP_FUNC_RECORD ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [1/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [2/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [3/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [4/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [5/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ COVMAP_HEADER [6/6]

#define COVMAP_HEADER ( Type,
LLVMType,
Name,
Initializer )

◆ DEBUG_TYPE

#define DEBUG_TYPE   "instrprof"

Definition at line 66 of file InstrProfiling.cpp.

◆ GET_VERSION

#define GET_VERSION ( V)
Value:
#define VARIANT_MASKS_ALL

◆ INSTR_PROF_BITS_COFF

#define INSTR_PROF_BITS_COFF   ".lprfb$M"

◆ INSTR_PROF_BITS_COMMON

#define INSTR_PROF_BITS_COMMON   __llvm_prf_bits

◆ INSTR_PROF_BITS_SECT_NAME

#define INSTR_PROF_BITS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_BITS_COMMON)

◆ INSTR_PROF_CNTS_COFF

#define INSTR_PROF_CNTS_COFF   ".lprfc$M"

◆ INSTR_PROF_CNTS_COMMON

#define INSTR_PROF_CNTS_COMMON   __llvm_prf_cnts

◆ INSTR_PROF_CNTS_SECT_NAME

#define INSTR_PROF_CNTS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON)

◆ INSTR_PROF_COMMA [1/6]

#define INSTR_PROF_COMMA

◆ INSTR_PROF_COMMA [2/6]

#define INSTR_PROF_COMMA

◆ INSTR_PROF_COMMA [3/6]

#define INSTR_PROF_COMMA

◆ INSTR_PROF_COMMA [4/6]

#define INSTR_PROF_COMMA

◆ INSTR_PROF_COMMA [5/6]

#define INSTR_PROF_COMMA

◆ INSTR_PROF_COMMA [6/6]

#define INSTR_PROF_COMMA   ,

◆ INSTR_PROF_CONCAT

#define INSTR_PROF_CONCAT ( x,
y )
Value:
#define INSTR_PROF_SIMPLE_CONCAT(x, y)

◆ INSTR_PROF_COVDATA_COFF

#define INSTR_PROF_COVDATA_COFF   ".lcovd"

◆ INSTR_PROF_COVDATA_COMMON

#define INSTR_PROF_COVDATA_COMMON   __llvm_covdata

◆ INSTR_PROF_COVDATA_SECT_NAME

#define INSTR_PROF_COVDATA_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVDATA_COMMON)

◆ INSTR_PROF_COVFUN_COFF

#define INSTR_PROF_COVFUN_COFF   ".lcovfun$M"

◆ INSTR_PROF_COVFUN_COMMON

#define INSTR_PROF_COVFUN_COMMON   __llvm_covfun

◆ INSTR_PROF_COVFUN_SECT_NAME

#define INSTR_PROF_COVFUN_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVFUN_COMMON)

◆ INSTR_PROF_COVINIT_COFF

#define INSTR_PROF_COVINIT_COFF   ".lcovd$M"

◆ INSTR_PROF_COVINIT_COMMON

#define INSTR_PROF_COVINIT_COMMON   __llvm_covinit

◆ INSTR_PROF_COVINIT_SECT_NAME

#define INSTR_PROF_COVINIT_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVINIT_COMMON)

◆ INSTR_PROF_COVMAP_COFF

#define INSTR_PROF_COVMAP_COFF   ".lcovmap$M"

◆ INSTR_PROF_COVMAP_COMMON

#define INSTR_PROF_COVMAP_COMMON   __llvm_covmap

◆ INSTR_PROF_COVMAP_SECT_NAME

#define INSTR_PROF_COVMAP_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON)

◆ INSTR_PROF_COVMAP_VERSION

#define INSTR_PROF_COVMAP_VERSION   6

◆ INSTR_PROF_COVNAME_COFF

#define INSTR_PROF_COVNAME_COFF   ".lcovn"

◆ INSTR_PROF_COVNAME_COMMON

#define INSTR_PROF_COVNAME_COMMON   __llvm_covnames

◆ INSTR_PROF_COVNAME_SECT_NAME

#define INSTR_PROF_COVNAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_COVNAME_COMMON)

◆ INSTR_PROF_DATA [1/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Init )
Value:
LLVMType,

◆ INSTR_PROF_DATA [2/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Init )
Value:

◆ INSTR_PROF_DATA [3/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_DATA [4/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_DATA [5/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_DATA [6/6]

#define INSTR_PROF_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_DATA_ALIGNMENT

#define INSTR_PROF_DATA_ALIGNMENT   8

◆ INSTR_PROF_DATA_COFF

#define INSTR_PROF_DATA_COFF   ".lprfd$M"

◆ INSTR_PROF_DATA_COMMON

#define INSTR_PROF_DATA_COMMON   __llvm_prf_data

◆ INSTR_PROF_DATA_DEFINED [1/4]

#define INSTR_PROF_DATA_DEFINED

◆ INSTR_PROF_DATA_DEFINED [2/4]

#define INSTR_PROF_DATA_DEFINED

◆ INSTR_PROF_DATA_DEFINED [3/4]

#define INSTR_PROF_DATA_DEFINED

◆ INSTR_PROF_DATA_DEFINED [4/4]

#define INSTR_PROF_DATA_DEFINED

◆ INSTR_PROF_DATA_INC

#define INSTR_PROF_DATA_INC

◆ INSTR_PROF_DATA_SECT_NAME

#define INSTR_PROF_DATA_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON)

◆ INSTR_PROF_INDEX_VERSION

#define INSTR_PROF_INDEX_VERSION   12

◆ INSTR_PROF_MIN_VAL_COUNTS

#define INSTR_PROF_MIN_VAL_COUNTS   10

◆ INSTR_PROF_NAME_COFF

#define INSTR_PROF_NAME_COFF   ".lprfn$M"

◆ INSTR_PROF_NAME_COMMON

#define INSTR_PROF_NAME_COMMON   __llvm_prf_names

◆ INSTR_PROF_NAME_SECT_NAME

#define INSTR_PROF_NAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON)

◆ INSTR_PROF_PROFILE_BITMAP_BIAS_VAR

#define INSTR_PROF_PROFILE_BITMAP_BIAS_VAR   __llvm_profile_bitmap_bias

◆ INSTR_PROF_PROFILE_COUNTER_BIAS_VAR

#define INSTR_PROF_PROFILE_COUNTER_BIAS_VAR   __llvm_profile_counter_bias

◆ INSTR_PROF_PROFILE_NAME_VAR

#define INSTR_PROF_PROFILE_NAME_VAR   __llvm_profile_filename

◆ INSTR_PROF_PROFILE_RUNTIME_VAR

#define INSTR_PROF_PROFILE_RUNTIME_VAR   __llvm_profile_runtime

◆ INSTR_PROF_PROFILE_SAMPLING_VAR

#define INSTR_PROF_PROFILE_SAMPLING_VAR   __llvm_profile_sampling

◆ INSTR_PROF_PROFILE_SET_TIMESTAMP

#define INSTR_PROF_PROFILE_SET_TIMESTAMP   __llvm_profile_set_timestamp

◆ INSTR_PROF_QUOTE

#define INSTR_PROF_QUOTE ( x)
Value:
#define INSTR_PROF_SIMPLE_QUOTE(x)

◆ INSTR_PROF_RAW_HEADER [1/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_HEADER [2/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_HEADER [3/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_HEADER [4/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_HEADER [5/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_HEADER [6/6]

#define INSTR_PROF_RAW_HEADER ( Type,
Name,
Initializer )

◆ INSTR_PROF_RAW_MAGIC_32

#define INSTR_PROF_RAW_MAGIC_32
Value:
(uint64_t)255 << 56 | (uint64_t)'l' << 48 | \
(uint64_t)'p' << 40 | (uint64_t)'r' << 32 | (uint64_t)'o' << 24 | \
(uint64_t)'f' << 16 | (uint64_t)'R' << 8 | (uint64_t)129

◆ INSTR_PROF_RAW_MAGIC_64

#define INSTR_PROF_RAW_MAGIC_64
Value:
(uint64_t)255 << 56 | (uint64_t)'l' << 48 | \
(uint64_t)'p' << 40 | (uint64_t)'r' << 32 | (uint64_t)'o' << 24 | \
(uint64_t)'f' << 16 | (uint64_t)'r' << 8 | (uint64_t)129

◆ INSTR_PROF_RAW_VERSION

#define INSTR_PROF_RAW_VERSION   10

◆ INSTR_PROF_RAW_VERSION_VAR

#define INSTR_PROF_RAW_VERSION_VAR   __llvm_profile_raw_version

◆ INSTR_PROF_SECT_START

#define INSTR_PROF_SECT_START ( Sect)
Value:
INSTR_PROF_CONCAT(__start_,Sect)
#define INSTR_PROF_CONCAT(x, y)

◆ INSTR_PROF_SECT_STOP

#define INSTR_PROF_SECT_STOP ( Sect)
Value:
INSTR_PROF_CONCAT(__stop_,Sect)

◆ INSTR_PROF_SIMPLE_CONCAT

#define INSTR_PROF_SIMPLE_CONCAT ( x,
y )
Value:
x ## y

◆ INSTR_PROF_SIMPLE_QUOTE

#define INSTR_PROF_SIMPLE_QUOTE ( x)
Value:
#x

◆ INSTR_PROF_VALS_COFF

#define INSTR_PROF_VALS_COFF   ".lprfv$M"

◆ INSTR_PROF_VALS_COMMON

#define INSTR_PROF_VALS_COMMON   __llvm_prf_vals

◆ INSTR_PROF_VALS_SECT_NAME

#define INSTR_PROF_VALS_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON)

◆ INSTR_PROF_VALUE_NODE [1/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Init )
Value:
LLVMType,

◆ INSTR_PROF_VALUE_NODE [2/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VALUE_NODE [3/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VALUE_NODE [4/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VALUE_NODE [5/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VALUE_NODE [6/6]

#define INSTR_PROF_VALUE_NODE ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VALUE_PROF_FUNC

#define INSTR_PROF_VALUE_PROF_FUNC   __llvm_profile_instrument_target

◆ INSTR_PROF_VALUE_PROF_FUNC_STR

#define INSTR_PROF_VALUE_PROF_FUNC_STR    INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_FUNC)

◆ INSTR_PROF_VALUE_PROF_MEMOP_FUNC

#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC   __llvm_profile_instrument_memop

◆ INSTR_PROF_VALUE_PROF_MEMOP_FUNC_STR

#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC_STR    INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_MEMOP_FUNC)

◆ INSTR_PROF_VISIBILITY

#define INSTR_PROF_VISIBILITY

◆ INSTR_PROF_VNAME_COFF

#define INSTR_PROF_VNAME_COFF   ".lprfvn$M"

◆ INSTR_PROF_VNAME_COMMON

#define INSTR_PROF_VNAME_COMMON   __llvm_prf_vns

◆ INSTR_PROF_VNAME_SECT_NAME

#define INSTR_PROF_VNAME_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VNAME_COMMON)

◆ INSTR_PROF_VNODES_COFF

#define INSTR_PROF_VNODES_COFF   ".lprfnd$M"

◆ INSTR_PROF_VNODES_COMMON

#define INSTR_PROF_VNODES_COMMON   __llvm_prf_vnds

◆ INSTR_PROF_VNODES_SECT_NAME

#define INSTR_PROF_VNODES_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON)

◆ INSTR_PROF_VTAB_COFF

#define INSTR_PROF_VTAB_COFF   ".lprfvt$M"

◆ INSTR_PROF_VTAB_COMMON

#define INSTR_PROF_VTAB_COMMON   __llvm_prf_vtab

◆ INSTR_PROF_VTAB_SECT_NAME

#define INSTR_PROF_VTAB_SECT_NAME   INSTR_PROF_QUOTE(INSTR_PROF_VTAB_COMMON)

◆ INSTR_PROF_VTABLE_DATA [1/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Init )
Value:
LLVMType,

◆ INSTR_PROF_VTABLE_DATA [2/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Init )
Value:

◆ INSTR_PROF_VTABLE_DATA [3/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VTABLE_DATA [4/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VTABLE_DATA [5/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VTABLE_DATA [6/6]

#define INSTR_PROF_VTABLE_DATA ( Type,
LLVMType,
Name,
Initializer )

◆ INSTR_PROF_VTABLE_DATA_DEFINED [1/2]

#define INSTR_PROF_VTABLE_DATA_DEFINED

◆ INSTR_PROF_VTABLE_DATA_DEFINED [2/2]

#define INSTR_PROF_VTABLE_DATA_DEFINED

◆ VALUE_PROF_FUNC_PARAM [1/6]

#define VALUE_PROF_FUNC_PARAM ( ArgType,
ArgName,
ArgLLVMType )

◆ VALUE_PROF_FUNC_PARAM [2/6]

#define VALUE_PROF_FUNC_PARAM ( ArgType,
ArgName,
ArgLLVMType )

◆ VALUE_PROF_FUNC_PARAM [3/6]

#define VALUE_PROF_FUNC_PARAM ( ArgType,
ArgName,
ArgLLVMType )

◆ VALUE_PROF_FUNC_PARAM [4/6]

#define VALUE_PROF_FUNC_PARAM ( ArgType,
ArgName,
ArgLLVMType )

◆ VALUE_PROF_FUNC_PARAM [5/6]

#define VALUE_PROF_FUNC_PARAM ( ArgType,
ArgName,
ArgLLVMType )

◆ VALUE_PROF_FUNC_PARAM [6/6]

#define VALUE_PROF_FUNC_PARAM ( ParamType,
ParamName,
ParamLLVMType )
Value:
ParamLLVMType

◆ VALUE_PROF_KIND [1/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VALUE_PROF_KIND [2/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VALUE_PROF_KIND [3/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VALUE_PROF_KIND [4/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VALUE_PROF_KIND [5/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VALUE_PROF_KIND [6/6]

#define VALUE_PROF_KIND ( Enumerator,
Value,
Descr )

◆ VARIANT_MASK_BYTE_COVERAGE

#define VARIANT_MASK_BYTE_COVERAGE   (0x1ULL << 60)

◆ VARIANT_MASK_CSIR_PROF

#define VARIANT_MASK_CSIR_PROF   (0x1ULL << 57)

◆ VARIANT_MASK_DBG_CORRELATE

#define VARIANT_MASK_DBG_CORRELATE   (0x1ULL << 59)

◆ VARIANT_MASK_FUNCTION_ENTRY_ONLY

#define VARIANT_MASK_FUNCTION_ENTRY_ONLY   (0x1ULL << 61)

◆ VARIANT_MASK_INSTR_ENTRY

#define VARIANT_MASK_INSTR_ENTRY   (0x1ULL << 58)

◆ VARIANT_MASK_INSTR_LOOP_ENTRIES

#define VARIANT_MASK_INSTR_LOOP_ENTRIES   (0x1ULL << 55)

◆ VARIANT_MASK_IR_PROF

#define VARIANT_MASK_IR_PROF   (0x1ULL << 56)

◆ VARIANT_MASK_MEMPROF

#define VARIANT_MASK_MEMPROF   (0x1ULL << 62)

◆ VARIANT_MASK_TEMPORAL_PROF

#define VARIANT_MASK_TEMPORAL_PROF   (0x1ULL << 63)

◆ VARIANT_MASKS_ALL

#define VARIANT_MASKS_ALL   0xffffffff00000000ULL

Function Documentation

◆ containsProfilingIntrinsics()

bool containsProfilingIntrinsics ( Module & M)
static

Check if the module contains uses of any profiling intrinsics.

Definition at line 921 of file InstrProfiling.cpp.

References F, and llvm::Intrinsic::getDeclarationIfExists().

◆ getFuncAddrForProfData()

◆ getOrInsertValueProfilingCall()

◆ getVarName()

◆ getVTableAddrForProfData()

Constant * getVTableAddrForProfData ( GlobalVariable * GV)
inlinestatic

◆ needsRuntimeHookUnconditionally()

bool needsRuntimeHookUnconditionally ( const Triple & TT)
static

Definition at line 912 of file InstrProfiling.cpp.

◆ needsRuntimeRegistrationOfSectionRange()

bool needsRuntimeRegistrationOfSectionRange ( const Triple & TT)
static

Definition at line 1425 of file InstrProfiling.cpp.

◆ shouldRecordFunctionAddr()

bool shouldRecordFunctionAddr ( Function * F)
inlinestatic

Definition at line 1322 of file InstrProfiling.cpp.

References F.

Referenced by getFuncAddrForProfData().

◆ shouldRecordVTableAddr()

◆ shouldUsePublicSymbol()