[LLVMdev] Is there a guide to LLVM's components?

David Piepgrass dpiepgrass at mentoreng.com
Thu Jul 22 12:43:15 PDT 2010

> > I found an LLVM dependency graph at
> >
> > https://llvm.org/svn/llvm-
> project/llvm/tags/RELEASE_16/docs/UsingLibraries.html#dependencies
> >
> > but it's really messy and hard to follow. From that graph I made a
> > cleaner graph by hand (attached)... sorry about the fax-quality
> > scan. But I have some questions about it...
> >
> > -          How old is this graph?
> It is for the 1.6 release. Now we are at 2.7. So figure out.
> > -          Is anything missing?
> Sure.
> > - The web page says "Where a library has both archive and object
> > forms, only the archive form is shown." Are "archive library" and
> > "object library" the names Unix uses for dynamic link libraries and
> > static libraries? What difference does it make to the dependency
> graph whether a library is "archive" or "object"?
> This is obsolete and never concerned to Visual Studio anyways.
> If you are interested on dependency info look at
> cmake/modules/LLVMLibDeps.cmake. It is not the prettiest thing to see,
> but maybe you can get something from it.

Well, I take it this means my manually-constructed graph is crap. Well, I decided to try using automated tools such as graphvis and something called "DepCharter" to construct a more up-to-date graph. Including all targets on the graph produced a useless mess, so I removed most of the stuff from "tools", "utils" and "examples" folders (except HowToUseJIT) to produce another graph (attached).

But this graph raises some new questions, and I don't think it is conceptually accurate.

- What is intrinsics_gen and why does pretty much everything depend on it?

- The graph says that nothing except HowToUseJIT depends on LLVMCore. In fact, there are very few dependencies between different libraries.... for example, unlike the earlier graph, it says LLVMAnalysis, LLVMTransformUtils and LLVMScalarOpts DO NOT depend on each other. This is all wrong, right? I think the problem is that it's a graph of BUILD dependencies, not real dependencies: for example LLVMAnalysis and LLVMCore libraries can be BUILT independently, because LLVMAnalysis' doesn't depend on LLVMCore until link time. Therefore only executables, such as HowToUseJIT, actually needs to list LLVMCore as a dependency. Yes?

I produced another graph by adapting cmake/modules/LLVMLibDeps.cmake to a graphvis "dot" file, but the output is a useless rat's nest of edges. I would need to somehow eliminate most of the "obvious" edges to get something useful out of it...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM 2.7 dependencies.png
Type: image/png
Size: 147855 bytes
Desc: LLVM 2.7 dependencies.png
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100722/e7ad59d8/attachment.png>

More information about the llvm-dev mailing list