Program Dependence Graph (PDG) in LLVM

Hi,

Is there a way to use LLVM to build the visual representation of program dependence graph (PDG) of a routine/program?

From looking at https://llvm.org/svn/llvm-project/poolalloc/branches/release_14/lib/DSA/PgmDependenceGraph.cpp, it looks like there is an incomplete implementation of PDG in LLVM. However, when I search within LLVM3.0 package, I don’t find the .cpp/h code. So, I also wonder if this code is no longer supported.

Thanks!
M.

No, I don’t think we maintain this code anymore, and I’m pretty sure it’s not in mainline LLVM, either. People are welcome, of course, to get it working again and to contribute it. Poolalloc has a release_30 branch for LLVM 3.0, and poolalloc mainline is following LLVM mainline (although compilation sometimes breaks because we have limited bandwidth for updating our code to handle LLVM API changes). If someone were to work on a Program Dependence Graph analysis, they may wish to examine one of the other pointer analysis implementations for LLVM (e.g., Hardekopf’s Anderson’s analysis) to see if it will yield better results than DSA. – John T.