Trevor Harmon <Trevor.W.Harmon at nasa.gov> writes:> On Jul 23, 2010, at 10:24 AM, David Piepgrass wrote: > >> The top ten LLVM libraries (Win32 *.lib) are pretty huge: >> >> Release Bld Debug Bld Name >> 24,510,490 71,038,240 LLVMCodeGen.lib[snip]> Not sure about Win32, but here are some numbers on OS X for comparison: > > 5,282,356 libLLVMCodeGen.aComparing the size of the static libraries makes little sense, and even less when they are compiled by different tools. What really matters is the size of the executables. I agree that LLVM can be considered a heavyweight dependency on this aspect. [snip]
> > On Jul 23, 2010, at 10:24 AM, David Piepgrass wrote: > > > >> The top ten LLVM libraries (Win32 *.lib) are pretty huge: > >> > >> Release Bld Debug Bld Name > >> 24,510,490 71,038,240 LLVMCodeGen.lib > [snip] > > Not sure about Win32, but here are some numbers on OS X for > comparison: > > > > 5,282,356 libLLVMCodeGen.a > > Comparing the size of the static libraries makes little sense, and even > less when they are compiled by different tools. What really matters is > the size of the executables. > > I agree that LLVM can be considered a heavyweight dependency on this > aspect.Why is the size of static libraries a "nonsensical" topic of discussion? Anyway, in the same example I mentioned that the size of HowToUseJIT (an executable) is very large (15.4 MB debug, 3.4 MB release); as is a small example, I'd expect any real-world executable to be larger. I think it's fair to wonder what makes it is so large, why MacOS seems to get different results, and whether it is possible to construct an example less than 1 MB.
David Piepgrass <dpiepgrass at mentoreng.com> writes:>> Comparing the size of the static libraries makes little sense, and even >> less when they are compiled by different tools. What really matters is >> the size of the executables. >> >> I agree that LLVM can be considered a heavyweight dependency on this >> aspect. > > Why is the size of static libraries a "nonsensical" topic of > discussion?Why do you care about the size of library files?> Anyway, in the same example I mentioned that the size of HowToUseJIT > (an executable) is very large (15.4 MB debug, 3.4 MB release); as is a > small example, I'd expect any real-world executable to be larger.Of course a real-world project would be larger, but not on a "linear" proportion compared to HowToUseJIT. That example application pulls a big chunk from the LLVM libraries. That is what makes it large, not the code in howtousejit.cpp. My compiler, for instance, is anything but a toy application and is 5.7 MB.> I think it's fair to wonder what makes it is so large, why MacOS seems > to get different results,If you want to compare sizes, you must limit your comparisons to executable files. Why would be relevant that XCode produces library files smaller than Visual Studio? Its comparing apples to oranges.> and whether it is possible to construct an example less than 1 MB.A LLVM JIT compiler for x86 under 1 MB? I doubt it is possible without a major rewriting of LLVM.
> > I think it's fair to wonder what makes it is so large, why MacOS seems to > get different results, and whether it is possible to construct an example > less than 1 MB. >My experience with trying to make the smallest JIT possible resulted in something that was around 1.3MB on Windows, using VC++ to compile, optimizing for size, and linking with /OPT:REF,ICF. This JIT did *no optimization at all* - pulling in something like instcombine tripled the size if I recall correctly. It's possible I missed opportunities for making it smaller, but when I asked on the list I got no further suggestions for improving on this. I don't know how feasible it would be to refactor the existing code to get something significantly smaller that actually performed some optimization as well. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100727/a455a827/attachment.html>