[llvm-commits] [llvm] r115927 - in /llvm/trunk: include/llvm-c/Core.h include/llvm/InitializePasses.h lib/Transforms/Scalar/Scalar.cpp lib/Transforms/Utils/CMakeLists.txt lib/Transforms/Utils/Utils.cpp lib/VMCore/Core.cpp

Owen Anderson resistor at mac.com
Thu Feb 17 20:21:03 PST 2011


On Jan 17, 2011, at 9:33 AM, Chris Lattner wrote:

> 
> On Jan 16, 2011, at 12:51 AM, Owen Anderson wrote:
>> That is still the case.  There's two kinds of clients that we care about:
>> 
>> 1) clang and similar clients, which know upfront which set of passes they care about.  Their passes are explicitly initialized when they call createFooPass().  Since they never call the global initializeScalarOpts(), they don't link in Scalar.cpp, instead only linking in those passes for which they call createFooPass().
>> 
>> 2) opt and kin, which need to link/initialize all passes available, so that they can be available from the command line.  These clients do call initializeScalarOpts(), thus forcing linkage of all the passes as desired.
> 
> Ok, how about following the existing pattern of putting this in a header file instead of a .cpp file?  With this header, is "LinkAllPasses" needed?  Can we remove LinkAllPasses and just use "InitializeAllPasses" instead?

We can do that, if you want, but we'll still want to have separate headers for LinkAllPasses() vs. LinkAllCodeGen(), etc., so that opt doesn't have to link in all of CodeGen, and vice-versa for llc. 

--Owen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110217/534146de/attachment.html>


More information about the llvm-commits mailing list