<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On Jun 25, 2007, at 8:57 AM, Zhou Sheng wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>Hi All,</DIV> <DIV> </DIV> <DIV>Here is the llvm-gcc patch for PR1373. It makes llvm-gcc to emit noalias parameter attribute as well as noalias intrinsic. Note this patch is just for review. Please give me some suggestion to improve it. Thanks.</DIV> <DIV><BR class="khtml-block-placeholder"></DIV></BLOCKQUOTE><BR></DIV><DIV>The patch looks good.  I'd suggest splitting it into two changes though:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>First, introduce the parameter attribute.  Your code to do this looks good, but please add support for REFERENCE_TYPE as well (for c++ restrict references).  When this goes in, basicaa can be enhanced to use this info and we can get some idea how well this works.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>As a second step, the <FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">noalias intrinsic can be added.  This is more likely to disrupt code, and we'll have to closely monitor it when it goes it (we don't want it to block mem2reg etc).  In practice, we'll want to add the intrinsic to llvm, then start updating important optimizations to see through it (e.g. mem2reg and scalarrepl), then turn it on in the front-end.</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">If you send a patch for just adding restrict support for arguments, that handles pointers and references, I'd be happy to check it in.  Nice work!</SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;"><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV><FONT class="Apple-style-span" face="Monaco" size="2"><SPAN class="Apple-style-span" style="font-size: 10px;">-Chris</SPAN></FONT></DIV></BODY></HTML>