liyi at cs.toronto.edu
Mon Dec 5 13:54:58 PST 2011
Duncan Sands <baldrick <at> free.fr> writes:
> Hi Yi,
> > Could anyone tell me how exactly do I use "Type Based Alias Analysis"?
> > I compiled the C program with Clang, and verified that there is tbaa
> > metadata in the IR code.
> > But then when I use "opt -tbaa input.c.bc -aa-eval" to check the results,
> > it always gives 100% may aliasing no matter what input.
> you need to run some optimizations on your bitcode, at least mem2reg, to get
> it in a form where alias analysis will do something useful.
> Ciao, Duncan.
Thanks for the advice. But I tried -mem2reg. It gives me the same results:
everything may alias while -basicaa give more meaningful results.
Have you made -tbaa working before? Could you show me the optimizations you used?
More information about the llvm-dev