[LLVMdev] Alias Analysis Problem in LICM

ggan at codeaurora.org ggan at codeaurora.org
Tue Nov 8 22:59:44 PST 2011


> Yes. It's almost all up to the front-end. Find the place in clang
> where it emits the "any pointer" metadata, and implement something
> better.

Dan,

Thanks for replying! I have read the TBAA code in the front-end of clang.
I did consider to extend it to handle more complicated pointer cases. For
example, assigning different TBAA names to pointers pointing to different
types. According to the current design idea of TBAA, all pointers share
the same name. Thus there is no need to calculate points-to set for each
pointer, because all pointers are in the same points-to set. If we try to
split this "all-in-one" points-to set based on the object types that are
pointed to by each pointer, we also need to consider pointer assignment
and other pointer operations (e.g. address taken) to accurately calculate
points-to set for each pointer. Then, the job would become implementing an
alias analysis algorithm similar to Steensgaard's or Anderson's. Please
correct me if you think I'm wrong.

Since both algorithms were already implemented in LLVM, and then remove
from LLVM for this or that reason, it is really not necessary to repeat
the same work. Again, please correct me if I'm wrong.

Thanks again for your reply!

Gan




More information about the llvm-dev mailing list