[LLVMdev] noalias for functions?

Andrew Clinton andrew at sidefx.com
Tue Feb 8 18:47:17 PST 2011


I'm looking for a way to mark a function that may read and/or write to 
it's pointer arguments but that does not read or write to any other 
memory.  Is there a combination of attributes that makes this possible?  
The best I can find is the readnone/readonly and noalias attributes, but 
it doesn't seem to be possible to indicate that it's only the pointer 
arguments that are read or modified (and not all the other global state).

Here's a reference to a visual studio attribute that is essentially what 
I want:

http://msdn.microsoft.com/en-us/library/k649tyc7%28v=vs.80%29.aspx

Andrew



More information about the llvm-dev mailing list