[LLVMdev] strict aliasing and LLVM

Xinliang David Li xinliangli at gmail.com
Fri Oct 29 11:35:52 PDT 2010


Thanks for the -m tip to pass llvm options.  Why is it not documented
anywhere. See http://clang.llvm.org/docs/UsersManual.html#commandline

<http://clang.llvm.org/docs/UsersManual.html#commandline>David

On Fri, Oct 29, 2010 at 2:17 AM, Benjamin Kramer
<benny.kra at googlemail.com>wrote:

>
> On 29.10.2010, at 09:26, Nick Lewycky wrote:
>
> >  * If clang -O2 worked by running 'opt' and 'llc' under the hood, we
> > could tell it to pass a flag along to them, but it doesn't. As it
> > stands, you can't turn -enable-tbaa on when running clang.
> >
> > So, putting that together, one way to do it is:
> >
> >   clang -O2 -fstrict-aliasing foo.c -flto -c -o foo.bc
> >   opt -O2 -enable-tbaa foo.bc foo2.bc
> >   llc -O2 -enable-tbaa foo2.bc -o foo2.s
>
> clang -O2 foo.c -S -o foo.s -mllvm -enable-tbaa
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101029/bc440b07/attachment.html>


More information about the llvm-dev mailing list