[llvm-commits] [llvm] r115949 - in /llvm/trunk: include/llvm-c/Initialization.h include/llvm/InitializePasses.h lib/CodeGen/CMakeLists.txt lib/CodeGen/CodeGen.cpp
Owen Anderson
resistor at mac.com
Thu Oct 7 12:50:03 PDT 2010
On Oct 7, 2010, at 12:46 PM, Chris Lattner wrote:
>
> On Oct 7, 2010, at 11:41 AM, Owen Anderson wrote:
>
>> Author: resistor
>> Date: Thu Oct 7 13:41:20 2010
>> New Revision: 115949
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=115949&view=rev
>> Log:
>> Add initialization routines for CodeGen.
>
> Owen, once concern I have about this is that it breaks "only pull in .o files from archives that a tool needs". For example, clang doesn't use all the passes from lib/Transforms/Scalar, so it shouldn't have to link them all in. Thoughts?
A tool can, of course, implement its own initializePassesICareAbout() that only initializes the passes it cares about, and thus only forces linkage with them. The per-library initialization routines are a convenience, and probably the recommended route unless you Know What You're Doing(tm), but clang would certainly be a good candidate for writing its own initialization set.
--Owen
More information about the llvm-commits
mailing list