<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 7, 2012, at 5:22 PM, Jakob Stoklund Olesen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 7, 2012, at 4:33 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Optima; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">However, it does seem like this should be no more than an 'and' instruction in the worst case (we don't have known alignment of the stack).</span></blockquote></div><br><div>Realigning the stack requires the function to have a frame pointer, so frame pointer elimination is no longer possible. If you have dynamically sized allocas, a reserved base pointer register is also necessary.</div><div><br></div><div>Reserving 2 out of 7 registers on x86 can have quite the performance impact.</div><div><br></div><div>Base pointer support is quite new, BTW. </div></div></blockquote><div><br></div><div>Very new: <a href="http://llvm.org/viewvc/llvm-project?rev=158087&view=rev">http://llvm.org/viewvc/llvm-project?rev=158087&view=rev</a> </div><div><br></div><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Previously, we simply refused to compile functions that required stack realignment and dynamic allocas.</div></div></blockquote><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div></div></div></div></div><div>Actually, clang was silently miscompiling the code. :/</div><div><br></div><div> Chad</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>/jakob</div><div><br></div></div>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>