[PATCH] Update LangRef now that a DataLayout is mandatory.

Eric Christopher echristo at gmail.com
Thu Mar 12 17:56:15 PDT 2015


On Thu, Mar 12, 2015 at 5:52 PM Mehdi Amini <mehdi.amini at apple.com> wrote:

> On Mar 12, 2015, at 5:49 PM, Eric Christopher <echristo at gmail.com> wrote:
>
>
>
> On Thu, Mar 12, 2015 at 4:06 PM Mehdi AMINI <mehdi.amini at apple.com> wrote:
>
>> ================
>> Comment at: docs/LangRef.rst:1531
>> @@ +1530,3 @@
>> +that does not embed this target-specific detail into the IR. If you
>> +don't specify the string, the default specifications will be used to
>> +generate a Data Layout and the optimizations phases will operate
>> ----------------
>> echristo wrote:
>> > Can you specify what you mean by specifications here?
>> I reused the vocabulary of the previous paragraphs in this section:
>>
>>     target datalayout = "layout specification"
>>
>> The *layout specification* consists of a list of specifications
>> separated by the minus sign character ('-'). Each specification starts
>> with a letter and may include other information after the letter to
>> define some aspect of the data layout. The specifications accepted are
>> as follows:
>>
>
> Bleh. So, I think it's more complicated it's either a) if you have a
> target then you get that data layout, or b) if you don't then you get the
> really random data layout.
>
>
>
> How does it play with the part that says:
>
> "When constructing the data layout for a given target, LLVM starts with a
> default set of specifications which are then (possibly) overridden by
> the specifications in the ``datalayout`` keyword. The default
> specifications are given in this list:
>
> -  ``E`` - big endian
> -  ``p:64:64:64`` - 64-bit pointers with 64-bit alignment.
> -  ``p[n]:64:64:64`` - Other address spaces are assumed to be the
>    same as the default address space.
> -  ``S0`` - natural stack alignment is unspecified
> ….
>
>>
>
> It is not a “Random Data Layout”. I’d like the idea of not specifying the
> default (so that we can change it) but currently it seems well defined.
>
>
OK, random is perhaps a poor choice of words. "Sparc64" is probably closer
:)

That said, I guess your patch is OK since we've got the other text.

-eric


>
> Mehdi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150313/c9411900/attachment.html>


More information about the llvm-commits mailing list