[LLVMdev] LLD: representation of a power of two value

Rui Ueyama ruiu at google.com
Wed Mar 25 19:30:16 PDT 2015


I submitted a series of patches to convert all uses of log2 values to
non-log2 values (That was harder than I thought because the types of the
two are the same. They only different in meaning. So it was not easy to
distinguish them. I split up patches so that anyone can verify correctness
of the conversion that I've done.)

>From now on, please always use non-log2 alignment values exclusively in
LLD. Thanks!

On Wed, Mar 25, 2015 at 12:16 PM, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> 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?
>>
>
> The only theoretical objection I can imagine is that you can use much less
> storage for holding the log2(X). But right now that isn't causing us any
> problems it seems.
>
> -- Sean Silva
>
>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150325/1aefca22/attachment.html>


More information about the llvm-dev mailing list