[llvm-commits] [llvm] r59940 - in /llvm/trunk: docs/LangRef.html lib/Analysis/BasicAliasAnalysis.cpp

Nick Lewycky nicholas at mxc.ca
Sun Nov 23 23:43:47 PST 2008


Török Edwin wrote:
> On 2008-11-24 07:00, Nick Lewycky wrote:
>> Author: nicholas
>> Date: Sun Nov 23 23:00:44 2008
>> New Revision: 59940
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=59940&view=rev
>> Log:
>> Seriously strengthen the guarantee offered by noalias on a function's return
>> value. It must now be as if the pointer were allocated and has not escaped to
>> the caller. Thanks to Dan Gohman for pointing out the error in the original
>> and helping devise this definition.
>>
>>   
> 
> malloc(0) is allowed to return a unique pointer, instead of NULL.
> Does this code handle that?

Sure, a noalias function can return NULL or a unique pointer. Returning 
NULL is sufficient to not alias.

Nick



More information about the llvm-commits mailing list