Encode MCSymbol alignment as log2(align).
authorPete Cooper <peter_cooper@apple.com>
Wed, 1 Jul 2015 21:07:03 +0000 (21:07 +0000)
committerPete Cooper <peter_cooper@apple.com>
Wed, 1 Jul 2015 21:07:03 +0000 (21:07 +0000)
commitf77ca9f85f056e9020b5aeed045dffe3fcd0d154
tree6b3a2eee22aaa76970fe647886c8d3b8f9593314
parent8a1df9b25f37be9fcd33624581d5dcc05f118e06
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241189 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCSymbol.h
lib/MC/MCSymbol.cpp