[LLVMdev] Alias Analysis Problem in LICM

Dan Gohman gohman at apple.com
Thu Nov 10 16:20:59 PST 2011


On Nov 8, 2011, at 10:59 PM, ggan at codeaurora.org wrote:

>> 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.

It's not clear to me what you're trying to do. If you're trying to speed
up a particular benchmark, there are probably other ways to achieve your
objectives with less effort. If you're interested in doing general
points-to set algorithm work in LLVM, I don't think there are any quick
shortcuts.

Dan




More information about the llvm-dev mailing list