[LLVMdev] strict aliasing and LLVM

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Oct 27 15:37:23 PDT 2010


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



More information about the llvm-dev mailing list