<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi all,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I’m a little bit worried about the sheer size of the
resulting binaries of a project using LLVM. The medium large project for which
I’m planning to use it (which currently uses a custom dynamic code
generator), produces a compact 1.6 MB binary. When I compile LLVM’s simple
‘Fibonacci’ example project the executable is 2.6 MB…<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I realize LLVM is a complex and feature rich project but
could anyone give me a rough idea of where most of the executable size is coming
from, and maybe give some ideas on how to reduce it if possible?<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>It’s not like 2.6 MB is huge but it just seems
disproportionate and I’d like to keep my project lightweight (it could be
used for embedded systems one day). Note that I’m basically only using
the IRBuilder, JIT, and a few common optimization passes. Removing the
optimizations doesn’t seem to affect the executable size at all, so I’m
starting to wonder whether there are a lot of other unused features ending up
in the binary (I’m using Visual C++ 2005 by the way, which is supposed to
be quite good at reducing code size). Maybe there is some way to explicitly disable
unused features (not compile them or use stubs)? I’m also under the
impression that LLVM uses a lot of static (pre-generated) tables, and maybe they
could be somewhat smaller when making some extra assumptions?<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Thanks a lot,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Nicolas Capens<o:p></o:p></p>

</div>

</body>

</html>