[LLVMdev] strict aliasing and LLVM

Xinliang David Li xinliangli at gmail.com
Wed Oct 27 17:58:01 PDT 2010


Thanks. Just built clang and saw the meta data and annotations on the memory
accesses --  is any opt pass consuming the information?

By the way the build instruction in this page
http://clang.llvm.org/get_started.html needs to be updated -- it recommends
config (with default settings) and build llvm in the source dir -- it leaves
some 'sticky' generated files in the source dir leading to building
problems.

David

2010/10/27 Rafael EspĂ­ndola <rafael.espindola at gmail.com>

> On 27 October 2010 18:17, Xinliang David Li <xinliangli at gmail.com> wrote:
> > Is type based aliasing implemented in LLVM? Simple test case shows it is
> > not, or an option similar to -fstrict-aliasing is needed?
>
> It is being implemented. You have to use clang, not llvm-gcc. The
> types are encoded as metadata. Compile with -OX and and look for the
> TBAA metadata in the .ll file.
>
> > Thanks,
> > David
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101027/15492d18/attachment.html>


More information about the llvm-dev mailing list