diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-07-01 21:57:51 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-07-01 21:57:51 +0000 |
commit | abcac11d1b28f0c52a1c2eff28e9a0930a6602e7 (patch) | |
tree | 1d9c123f8171800fd416e67cbc04847105427071 /llvm/lib/MC/MCSymbol.cpp | |
parent | 67bb9f7f635c927f52a3ddb77e517b6d844fc517 (diff) | |
download | llvm-abcac11d1b28f0c52a1c2eff28e9a0930a6602e7.zip llvm-abcac11d1b28f0c52a1c2eff28e9a0930a6602e7.tar.gz llvm-abcac11d1b28f0c52a1c2eff28e9a0930a6602e7.tar.bz2 |
Pack MCSymbol::Flags in to the bitfield with other members. NFC.
All file formats only needed 16-bits right now which is enough to fit
in to the padding with other fields.
This reduces the size of MCSymbol to 24-bytes on a 64-bit system. The
layout is now
0 | class llvm::MCSymbol
0 | class llvm::PointerIntPair SectionOrFragmentAndHasName
0 | intptr_t Value
| [sizeof=8, dsize=8, align=8
| nvsize=8, nvalign=8]
8 | unsigned int IsTemporary
8 | unsigned int IsRedefinable
8 | unsigned int IsUsed
8 | _Bool IsRegistered
8 | unsigned int IsExternal
8 | unsigned int IsPrivateExtern
8 | unsigned int Kind
9 | unsigned int IsUsedInReloc
9 | unsigned int SymbolContents
9 | unsigned int CommonAlignLog2
10 | uint32_t Flags
12 | uint32_t Index
16 | union
16 | uint64_t Offset
16 | uint64_t CommonSize
16 | const class llvm::MCExpr * Value
| [sizeof=8, dsize=8, align=8
| nvsize=8, nvalign=8]
| [sizeof=24, dsize=24, align=8
| nvsize=24, nvalign=8]
llvm-svn: 241196
Diffstat (limited to 'llvm/lib/MC/MCSymbol.cpp')
-rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index 2655a18..affc574 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/lib/MC/MCSymbol.cpp @@ -20,6 +20,7 @@ using namespace llvm; MCSection *MCSymbol::AbsolutePseudoSection = reinterpret_cast<MCSection *>(1); const unsigned MCSymbol::NumCommonAlignmentBits; +const unsigned MCSymbol::NumFlagsBits; void *MCSymbol::operator new(size_t s, const StringMapEntry<bool> *Name, MCContext &Ctx) { |