[JITLink] Move some Block bitfields into Addressable to improve packing.

Keeping these bitfields from Block to Addressable allows them to be packed with
the bitfields at the end of Addressable, reducing the size of Block by eight
bytes.
This commit is contained in:
Lang Hames 2021-05-21 21:48:28 -07:00
parent bf6124580d
commit 2b45895df4
1 changed files with 5 additions and 2 deletions

View File

@ -135,6 +135,11 @@ private:
JITTargetAddress Address = 0;
uint64_t IsDefined : 1;
uint64_t IsAbsolute : 1;
protected:
// bitfields for Block, allocated here to improve packing.
uint64_t P2Align : 5;
uint64_t AlignmentOffset : 57;
};
using SectionOrdinal = unsigned;
@ -265,8 +270,6 @@ public:
private:
static constexpr uint64_t MaxAlignmentOffset = (1ULL << 57) - 1;
uint64_t P2Align : 5;
uint64_t AlignmentOffset : 57;
Section &Parent;
const char *Data = nullptr;
size_t Size = 0;