[LLVMdev] C99 restrict

Christopher Lamb christopher.lamb at gmail.com
Sat Mar 24 23:51:09 PDT 2007




On Mar 25, 2007, at 2:18 AM, Chris Lattner wrote:

> On Sat, 24 Mar 2007, Christopher Lamb wrote:
>> Has there been any discussion of supporting the 'restrict' C99  
>> keyword
>> and C++ extension to boost alias analysis? My impression is that this
>> would require modification of the LLVM IR. I couldn't find any
>> discussion hits using the usual suspects for searches...
>
> So far, there hasn't been a discussion.  IMO, the most important  
> form is
> for formal arguments.  That could easily be added thorough the use  
> of an
> attribute on the parameter.

I assume the idea here is to avoid actually attributing the type (as  
was avoided with signed/unsigned integers by differentiating ops).

What about an approach not unlike how debugging information is  
handled? That is have an llvm intrinsic that encodes the known alias  
free range for a pointer.

--
Christopher Lamb
christopher.lamb at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070325/8dbfadf9/attachment.html>


More information about the llvm-dev mailing list