[LLVMdev] LLD: representation of a power of two value
davide at freebsd.org
Tue Mar 24 17:19:52 PDT 2015
On Tue, Mar 24, 2015 at 5:09 PM, Rui Ueyama <ruiu at google.com> wrote:
> It's not a big deal, but it always annoyed me a bit when I hit it, so I'll
> bring it up here.
> LLD represents an alignment X as log2(X) in some places and just X in other
> places. It's a bit confusing. Because I always think alignments in my mind
> in terms of 1, 2, 4, 8, ..., instead of 2^1, 2^2, 2^3, ..., I'd like to
> propose to always use real values.
> Any objections?
I'm in favor of this change, not only for consistency but because I
feel the same way as you.
I've recently hit some alignment issues linking on FreeBSD and it will
be easier for me to reason about them if you make this change.
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-dev