diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-07-01 21:07:03 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-07-01 21:07:03 +0000 |
commit | acfd55b039f8bc29b34dd9df89c71f7183793269 (patch) | |
tree | e705413fa045079a5f2f48f15e46771cebcc2503 /llvm/lib/MC/MCSymbol.cpp | |
parent | 3992e2c7427ca7dd5f914f6632625ab61fb2481e (diff) | |
download | bcm5719-llvm-acfd55b039f8bc29b34dd9df89c71f7183793269.tar.gz bcm5719-llvm-acfd55b039f8bc29b34dd9df89c71f7183793269.zip |
Encode MCSymbol alignment as log2(align).
Given that alignments are always powers of 2, just encode it this way.
This matches how we encode alignment on IR GlobalValue's for example.
This compresses the CommonAlign member down to 5 bits which allows it
to pack better with the surrounding fields.
Reviewed by Duncan Exon Smith.
llvm-svn: 241189
Diffstat (limited to 'llvm/lib/MC/MCSymbol.cpp')
-rw-r--r-- | llvm/lib/MC/MCSymbol.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSymbol.cpp b/llvm/lib/MC/MCSymbol.cpp index 125380a9d14..2655a181a23 100644 --- a/llvm/lib/MC/MCSymbol.cpp +++ b/llvm/lib/MC/MCSymbol.cpp @@ -19,6 +19,8 @@ using namespace llvm; // Sentinel value for the absolute pseudo section. MCSection *MCSymbol::AbsolutePseudoSection = reinterpret_cast<MCSection *>(1); +const unsigned MCSymbol::NumCommonAlignmentBits; + void *MCSymbol::operator new(size_t s, const StringMapEntry<bool> *Name, MCContext &Ctx) { // We may need more space for a Name to account for alignment. So allocate |