<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 12, 2015, at 5:49 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" class="">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><br class=""><div class="gmail_quote">On Thu, Mar 12, 2015 at 4:06 PM Mehdi AMINI <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>> wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">================<br class="">Comment at: docs/LangRef.rst:1531<br class="">@@ +1530,3 @@<br class="">+that does not embed this target-specific detail into the IR. If you<br class="">+don't specify the string, the default specifications will be used to<br class="">+generate a Data Layout and the optimizations phases will operate<br class="">----------------<br class="">echristo wrote:<br class="">> Can you specify what you mean by specifications here?<br class="">I reused the vocabulary of the previous paragraphs in this section:<br class=""><br class="">   <span class="Apple-converted-space"> </span>target datalayout = "layout specification"<br class=""><br class="">The *layout specification* consists of a list of specifications<br class="">separated by the minus sign character ('-'). Each specification starts<br class="">with a letter and may include other information after the letter to<br class="">define some aspect of the data layout. The specifications accepted are<br class="">as follows:<br class=""></blockquote><div class=""><br class=""></div><div class="">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.</div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>How does it play with the part that says:</div><div><br class=""></div><div>"When constructing the data layout for a given target, LLVM starts with a</div><div>default set of specifications which are then (possibly) overridden by</div><div>the specifications in the ``datalayout`` keyword. The default</div><div>specifications are given in this list:</div><div><br class=""></div><div>-  ``E`` - big endian</div><div>-  ``p:64:64:64`` - 64-bit pointers with 64-bit alignment.</div><div>-  ``p[n]:64:64:64`` - Other address spaces are assumed to be the</div><div>   same as the default address space.</div><div>-  ``S0`` - natural stack alignment is unspecified</div><div>….</div><div><br class=""></div><div>“</div><div><br class=""></div><div><br class=""></div><div>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.</div><div><br class=""></div><div><br class=""></div><div>Mehdi</div><div><br class=""></div></div></body></html>