anthropics / anthropics/claudes-c-compiler

[LICENSING] The resulting code has traces of 'inspiration' from LLVM

未關閉
#231 12 則留言 80 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
2.8k
分支
247
PR 合併指標
30 天內沒有已合併 PR

描述

I just took a 10-minute-worth look at the directory structure and a couple of source files. One of my conclusions is that the IR has traces of LLVM-inspired constructs; specifically,
- [`getelementptr`](https://github.com/anthropics/claudes-c-compiler/blob/main/src/ir/instruction.rs#L142). Those of us in the compiler industry know that `getelementptr` is a very unique feature of LLVM IR, not present in other IR-like representations (e.g. [GIMPLE](https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html)). See [DuckDuckGo search](https://duckduckgo.com/?t=ffab&q=getelementptr&ia=web) for confirmation.
- In the same line, the plain-text notation for IR instructions seems derived from LLVM (see [LLVM IR documentation](https://llvm.org/docs/LangRef.html#identifiers) for syntax. This seems to be evident in [this comment](https://github.com/anthropics/claudes-c-compiler/blob/main/src/ir/instruction.rs#L122); also, I could not see `dump()`-like routines to print text/plain representation from in-memory IR, so these traces seem to only appear in comments
- Use of `va_start`, `va_end`, `memcpy` as IR-level instrinsics (see [here (traces)](https://github.com/anthropics/claudes-c-compiler/blob/main/src/ir/instruction.rs#L185) and [here (in LLVM IR reference)](https://llvm.org/docs/LangRef.html#llvm-va-start-intrinsic); or [here (sources](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/Intrinsics.td#L776)). Again, this seems to be a very strong indicator of something based off LLVM IR design.

Given all the above, and that the LLVM project is [under the Apache License v2.0 with LLVM Exceptions](https://github.com/llvm/llvm-project/blob/main/llvm/LICENSE.TXT), I think this "work" should, at the very least mention (likely in `README.md`) that underlying LLMs took 'inspiration' from LLVM, and that LLVM is owned by their respective authors / maintainers.

Looking forward to your replies. Also, as time permits, I'll create additional issues for maybe unrelated topics.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。