[cfe-users] Whole program analysis using LTO
Subhendu Malakar via cfe-users
cfe-users at lists.llvm.org
Fri Oct 6 03:52:08 PDT 2017
Hi,
I want to do an inter-module analysis of a C project which contains multiple C files.
I've written the pass as an extension of the ModulePass but I cannot get the information about other modules. I was looking into it and there seems to be a way to do it via Link Time Optimization (LTO). But I was not able to find an example on how to write an analysis pass for such optimization. All the examples just mention how to compile the code using LTO i.e, passing "-flto" and "-fuse-ld=gold" to clang. Can anybody point me to some example on how to write pass for LTO?
The requirement can be seen as generating the CallGraph along with the CFG for the whole project. The project uses Makefile to generate executable.
Thanks,
Subhendu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20171006/f1771b44/attachment.html>
More information about the cfe-users
mailing list