On Oct 29, 2010, at 11:35 AM, Xinliang David Li wrote:> Thanks for the -m tip to pass llvm options. Why is it not documented anywhere. See http://clang.llvm.org/docs/UsersManual.html#commandline-mllvm flags are somewhat equivalent to gcc -param options. -mllvm flags are for compiler hackers to play with, and are not stable or documented. Once TBAA is stable and reliable it will be controlled with -fstrict-aliasing as you'd expect. -Chris> > 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 > > _______________________________________________ > 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/2a8692c4/attachment.html>
On Fri, Oct 29, 2010 at 3:54 PM, Chris Lattner <clattner at apple.com> wrote:> On Oct 29, 2010, at 11:35 AM, Xinliang David Li wrote: > > Thanks for the -m tip to pass llvm options. Why is it not documented > anywhere. See http://clang.llvm.org/docs/UsersManual.html#commandline > > > -mllvm flags are somewhat equivalent to gcc -param options. -mllvm flags > are for compiler hackers to play with, and are not stable or documented. > Once TBAA is stable and reliable it will be controlled with > -fstrict-aliasing as you'd expect. > >-mllvm is also useful for passing options like -print-after=xxx. May be it should be mentioned when invoking 'clang --help-hidden'. Thanks, David> -Chris > > > <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 >> > > _______________________________________________ > 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/df1df500/attachment.html>
On Oct 29, 2010, at 4:08 PM, Xinliang David Li wrote:> > > On Fri, Oct 29, 2010 at 3:54 PM, Chris Lattner <clattner at apple.com> wrote: > On Oct 29, 2010, at 11:35 AM, Xinliang David Li wrote: >> Thanks for the -m tip to pass llvm options. Why is it not documented anywhere. See http://clang.llvm.org/docs/UsersManual.html#commandline > > -mllvm flags are somewhat equivalent to gcc -param options. -mllvm flags are for compiler hackers to play with, and are not stable or documented. Once TBAA is stable and reliable it will be controlled with -fstrict-aliasing as you'd expect. > > > -mllvm is also useful for passing options like -print-after=xxx. May be it should be mentioned when invoking 'clang --help-hidden'.But that's another example of something for compiler hackers, which isn't stable or documented :-) -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101029/174f631f/attachment.html>