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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Gollvm from Google

142 点作者 aleksi将近 8 年前

10 条评论

kjksf将近 8 年前
It looks like Google employee was working on this in his own time for several months (<a href="https:&#x2F;&#x2F;github.com&#x2F;thanm&#x2F;dragongo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thanm&#x2F;dragongo</a>) and now the project has been &quot;adopted&quot; by Google&#x2F;Go team.<p>By &quot;adopted&quot; I mean that:<p>* the code was moved to the same git hosting infrastructure that also hosts official Go compiler and libraries owned by Go team<p>* the license was changed from Apache to the same BSD license as Go compiler<p>* another Google employee is contributing to the code<p>* initial checkin was made by Russ Cox, who is pretty much the lead for Go project<p>All that implies that this has a blessing of the Go team
meadori将近 8 年前
I am somewhat confused by this. The LLVM project already has an official Go frontend that lowers to LLVM IR:<p>* <a href="https:&#x2F;&#x2F;llvm.org&#x2F;svn&#x2F;llvm-project&#x2F;llgo&#x2F;trunk&#x2F;README.TXT" rel="nofollow">https:&#x2F;&#x2F;llvm.org&#x2F;svn&#x2F;llvm-project&#x2F;llgo&#x2F;trunk&#x2F;README.TXT</a>
评论 #14434184 未加载
评论 #14431133 未加载
pm90将近 8 年前
So question for llvm devs here: what benefit does this provide? How does it enhance go? Does it make go programs compile into more efficient binaries targeted to specific cpu architectures?
评论 #14430767 未加载
评论 #14434075 未加载
akavel将近 8 年前
<i>&quot;At the moment llvm-goparse is not capable of building the Go libraries + runtime (libgo), which makes it difficult&#x2F;unwieldy to use for running actual Go programs. As an interim workaround, I&#x27;ve written a shim&#x2F;wrapper script that allows you to use llvm-goparse in combination with an existing GCCGO installation, using gccgo for the runtime&#x2F;libraries and the linking step, but llvm-goparse for any compilation.&quot;</i><p>Not sure I get it: so Gollvm (=llvm-goparse?) can be used as compiler, but not as a linker (yet?), so gccgo&#x27;s linker can be used? Also, Go runtime and standard libraries can&#x27;t be compiled with Gollvm? If standard libs can&#x27;t be compiled, then how can I know if my app can be compiled?<p>I know a project named &quot;llvm-go&quot; was started quite long ago, and had somewhat slow (compared to gccgo) progress because of few, non-Google contributors (probably hobbyists); is this the same work? is it just still in progress, but somewhat more (how much?) advanced now?<p>Some additional googling shows a similarly named project (<a href="https:&#x2F;&#x2F;github.com&#x2F;go-llvm&#x2F;llvm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;go-llvm&#x2F;llvm</a>), which from its readme seems absorbed by LLVM proper, and is subtitled &quot;LLVM bindings for [Go]&quot; (<a href="http:&#x2F;&#x2F;llvm.org&#x2F;svn&#x2F;llvm-project&#x2F;llvm&#x2F;trunk&#x2F;bindings&#x2F;go&#x2F;README.txt" rel="nofollow">http:&#x2F;&#x2F;llvm.org&#x2F;svn&#x2F;llvm-project&#x2F;llvm&#x2F;trunk&#x2F;bindings&#x2F;go&#x2F;READ...</a>). Is this the same project, or something more, or something else? <i>[EDIT:]</i> Ok, based on the CONTRIBUTORS file, it&#x27;s a totally different project, at least one question cleared. (<a href="https:&#x2F;&#x2F;go.googlesource.com&#x2F;gollvm&#x2F;+&#x2F;master&#x2F;CONTRIBUTORS" rel="nofollow">https:&#x2F;&#x2F;go.googlesource.com&#x2F;gollvm&#x2F;+&#x2F;master&#x2F;CONTRIBUTORS</a>)
评论 #14430798 未加载
评论 #14430765 未加载
评论 #14432625 未加载
zeusk将近 8 年前
&gt; define hidden i64 @foo.bar() {<p>&gt; entry:<p>&gt; %&quot;$ret0&quot; = alloca i64<p>&gt; store i64 0, i64* %&quot;$ret0&quot;<p>&gt; store i64 1, i64* %&quot;$ret0&quot;<p>&gt; %&quot;$ret0.ld.0&quot; = load i64, i64* %&quot;$ret0&quot;<p>&gt; ret i64 %&quot;$ret0.ld.0&quot;<p>&gt; }<p>Can someone knowledgeable with Go, explain what&#x27;s happening here? Why does it store a 0 and then a 1 in &quot;$ret0&quot;? Why does it allocate a single integer on the stack? (is it because this is just intermediate code for a virtual machine?) and all of that just to return a 1.
评论 #14430934 未加载
评论 #14430828 未加载
marmaduke将近 8 年前
This means we could write numerical code in Go and get auotvectorized assembly and use GPUs via the nvptx backend. Neat!
评论 #14431412 未加载
weberc2将近 8 年前
I thought this project was very old and perhaps even abandoned? I wonder if I&#x27;m confusing it with a similar project, or perhaps this project was revived? Maybe I&#x27;m just mistaken...
评论 #14430739 未加载
abc_lisper将近 8 年前
Aww.. they lost a chance to call it Gollum!
评论 #14432340 未加载
评论 #14432090 未加载
steeve将近 8 年前
I wonder if they will implement the scheduler&#x2F;goroutines &quot;properly&quot; unlike gccgo with threads? That would be amazing.
评论 #14432627 未加载
whatnotests将近 8 年前
Super great name!
评论 #14430520 未加载
评论 #14431320 未加载