TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The LLVM Compiler Infrastructure

55 点作者 ____Sash---701_超过 6 年前

3 条评论

jclay超过 6 年前
For those who haven&#x27;t explored LLVM, it&#x27;s an incredibly powerful technology and rather approachable for getting started with.<p>A few of my favorite LLVM discoveries:<p>- If you want to build Clang (LLVM C&#x2F;C++ Compiler), it&#x27;s really simple to pull down and build with little external development tooling (only a compiler and CMake). Shown here [0].<p>- You can pull LLVM&#x2F;Clang master and use that for a &quot;bleeding-edge&quot; toolchain with a high degree of stability. [0].<p>- Clang is used to compile Chromium and Firefox on all platforms. Both have seen great performance gains from Clang&#x27;s link time optimization. [1] [2]<p>- Klee is built on LLVM infrastructure and is used for automatic generation of test cases. [3] See some of their papers for how powerful their results are.<p>- Clang can now produce ABI compatible binaries with MSVC and has support for the Visual Studio debugger. [4]<p>- Lots of interesting research projects leveraging LLVM [5]<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=uZI_Qla4pNA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=uZI_Qla4pNA</a><p>[1] <a href="http:&#x2F;&#x2F;blog.llvm.org&#x2F;2018&#x2F;03&#x2F;clang-is-now-used-to-build-chrome-for.html" rel="nofollow">http:&#x2F;&#x2F;blog.llvm.org&#x2F;2018&#x2F;03&#x2F;clang-is-now-used-to-build-chro...</a><p>[2] <a href="https:&#x2F;&#x2F;glandium.org&#x2F;blog&#x2F;?p=3888" rel="nofollow">https:&#x2F;&#x2F;glandium.org&#x2F;blog&#x2F;?p=3888</a><p>[3] <a href="https:&#x2F;&#x2F;klee.github.io" rel="nofollow">https:&#x2F;&#x2F;klee.github.io</a><p>[4] <a href="http:&#x2F;&#x2F;blog.llvm.org&#x2F;2017&#x2F;08&#x2F;llvm-on-windows-now-supports-pdb-debug.html" rel="nofollow">http:&#x2F;&#x2F;blog.llvm.org&#x2F;2017&#x2F;08&#x2F;llvm-on-windows-now-supports-pd...</a><p>[5] <a href="https:&#x2F;&#x2F;scholar.google.com&#x2F;scholar?as_ylo=2017&amp;q=LLVM&amp;hl=en&amp;as_sdt=0,33" rel="nofollow">https:&#x2F;&#x2F;scholar.google.com&#x2F;scholar?as_ylo=2017&amp;q=LLVM&amp;hl=en&amp;...</a>
评论 #18686807 未加载
评论 #18686732 未加载
tanin超过 6 年前
LLVM is a great project. I&#x27;m writing a programming language based on it.<p>It is so much easier because: (1) it&#x27;s easier than writing machine code translation and (2) it&#x27;s also easier than translating your code to C which would be purely textual.<p>Nevertheless, it&#x27;s difficult to learn for people coming from high-level languages, even for me, who knows C to some degree.<p>The documentation around IR is scarce.<p>Then, I&#x27;ve stumbled upon a trick where I can just write C code and compile to LLVM IR with Clang. With this trick, I can answer many questions on my own (e.g. how to implement if-else, how to call printf, how to make a dynamic-sized array.)
评论 #18690423 未加载
评论 #18690042 未加载
saagarjha超过 6 年前
&gt; The name &quot;LLVM&quot; itself is not an acronym; it is the full name of the project.<p>What happened to Lower-Level Virtual Machine?
评论 #18686644 未加载
评论 #18686706 未加载
评论 #18686635 未加载
评论 #18686781 未加载