[LLVMdev] Type-Based Alias Analysis

Chris Lattner sabre at nondot.org
Sat Oct 6 18:18:03 PDT 2007


On Oct 6, 2007, at 8:54 AM, Jon Sargeant wrote:

> I should have been more specific in my earlier post about slicing and
> pointer casting.  I come from a C++ background where pointer  
> casting is
> particularly dangerous because the compiler is allowed to assume that
> unrelated pointers never address the same location in memory.  Even
> doing a "safe" array slice (e.g., casting int(*)[5] to int(*)[3])
> results in undefined behavior.  Is this an issue with LLVM?

No, LLVM doesn't use TBAA.

-Chris



More information about the llvm-dev mailing list