[LLVMdev] about AnalysisUsage

Reid Spencer reid at x10sys.com
Sat Apr 30 07:19:20 PDT 2005


This through me for a loop the first time that I saw it as well. But,
there is a method to the madness. LLVM *really* encapsulates things and
does so to the point of not making external symbols for things that
don't need to be. This saves link time and some object file bloat
(except for debug symbols). For its size, an optimized version of any of
the tools links pretty quickly, compared to other C++ programs I know of
this magnitude. The encapsulation also prevents inheritance mistakes and
rampant featurism.


On Sat, 2005-04-30 at 13:44 +0530, Sameer D. Sahasrabuddhe wrote:
> On Fri, Apr 29, 2005 at 10:32:18PM -0500, Chris Lattner wrote:
> > We could definitely expose the pass class itself, but there are no 
> > implementation details or any other state that is useful.
> Yeah ... this, and Transforms/Scalar.h answer my original original
> question about why a lot of passes are present as a single CPP. The
> whole LLVM code generally abhors including class definitions through
> header files unless absolutely necessary. It's taking me a little
> effort to get used to that, but it should turn out to be a Good
> Thing(tm) after all. But the problem is that the presence and the
> significance of Scalar.h was not immediately obvious!
> Sameer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050430/bcf2775a/attachment.sig>

More information about the llvm-dev mailing list