Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/include/profile/InstrProfData.inc
Show First 20 Lines • Show All 866 Lines • ▼ Show 20 Lines | InstrProfGetRangeRepValue(uint64_t Value) { | ||||
else if (Value >= 513) | else if (Value >= 513) | ||||
// The last range is mapped to its lowest value. | // The last range is mapped to its lowest value. | ||||
return 513; | return 513; | ||||
else if (InstProfPopcountll(Value) == 1) | else if (InstProfPopcountll(Value) == 1) | ||||
// If it's a power of two, use it as is. | // If it's a power of two, use it as is. | ||||
return Value; | return Value; | ||||
else | else | ||||
// Otherwise, take to the previous power of two + 1. | // Otherwise, take to the previous power of two + 1. | ||||
return (1 << (64 - InstProfClzll(Value) - 1)) + 1; | return (UINT64_C(1) << (64 - InstProfClzll(Value) - 1)) + 1; | ||||
} | } | ||||
/* Return true if the range that an (observed) memop size value belongs to has | /* Return true if the range that an (observed) memop size value belongs to has | ||||
* only a single value in the range. For example, 0 -> true, 8 -> true, 10 -> | * only a single value in the range. For example, 0 -> true, 8 -> true, 10 -> | ||||
* false, 64 -> true, 100 -> false, 513 -> false. */ | * false, 64 -> true, 100 -> false, 513 -> false. */ | ||||
INSTR_PROF_VISIBILITY INSTR_PROF_INLINE unsigned | INSTR_PROF_VISIBILITY INSTR_PROF_INLINE unsigned | ||||
InstrProfIsSingleValRange(uint64_t Value) { | InstrProfIsSingleValRange(uint64_t Value) { | ||||
if (Value <= 8) | if (Value <= 8) | ||||
Show All 11 Lines |