61#ifndef INSTR_PROF_VISIBILITY
62#define INSTR_PROF_VISIBILITY
69#ifndef INSTR_PROF_DATA
70#define INSTR_PROF_DATA(Type, LLVMType, Name, Initializer)
72#define INSTR_PROF_DATA_DEFINED
78 ConstantInt::get(
llvm::
Type::getInt64Ty(Ctx), \
79 Inc->getHash()->getZExtValue()))
91 ConstantInt::get(
llvm::
Type::getInt32Ty(Ctx), NumCounters))
93 ConstantArray::get(Int16ArrayTy, Int16ArrayVals)) \
95 ConstantInt::get(
llvm::
Type::getInt32Ty(Ctx), NumBitmapBytes))
103#ifndef INSTR_PROF_VTABLE_DATA
104#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Initializer)
106#define INSTR_PROF_VTABLE_DATA_DEFINED
110 IndexedInstrProf::ComputeHash(PGOVTableName)))
112 VTablePointer, VTableAddr)
116#undef INSTR_PROF_VTABLE_DATA
131#ifndef INSTR_PROF_VALUE_NODE
132#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Initializer)
134#define INSTR_PROF_DATA_DEFINED
137 ConstantInt::get(llvm::Type::GetInt64Ty(Ctx), 0))
139 ConstantInt::get(
llvm::
Type::GetInt64Ty(Ctx), 0))
142#undef INSTR_PROF_VALUE_NODE
149#ifndef INSTR_PROF_RAW_HEADER
150#define INSTR_PROF_RAW_HEADER(Type, Name, Initializer)
152#define INSTR_PROF_DATA_DEFINED
165 (uintptr_t)CountersBegin - (uintptr_t)DataBegin)
167 (uintptr_t)BitmapBegin - (uintptr_t)DataBegin)
172#undef INSTR_PROF_RAW_HEADER
179#ifndef VALUE_PROF_FUNC_PARAM
180#define VALUE_PROF_FUNC_PARAM(ArgType, ArgName, ArgLLVMType)
181#define INSTR_PROF_COMMA
183#define INSTR_PROF_DATA_DEFINED
184#define INSTR_PROF_COMMA ,
190#undef VALUE_PROF_FUNC_PARAM
191#undef INSTR_PROF_COMMA
195#ifndef VALUE_PROF_KIND
196#define VALUE_PROF_KIND(Enumerator, Value, Descr)
198#define INSTR_PROF_DATA_DEFINED
224VALUE_PROF_KIND(IPVK_VTableTarget, 2, "The profiled address point of the vtable")
233#undef VALUE_PROF_KIND
236#undef COVMAP_V2_OR_V3
238#define COVMAP_V2_OR_V3
241#define COVMAP_V2_OR_V3
248#ifndef COVMAP_FUNC_RECORD
249#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Initializer)
251#define INSTR_PROF_DATA_DEFINED
261#ifdef COVMAP_V2_OR_V3
263 llvm::ConstantInt::get( \
267 llvm::ConstantInt::get( \
270 llvm::ConstantInt::get( \
271 llvm::
Type::getInt64Ty(Ctx), FuncHash))
274 llvm::ConstantInt::get( \
278 CoverageMapping.size()), \
281 CoverageMapping, CoverageMapping.size(), \
284#undef COVMAP_FUNC_RECORD
291#define COVMAP_HEADER(Type, LLVMType, Name, Initializer)
293#define INSTR_PROF_DATA_DEFINED
296 llvm::ConstantInt::get(Int32Ty, NRecords))
298 llvm::ConstantInt::get(Int32Ty, FilenamesSize))
300 llvm::ConstantInt::get(Int32Ty, CoverageMappingSize))
302 llvm::ConstantInt::get(Int32Ty, CovMapVersion::CurrentVersion))
308#define COVINIT_FUNC(Type, LLVMType, Name, Initializer)
310#define INSTR_PROF_DATA_DEFINED
319#ifdef INSTR_PROF_SECT_ENTRY
320#define INSTR_PROF_DATA_DEFINED
322 INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON), \
323 INSTR_PROF_DATA_COFF,
"__DATA,")
325 INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON), \
326 INSTR_PROF_CNTS_COFF, "__DATA,")
328 INSTR_PROF_QUOTE(INSTR_PROF_BITS_COMMON), \
329 INSTR_PROF_BITS_COFF, "__DATA,")
331 INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON), \
332 INSTR_PROF_NAME_COFF, "__DATA,")
334 INSTR_PROF_QUOTE(INSTR_PROF_VNAME_COMMON), \
335 INSTR_PROF_VNAME_COFF, "__DATA,")
337 INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON), \
338 INSTR_PROF_VALS_COFF, "__DATA,")
340 INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON), \
341 INSTR_PROF_VNODES_COFF, "__DATA,")
343 INSTR_PROF_QUOTE(INSTR_PROF_VTAB_COMMON), \
344 INSTR_PROF_VTAB_COFF, "__DATA,")
346 INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON), \
347 INSTR_PROF_COVMAP_COFF, "__LLVM_COV,")
349 INSTR_PROF_QUOTE(INSTR_PROF_COVFUN_COMMON), \
350 INSTR_PROF_COVFUN_COFF, "__LLVM_COV,")
352 INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_COMMON), \
353 INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_COFF), "__DATA,")
355 INSTR_PROF_QUOTE(INSTR_PROF_COVDATA_COMMON), \
356 INSTR_PROF_COVDATA_COFF, "__LLVM_COV,")
358 INSTR_PROF_QUOTE(INSTR_PROF_COVNAME_COMMON), \
359 INSTR_PROF_COVNAME_COFF, "__LLVM_COV,")
361 INSTR_PROF_QUOTE(INSTR_PROF_COVINIT_COMMON), \
362 INSTR_PROF_COVINIT_COFF, "__LLVM_COV,")
364#undef INSTR_PROF_SECT_ENTRY
368#ifdef INSTR_PROF_VALUE_PROF_DATA
369#define INSTR_PROF_DATA_DEFINED
371#define INSTR_PROF_MAX_NUM_VAL_PER_SITE 255
376typedef struct ValueProfRecord {
407 uint32_t getNumValueSites()
const {
return NumValueSites; }
411 void deserializeTo(InstrProfRecord &Record,
412 InstrProfSymtab *SymTab);
426typedef struct ValueProfData {
459 static std::unique_ptr<ValueProfData>
460 serializeFrom(
const InstrProfRecord &Record);
464 Error checkIntegrity();
470 static Expected<std::unique_ptr<ValueProfData>>
471 getValueProfData(
const unsigned char *SrcBuffer,
472 const unsigned char *
const SrcBufferEnd,
489 void deserializeTo(InstrProfRecord &Record,
490 InstrProfSymtab *SymTab);
491 void operator delete(
void *ptr) { ::operator
delete(ptr); }
509typedef struct ValueProfRecordClosure {
511 uint32_t (*GetNumValueKinds)(
const void *Record);
522 void (*GetValueForSite)(
const void *
R, InstrProfValueData *Dst,
uint32_t K,
524 ValueProfData *(*AllocValueProfData)(
size_t TotalSizeInBytes);
525} ValueProfRecordClosure;
527INSTR_PROF_VISIBILITY ValueProfRecord *
528getFirstValueProfRecord(ValueProfData *VPD);
529INSTR_PROF_VISIBILITY ValueProfRecord *
530getValueProfRecordNext(ValueProfRecord *VPR);
531INSTR_PROF_VISIBILITY InstrProfValueData *
532getValueProfRecordValueData(ValueProfRecord *VPR);
534getValueProfRecordHeaderSize(
uint32_t NumValueSites);
536#undef INSTR_PROF_VALUE_PROF_DATA
540#ifdef INSTR_PROF_COMMON_API_IMPL
541#define INSTR_PROF_DATA_DEFINED
543#define INSTR_PROF_INLINE inline
544#define INSTR_PROF_NULLPTR nullptr
546#define INSTR_PROF_INLINE
547#define INSTR_PROF_NULLPTR NULL
551#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
560INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
uint32_t
561getValueProfRecordHeaderSize(
uint32_t NumValueSites) {
563 sizeof(
uint8_t) * NumValueSites;
573INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
uint32_t
575 return getValueProfRecordHeaderSize(NumValueSites) +
576 sizeof(InstrProfValueData) * NumValueData;
582INSTR_PROF_VISIBILITY INSTR_PROF_INLINE InstrProfValueData *
583getValueProfRecordValueData(ValueProfRecord *This) {
584 return (InstrProfValueData *)((
char *)This + getValueProfRecordHeaderSize(
585 This->NumValueSites));
591INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
uint32_t
592getValueProfRecordNumValueData(ValueProfRecord *This) {
595 for (
I = 0;
I <
This->NumValueSites;
I++)
596 NumValueData +=
This->SiteCountArray[
I];
603INSTR_PROF_VISIBILITY INSTR_PROF_INLINE ValueProfRecord *
604getValueProfRecordNext(ValueProfRecord *This) {
605 uint32_t NumValueData = getValueProfRecordNumValueData(This);
606 return (ValueProfRecord *)((
char *)This +
607 getValueProfRecordSize(
This->NumValueSites,
614INSTR_PROF_VISIBILITY INSTR_PROF_INLINE ValueProfRecord *
615getFirstValueProfRecord(ValueProfData *This) {
616 return (ValueProfRecord *)((
char *)This +
sizeof(ValueProfData));
626getValueProfDataSize(ValueProfRecordClosure *Closure) {
628 uint32_t TotalSize =
sizeof(ValueProfData);
629 const void *Record = Closure->Record;
631 for (Kind = IPVK_First;
Kind <= IPVK_Last;
Kind++) {
632 uint32_t NumValueSites = Closure->GetNumValueSites(Record, Kind);
635 TotalSize += getValueProfRecordSize(NumValueSites,
636 Closure->GetNumValueData(Record, Kind));
645INSTR_PROF_VISIBILITY
void
646serializeValueProfRecordFrom(ValueProfRecord *This,
647 ValueProfRecordClosure *Closure,
650 const void *Record = Closure->Record;
652 This->NumValueSites = NumValueSites;
653 InstrProfValueData *DstVD = getValueProfRecordValueData(This);
655 for (S = 0; S < NumValueSites; S++) {
656 uint32_t ND = Closure->GetNumValueDataForSite(Record, ValueKind, S);
657 This->SiteCountArray[S] = ND;
658 Closure->GetValueForSite(Record, DstVD, ValueKind, S);
670INSTR_PROF_VISIBILITY ValueProfData *
671serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
672 ValueProfData *DstData) {
675 DstData ? DstData->TotalSize : getValueProfDataSize(Closure);
678 DstData ? DstData : Closure->AllocValueProfData(TotalSize);
680 VPD->TotalSize = TotalSize;
681 VPD->NumValueKinds = Closure->GetNumValueKinds(Closure->Record);
682 ValueProfRecord *VR = getFirstValueProfRecord(VPD);
683 for (Kind = IPVK_First;
Kind <= IPVK_Last;
Kind++) {
684 uint32_t NumValueSites = Closure->GetNumValueSites(Closure->Record, Kind);
687 serializeValueProfRecordFrom(VR, Closure, Kind, NumValueSites);
688 VR = getValueProfRecordNext(VR);
693#undef INSTR_PROF_COMMON_API_IMPL
700#ifndef INSTR_PROF_DATA_DEFINED
702#ifndef INSTR_PROF_DATA_INC
703#define INSTR_PROF_DATA_INC
706#define INSTR_PROF_SIMPLE_QUOTE(x) #x
707#define INSTR_PROF_QUOTE(x) INSTR_PROF_SIMPLE_QUOTE(x)
708#define INSTR_PROF_SIMPLE_CONCAT(x,y) x ## y
709#define INSTR_PROF_CONCAT(x,y) INSTR_PROF_SIMPLE_CONCAT(x,y)
718#define INSTR_PROF_RAW_MAGIC_64 (uint64_t)255 << 56 | (uint64_t)'l' << 48 | \
719 (uint64_t)'p' << 40 | (uint64_t)'r' << 32 | (uint64_t)'o' << 24 | \
720 (uint64_t)'f' << 16 | (uint64_t)'r' << 8 | (uint64_t)129
721#define INSTR_PROF_RAW_MAGIC_32 (uint64_t)255 << 56 | (uint64_t)'l' << 48 | \
722 (uint64_t)'p' << 40 | (uint64_t)'r' << 32 | (uint64_t)'o' << 24 | \
723 (uint64_t)'f' << 16 | (uint64_t)'R' << 8 | (uint64_t)129
726#define INSTR_PROF_RAW_VERSION 10
728#define INSTR_PROF_INDEX_VERSION 12
730#define INSTR_PROF_COVMAP_VERSION 6
745#define VARIANT_MASKS_ALL 0xffffffff00000000ULL
746#define GET_VERSION(V) ((V) & ~VARIANT_MASKS_ALL)
747#define VARIANT_MASK_INSTR_LOOP_ENTRIES (0x1ULL << 55)
748#define VARIANT_MASK_IR_PROF (0x1ULL << 56)
749#define VARIANT_MASK_CSIR_PROF (0x1ULL << 57)
750#define VARIANT_MASK_INSTR_ENTRY (0x1ULL << 58)
751#define VARIANT_MASK_DBG_CORRELATE (0x1ULL << 59)
752#define VARIANT_MASK_BYTE_COVERAGE (0x1ULL << 60)
753#define VARIANT_MASK_FUNCTION_ENTRY_ONLY (0x1ULL << 61)
754#define VARIANT_MASK_MEMPROF (0x1ULL << 62)
755#define VARIANT_MASK_TEMPORAL_PROF (0x1ULL << 63)
756#define INSTR_PROF_RAW_VERSION_VAR __llvm_profile_raw_version
757#define INSTR_PROF_PROFILE_RUNTIME_VAR __llvm_profile_runtime
758#define INSTR_PROF_PROFILE_COUNTER_BIAS_VAR __llvm_profile_counter_bias
759#define INSTR_PROF_PROFILE_BITMAP_BIAS_VAR __llvm_profile_bitmap_bias
760#define INSTR_PROF_PROFILE_SET_TIMESTAMP __llvm_profile_set_timestamp
761#define INSTR_PROF_PROFILE_SAMPLING_VAR __llvm_profile_sampling
765#define INSTR_PROF_PROFILE_NAME_VAR __llvm_profile_filename
769#define INSTR_PROF_DATA_COMMON __llvm_prf_data
770#define INSTR_PROF_NAME_COMMON __llvm_prf_names
771#define INSTR_PROF_VNAME_COMMON __llvm_prf_vns
772#define INSTR_PROF_CNTS_COMMON __llvm_prf_cnts
773#define INSTR_PROF_BITS_COMMON __llvm_prf_bits
774#define INSTR_PROF_VALS_COMMON __llvm_prf_vals
775#define INSTR_PROF_VNODES_COMMON __llvm_prf_vnds
776#define INSTR_PROF_VTAB_COMMON __llvm_prf_vtab
777#define INSTR_PROF_COVMAP_COMMON __llvm_covmap
778#define INSTR_PROF_COVFUN_COMMON __llvm_covfun
779#define INSTR_PROF_COVDATA_COMMON __llvm_covdata
780#define INSTR_PROF_COVNAME_COMMON __llvm_covnames
781#define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile
782#define INSTR_PROF_COVINIT_COMMON __llvm_covinit
787#define INSTR_PROF_DATA_COFF ".lprfd$M"
788#define INSTR_PROF_NAME_COFF ".lprfn$M"
789#define INSTR_PROF_VNAME_COFF ".lprfvn$M"
790#define INSTR_PROF_CNTS_COFF ".lprfc$M"
791#define INSTR_PROF_BITS_COFF ".lprfb$M"
792#define INSTR_PROF_VALS_COFF ".lprfv$M"
793#define INSTR_PROF_VNODES_COFF ".lprfnd$M"
794#define INSTR_PROF_VTAB_COFF ".lprfvt$M"
795#define INSTR_PROF_COVMAP_COFF ".lcovmap$M"
796#define INSTR_PROF_COVFUN_COFF ".lcovfun$M"
800#define INSTR_PROF_COVDATA_COFF ".lcovd"
801#define INSTR_PROF_COVNAME_COFF ".lcovn"
802#define INSTR_PROF_ORDERFILE_COFF ".lorderfile$M"
806#define INSTR_PROF_COVINIT_COFF ".lcovd$M"
810#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_DATA_COFF
811#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_NAME_COFF
812#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_CNTS_COFF
813#define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_BITS_COFF
814#define INSTR_PROF_VTAB_SECT_NAME INSTR_PROF_VTAB_COFF
815#define INSTR_PROF_VNAME_SECT_NAME INSTR_PROF_VNAME_COFF
819#define INSTR_PROF_VALS_SECT_NAME INSTR_PROF_VALS_COFF
821#define INSTR_PROF_VNODES_SECT_NAME INSTR_PROF_VNODES_COFF
822#define INSTR_PROF_COVMAP_SECT_NAME INSTR_PROF_COVMAP_COFF
823#define INSTR_PROF_COVFUN_SECT_NAME INSTR_PROF_COVFUN_COFF
824#define INSTR_PROF_COVDATA_SECT_NAME INSTR_PROF_COVDATA_COFF
825#define INSTR_PROF_COVNAME_SECT_NAME INSTR_PROF_COVNAME_COFF
826#define INSTR_PROF_ORDERFILE_SECT_NAME INSTR_PROF_ORDERFILE_COFF
827#define INSTR_PROF_COVINIT_SECT_NAME INSTR_PROF_COVINIT_COFF
830#define INSTR_PROF_DATA_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_DATA_COMMON)
831#define INSTR_PROF_NAME_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_NAME_COMMON)
832#define INSTR_PROF_CNTS_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_CNTS_COMMON)
833#define INSTR_PROF_BITS_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_BITS_COMMON)
834#define INSTR_PROF_VTAB_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VTAB_COMMON)
835#define INSTR_PROF_VNAME_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VNAME_COMMON)
839#define INSTR_PROF_VALS_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VALS_COMMON)
841#define INSTR_PROF_VNODES_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_VNODES_COMMON)
842#define INSTR_PROF_COVMAP_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVMAP_COMMON)
843#define INSTR_PROF_COVFUN_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVFUN_COMMON)
844#define INSTR_PROF_COVDATA_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVDATA_COMMON)
845#define INSTR_PROF_COVNAME_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVNAME_COMMON)
847#define INSTR_PROF_ORDERFILE_SECT_NAME \
848 INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_COMMON)
849#define INSTR_PROF_COVINIT_SECT_NAME INSTR_PROF_QUOTE(INSTR_PROF_COVINIT_COMMON)
852#define INSTR_PROF_ORDERFILE_BUFFER_NAME _llvm_order_file_buffer
853#define INSTR_PROF_ORDERFILE_BUFFER_NAME_STR \
854 INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_BUFFER_NAME)
855#define INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME _llvm_order_file_buffer_idx
856#define INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME_STR \
857 INSTR_PROF_QUOTE(INSTR_PROF_ORDERFILE_BUFFER_IDX_NAME)
864#define INSTR_PROF_SECT_START(Sect) \
865 INSTR_PROF_CONCAT(__start_,Sect)
866#define INSTR_PROF_SECT_STOP(Sect) \
867 INSTR_PROF_CONCAT(__stop_,Sect)
870#define INSTR_PROF_VALUE_PROF_FUNC __llvm_profile_instrument_target
871#define INSTR_PROF_VALUE_PROF_FUNC_STR \
872 INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_FUNC)
873#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC __llvm_profile_instrument_memop
874#define INSTR_PROF_VALUE_PROF_MEMOP_FUNC_STR \
875 INSTR_PROF_QUOTE(INSTR_PROF_VALUE_PROF_MEMOP_FUNC)
878#define INSTR_PROF_DATA_ALIGNMENT 8
883typedef struct InstrProfValueData {
892#ifndef INSTR_ORDER_FILE_INC
894#define INSTR_ORDER_FILE_BUFFER_SIZE 131072
895#define INSTR_ORDER_FILE_BUFFER_BITS 17
896#define INSTR_ORDER_FILE_BUFFER_MASK 0x1ffff
899#undef INSTR_PROF_DATA_DEFINED
902#undef COVMAP_V2_OR_V3
904#ifdef INSTR_PROF_VALUE_PROF_MEMOP_API
907#define INSTR_PROF_INLINE inline
909#define INSTR_PROF_INLINE
942#define INSTR_PROF_NUM_BUCKETS 22
949#if defined(_MSC_VER) && !defined(__clang__)
952INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
953int InstProfClzll(
unsigned long long X) {
954 unsigned long LeadZeroIdx = 0;
955#if !defined(_M_ARM64) && !defined(_M_X64)
957 if (_BitScanReverse(&LeadZeroIdx, (
unsigned long)(
X >> 32)))
958 return (
int)(63 - (LeadZeroIdx + 32));
961 if (_BitScanReverse(&LeadZeroIdx, (
unsigned long)(
X)))
962 return (
int)(63 - LeadZeroIdx);
964 if (_BitScanReverse64(&LeadZeroIdx,
X))
return 63 - LeadZeroIdx;
968INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
969int InstProfPopcountll(
unsigned long long X) {
971 unsigned long long v =
X;
972 v =
v - ((
v >> 1) & 0x5555555555555555ULL);
973 v = (
v & 0x3333333333333333ULL) + ((v >> 2) & 0x3333333333333333ULL);
974 v = (
v + (
v >> 4)) & 0x0F0F0F0F0F0F0F0FULL;
975 return (
int)((
unsigned long long)(v * 0x0101010101010101ULL) >> 56);
980INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
981int InstProfClzll(
unsigned long long X) {
return __builtin_clzll(
X); }
982INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
983int InstProfPopcountll(
unsigned long long X) {
return __builtin_popcountll(
X); }
991INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
uint64_t
992InstrProfGetRangeRepValue(
uint64_t Value) {
996 else if (Value >= 513)
999 else if (InstProfPopcountll(Value) == 1)
1004 return (UINT64_C(1) << (64 - InstProfClzll(Value) - 1)) + 1;
1010INSTR_PROF_VISIBILITY INSTR_PROF_INLINE
unsigned
1011InstrProfIsSingleValRange(
uint64_t Value) {
1015 else if (InstProfPopcountll(Value) == 1)
Lower uses of LDS variables from non kernel functions
#define offsetof(TYPE, MEMBER)
#define COVMAP_HEADER(Type, LLVMType, Name, Init)
#define COVMAP_FUNC_RECORD(Type, LLVMType, Name, Init)
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
#define COVINIT_FUNC(Type, LLVMType, Name, Init)
#define INSTR_PROF_RAW_HEADER(Type, Name, Init)
#define INSTR_PROF_SECT_ENTRY(Kind, SectNameCommon, SectNameCoff, Prefix)
#define INSTR_PROF_VTABLE_DATA(Type, LLVMType, Name, Init)
#define INSTR_PROF_DATA(Type, LLVMType, Name, Init)
#define VALUE_PROF_KIND(Enumerator, Value, Descr)
#define INSTR_PROF_VALUE_NODE(Type, LLVMType, Name, Init)
#define VALUE_PROF_FUNC_PARAM(ParamType, ParamName, ParamLLVMType)
static unsigned getSize(unsigned Kind)
static ArrayType * get(Type *ElementType, uint64_t NumElements)
This static method is the primary way to construct an ArrayType.
static Constant * getRaw(StringRef Data, uint64_t NumElements, Type *ElementTy)
getRaw() constructor - Return a constant with array type with an element count and element type match...
static Constant * getBitCast(Constant *C, Type *Ty, bool OnlyIfReduced=false)
static PointerType * getUnqual(Type *ElementType)
This constructs a pointer to an object of the specified type in the default address space (address sp...
static IntegerType * getInt8Ty(LLVMContext &C)
static IntegerType * getInt32Ty(LLVMContext &C)
static IntegerType * getInt64Ty(LLVMContext &C)
std::enable_if_t< std::is_arithmetic< T >::value, void > swapBytes(T &value)
This is an optimization pass for GlobalISel generic memory operations.
StringRef getPGOFuncNameVarInitializer(GlobalVariable *NameVar)
Return the initializer in string of the PGO name var NameVar.