File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
compiler-rt/include/profile
llvm/include/llvm/ProfileData Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -232,14 +232,14 @@ constexpr int MantissaBits = 12;
232
232
constexpr int ExponentBits = 4 ;
233
233
constexpr uint16_t MaxMantissa = (1U << MantissaBits) - 1 ;
234
234
constexpr uint16_t MaxExponent = (1U << ExponentBits) - 1 ;
235
+ constexpr uint64_t MaxRepresentableValue = static_cast <uint64_t >(MaxMantissa)
236
+ << MaxExponent;
235
237
236
238
// Encodes a 64-bit unsigned integer into a 16-bit scaled integer format.
237
239
inline uint16_t encodeHistogramCount (uint64_t Count) {
238
240
if (Count == 0 )
239
241
return 0 ;
240
242
241
- const uint64_t MaxRepresentableValue = static_cast <uint64_t >(MaxMantissa)
242
- << MaxExponent;
243
243
if (Count > MaxRepresentableValue)
244
244
Count = MaxRepresentableValue;
245
245
Original file line number Diff line number Diff line change @@ -232,14 +232,14 @@ constexpr int MantissaBits = 12;
232
232
constexpr int ExponentBits = 4 ;
233
233
constexpr uint16_t MaxMantissa = (1U << MantissaBits) - 1 ;
234
234
constexpr uint16_t MaxExponent = (1U << ExponentBits) - 1 ;
235
+ constexpr uint64_t MaxRepresentableValue = static_cast <uint64_t >(MaxMantissa)
236
+ << MaxExponent;
235
237
236
238
// Encodes a 64-bit unsigned integer into a 16-bit scaled integer format.
237
239
inline uint16_t encodeHistogramCount (uint64_t Count) {
238
240
if (Count == 0 )
239
241
return 0 ;
240
242
241
- const uint64_t MaxRepresentableValue = static_cast <uint64_t >(MaxMantissa)
242
- << MaxExponent;
243
243
if (Count > MaxRepresentableValue)
244
244
Count = MaxRepresentableValue;
245
245
You can’t perform that action at this time.
0 commit comments