Skip to content

Commit dbc7ec3

Browse files
committed
Actually update the .inc files
1 parent 6c2fd11 commit dbc7ec3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler-rt/include/profile/MemProfData.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ constexpr int MantissaBits = 12;
232232
constexpr int ExponentBits = 4;
233233
constexpr uint16_t MaxMantissa = (1U << MantissaBits) - 1;
234234
constexpr uint16_t MaxExponent = (1U << ExponentBits) - 1;
235+
constexpr uint64_t MaxRepresentableValue = static_cast<uint64_t>(MaxMantissa)
236+
<< MaxExponent;
235237

236238
// Encodes a 64-bit unsigned integer into a 16-bit scaled integer format.
237239
inline uint16_t encodeHistogramCount(uint64_t Count) {
238240
if (Count == 0)
239241
return 0;
240242

241-
const uint64_t MaxRepresentableValue = static_cast<uint64_t>(MaxMantissa)
242-
<< MaxExponent;
243243
if (Count > MaxRepresentableValue)
244244
Count = MaxRepresentableValue;
245245

llvm/include/llvm/ProfileData/MemProfData.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ constexpr int MantissaBits = 12;
232232
constexpr int ExponentBits = 4;
233233
constexpr uint16_t MaxMantissa = (1U << MantissaBits) - 1;
234234
constexpr uint16_t MaxExponent = (1U << ExponentBits) - 1;
235+
constexpr uint64_t MaxRepresentableValue = static_cast<uint64_t>(MaxMantissa)
236+
<< MaxExponent;
235237

236238
// Encodes a 64-bit unsigned integer into a 16-bit scaled integer format.
237239
inline uint16_t encodeHistogramCount(uint64_t Count) {
238240
if (Count == 0)
239241
return 0;
240242

241-
const uint64_t MaxRepresentableValue = static_cast<uint64_t>(MaxMantissa)
242-
<< MaxExponent;
243243
if (Count > MaxRepresentableValue)
244244
Count = MaxRepresentableValue;
245245

0 commit comments

Comments
 (0)