<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Nov 19, 2013, at 12:28 PM, Benjamin Kramer <<a href="mailto:benny.kra@googlemail.com">benny.kra@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="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;">Author: d0k<br>Date: Tue Nov 19 14:28:04 2013<br>New Revision: 195150<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=195150&view=rev">http://llvm.org/viewvc/llvm-project?rev=195150&view=rev</a><br>Log:<br>DataLayout: value initialize globals to avoid static construction.<br></div></blockquote><div dir="auto"><br></div><div dir="auto">Nice!  Random thought: how difficult would it be to get globalopt to "constant fold" these initializers?  </div><div dir="auto"><br></div><div dir="auto">-Chris</div><div dir="auto"><br></div><br><blockquote type="cite"><div style="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;"><br>Modified:<br>   llvm/trunk/lib/IR/DataLayout.cpp<br><br>Modified: llvm/trunk/lib/IR/DataLayout.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=195150&r1=195149&r2=195150&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=195150&r1=195149&r2=195150&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/IR/DataLayout.cpp (original)<br>+++ llvm/trunk/lib/IR/DataLayout.cpp Tue Nov 19 14:28:04 2013<br>@@ -118,7 +118,7 @@ LayoutAlignElem::operator==(const Layout<br>}<br><br>const LayoutAlignElem<br>-DataLayout::InvalidAlignmentElem = LayoutAlignElem::get(INVALID_ALIGN, 0, 0, 0);<br>+DataLayout::InvalidAlignmentElem = { INVALID_ALIGN, 0, 0, 0 };<br><br>//===----------------------------------------------------------------------===//<br>// PointerAlignElem, PointerAlign support<br>@@ -145,7 +145,7 @@ PointerAlignElem::operator==(const Point<br>}<br><br>const PointerAlignElem<br>-DataLayout::InvalidPointerElem = PointerAlignElem::get(~0U, 0U, 0U, 0U);<br>+DataLayout::InvalidPointerElem = { 0U, 0U, 0U, ~0U };<br><br>//===----------------------------------------------------------------------===//<br>//                       DataLayout Class Implementation<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></body></html>