[llvm-commits] [llvm] r61030 - in /llvm/trunk: include/llvm/Attributes.h lib/AsmParser/llvmAsmParser.y lib/Bitcode/Writer/BitcodeWriter.cpp lib/VMCore/Attributes.cpp
nicholas at mxc.ca
Mon Dec 15 20:41:44 PST 2008
Duncan Sands wrote:
> Hi Nick,
>> It turns out that "align 1" and unaligned are different. Add a bias to the
>> alignment attribute such that 0 means unaligned.
> what happens if a function is aligned 1024 or something huge like that?
> Also, I don't think 0 means unaligned, I think it means default alignment.
You're right, by unaligned I meant default alignment. I was trying to
distinguish it from byte aligned (align 1).
We support "huge" alignments like 1024 just fine. It's a 5-bit integer
[0..31] whose mapping looks like this:
0 - default alignment
1 - align 1
2 - align 2
3 - align 4
4 - align 8
30 - align 2^29
31 - align 2^30
I should mention that previously, we were silently dropping any
alignment larger than 32768.
>> + // 0 means unaligned different from align 1
> -> 0 means default alignment
More information about the llvm-commits