[LLVMdev] BasicAliasAnalysis: Null pointers do not alias with anything
clattner at apple.com
Wed Nov 4 10:33:54 CST 2009
On Nov 4, 2009, at 7:19 AM, Daniel Berlin wrote:
> On Wed, Nov 4, 2009 at 4:51 AM, Hans Wennborg <hans at hanshq.net> wrote:
>> The reason is that it is unsure whether the null pointer which is
>> passed in
>> the call to @foo may alias with %t. Obviously, a null pointer
>> doesn't alias
>> with anything, because it's not legal to read or write through it
> I don't remember whether LLVM's language spec says anything different,
> but whether null may alias anything is generally platform dependent.
> On some platforms, null may actually point to things and be
> dereferenced legally.
> (This is often used to speculatively executive conditionals involving
Our current policy is to disallow dereferences of the null pointer,
unless they are in the non-default address space.
More information about the LLVMdev