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

Mehdi Amini mehdi.amini at apple.com
Thu Mar 12 17:52:28 PDT 2015


> 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 <mailto: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.


Mehdi

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


More information about the llvm-commits mailing list