<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I don't think this can be discussed in this generality. Without knowing how llvm is invoked, what sort of optimisations msvc was running. So this would be best investigated with a concrete .ll file (llvm is a nice infrastructure in that it makes it easy to share .bc/.ll files to capture intermediate states of the compiler) which you can try to push through clang, opt, or llc to see whether it matches the speed of msvc. But just as food for though: What if msvc did some minimal optimisations, found out that half the sourcecode is unreachable and removes it, while llvm with no optimisations just compiles everything?</div><div class=""><br class=""></div><div class="">- Matthias</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 12, 2016, at 8:15 AM, Andrew Kelley via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">Recently Jonathan Blow posted a short screencast discussing build time of his compiler with when no optimizations are run on the user's code.</div><div class=""><br class=""></div><div class="">Part 1: <a href="https://www.youtube.com/watch?v=HLk4eiGUic8" class="">https://www.youtube.com/watch?v=HLk4eiGUic8</a></div><div class="">Part 2: <a href="https://www.youtube.com/watch?v=mIjGYbol0O4" class="">https://www.youtube.com/watch?v=mIjGYbol0O4</a></div><div class=""><br class=""></div><div class="">He discusses what parts are taking the longest to compile, and the ultimately shows this:</div><div class=""><a href="http://i.imgur.com/BkbKcJK.png" class="">http://i.imgur.com/BkbKcJK.png</a></div><div class="">...which shows that emitting LLVM IR in memory and LLVMTargetMachineEmitToFile is the bottleneck in his compiler toolchain.</div><div class=""><br class=""></div><div class="">In fact, it was significantly faster to emit C to disk and compile with MSVC than to emit LLVM in memory and call LLVMTargetMachineEmitToFile.</div><div class=""><br class=""></div><div class="">His conclusion is that he will not depend on LLVM when his users compile with optimizations off, instead directly emitting x86_64 machine code into an object file.</div><div class=""><br class=""></div><div class="">Needless to say, this is duplicate effort. Is there any way the LLVM project could speed things up when no optimizations are run?</div><div class=""><br class=""></div><div class="">As another compiler author (<a href="http://ziglang.org/" class="">http://ziglang.org/</a>), I want to compete with Jon's speed without having to duplicate the effort that LLVM already solves.</div><div class=""><br class=""></div><div class="">Thanks for your time.</div><div class="">Andrew</div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>