<div dir="ltr">Hi,<div><br></div><div>(adding llvm-dev again)</div><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


I did enable optimization, but that didn't have an effect on the runtime<br>
performance numbers.<br></blockquote><div><br></div><div>Can you elaborate? For a program such as bzip2, I'd expect the program to be at least twice as fast with -O3 than with -O0.</div><div><br></div><div>I also noticed that you use LLC in the final step. An alternative that works well for me is to use the <a href="http://llvm.org/docs/GoldPlugin.html">gold linker plugin</a>. This way, you can link bitcode files directly into the program by using</div>

<div><br></div><div>    clang -flto $(LDFLAGS) <bitcode files> -o <output file> $(LDLIBS)</div><div><br></div><div>If your bitcode files have the extension .o, clang will only run LTO optimizations, code generation, and linking. If they have the extension .bc, it will run a full set of compilation passes (in which case you might want to add $(CFLAGS) to the command line).</div>

<div><br></div><div>Hope this helps,</div><div>Jonas</div><div><br></div></div></div></div></div>