<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 May 15, 2013, at 8:59 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 15, 2013 at 9:46 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank" class="cremed">clattner@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's not clear to me that "builtin" is the right way to model this, but it definitely sounds like this should be an attribute on a call site (as opposed to on the function itself). What specific kinds of optimizations are we interested in doing to _Znwm calls?</blockquote>
</div><br>You can see the paper to the C++ committee, but my primary goals.</div><div class="gmail_extra"><br></div><div class="gmail_extra" style="">1) run SROA over heap memory</div><div class="gmail_extra" style="">2) pool together heap allocations on the same CFG trace</div>
<div class="gmail_extra" style="">3) promote (sufficiently small and lifetime bounded) heap allocations to stack allocations</div></div>
</blockquote></div><br><div>Ok, presumably also 4) know it returns non-aliased memory, and maybe other stuff in the future. Are you "happy" to special case operator new and new[], or should we design something more extravagant to handle other cases?</div><div><br></div><div>-Chris</div></body></html>