<div dir="ltr"><br><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 5:52 PM Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Mar 12, 2015, at 5:49 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br><div><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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><br><div class="gmail_quote">On Thu, Mar 12, 2015 at 4:06 PM Mehdi AMINI <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>> wrote:<br><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>Comment at: docs/LangRef.rst:1531<br>@@ +1530,3 @@<br>+that does not embed this target-specific detail into the IR. If you<br>+don't specify the string, the default specifications will be used to<br>+generate a Data Layout and the optimizations phases will operate<br>----------------<br>echristo wrote:<br>> Can you specify what you mean by specifications here?<br>I reused the vocabulary of the previous paragraphs in this section:<br><br>   <span> </span>target datalayout = "layout specification"<br><br>The *layout specification* consists of a list of specifications<br>separated by the minus sign character ('-'). Each specification starts<br>with a letter and may include other information after the letter to<br>define some aspect of the data layout. The specifications accepted are<br>as follows:<br></blockquote><div><br></div><div>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></div><div><br></div></div></div><div style="word-wrap:break-word"><div><div>How does it play with the part that says:</div><div><br></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></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></div><div>“</div><div><br></div><div><br></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></div><div style="word-wrap:break-word"><div><div><br></div></div></div></blockquote><div><br></div><div>OK, random is perhaps a poor choice of words. "Sparc64" is probably closer :)</div><div><br></div><div>That said, I guess your patch is OK since we've got the other text. </div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div></div><div><br></div><div>Mehdi</div><div><br></div></div></div></blockquote></div></div>