[cfe-dev] How to disable alias analysis in clang?
Konstantin Tokarev
annulen at yandex.ru
Wed Jul 10 02:37:18 PDT 2013
10.07.2013, 13:11, "John McCall" <rjmccall at apple.com>:
> On Jul 5, 2013, at 11:34 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:
>
>> I've tried to use -fno-strict-aliasing flag, however, when I add -mllvm -debug-pass=Arguments to clang arguments, I still see -tbaa and -basicaa in pass list. -mllvm -enable-tbaa=0 does not help too.
>
> -fno-strict-aliasing should be sufficient to disable type-based alias analysis; even if the pass is in the list, the frontend won't emit any of the type annotations that it uses.
>
> Basic alias analysis just tells us things like "two independent variables don't alias". I don't know why you'd want to turn that off, but if you really want that level of control, you should disable the builtin passes, output IR, and build your own pass list with opt.
>
> John.
Thanks!
--
Regards,
Konstantin
More information about the cfe-dev
mailing list