[LLVMdev] GSoc 2009 (Bad Subject in the previous email)
baldrick at free.fr
Wed Apr 1 14:11:17 PDT 2009
Hi Ehsan, my understanding is that gcc is informed by
language front-ends about types S and T for which an S*
can alias a T*. This information amounts to a graph
with types as nodes and an arrow from S to T if an S*
can alias a T*. Probably C unions result in such edges,
and I know the Ada front-end produces all kinds of info
This information would somehow need to be communicated
to LLVM, so represented in the LLVM IR somehow. What is
the best way to do this?
Note that since multiple gcc types map to the same LLVM type,
the graph would need to be collapsed in order to be in terms
of LLVM types, and this might remove a lot of important
information. How to evaluate whether LLVM TBAA would actually
be effective in practice?
Finally LLVM alias analysis would need to be enhanced to
exploit the knowledge that an S* cannot alias a T* if there
is no path from S to T in the graph.
Anyway, that's how I always imagined LLVM TBAA would work
on a meta-level. Since I actually don't know anything much
about TBAA you should take this with a large pinch of salt!
More information about the llvm-dev