LLVM
https://gyazo.com/ec6acb84ad0c3f5ecb36e527b7a53392
LLVMプロジェクト
C++実装のコンパイラ基盤
2000年、イリノイ大学
LLVM IR
LLVMの構成要素
github
Getting Started with the LLVM System — LLVM 9 documentation
LLVM Language Reference Manual — LLVM 10 documentation
tutorial
Kaleidoscopeというかんたんな関数型言語をターゲットとしたフロントエンドの実装がある
Online Compiler
install
$ brew install llvm
compile
$ clang -emit-llvm -S -o hoge.ll hoge.c
Cコード(hoge.c)をLLVM(hoge.ll)に変換する
$ llc hoge.ll
LLVM IRをアセンブリ言語.sに変換
$ gcc hoge.s -o hoge
アセンブリをバイナリに変換
LLVMのサブプロジェクト
LLVM Core
Clang
LLDB
libc++
compiler-rt
https://compiler-rt.llvm.org/
libgccを置き換えるを目的としたライブラリ
他『きつねさんでもわかるLLVM ~コンパイラを自作するためのガイドブック』.icon参考
Backend
https://github.com/ushitora-anqou/write-your-llvm-backend
LLVMはどこで使われているのか
http://llvm.org/devmtg/2016-01/slides/fosdem-2016-llvm.pdf
参考
/layerx/コンパイラ・LLVM入門〜そしてゼロ知識証明へ〜
『きつねさんでもわかるLLVM ~コンパイラを自作するためのガイドブック』
LLVMによるプログラミング言語の実装 – 日曜研究室
#WIP
mem2reg
https://qiita.com/uint256_t/items/4bc1c1437470c950bd3f
ts
https://github.com/ts-llvm/ts-llvm
最適化
https://www.slideshare.net/herumi/x86opti7
rust
https://qiita.com/rchaser53/items/d291ed35b33f6ed000e7
https://qiita.com/JunSuzukiJapan/items/88c5fec58dddb0522cca
https://qiita.com/hnd2/items/e17a2c68ca5fe397f1b0
https://slides.com/rchaser53/test-1/#/11
https://qiita.com/termoshtt/items/b6d4c6e7532fa0b9e418
http://ganmacs.hatenablog.com/entry/2017/02/23/151029
https://toyamaguchi.hatenablog.com/entry/2019/12/22/080000
go
https://postd.cc/an-introduction-to-llvm-in-go/
https://qiita.com/long_long_float/items/50ba0d9dc4075f3934a1
http://uenoku.hatenablog.com/entry/2019/12/06/215715
attributorというパス
レジスタ割当の資料
https://pdfs.semanticscholar.org/e6aa/3919e1bf592b93afec205cd91187cee04e6b.pdf
https://jonathan.protzenko.fr/papers/register09.pdf
https://github.com/nael8r/How-To-Write-An-LLVM-Register-Allocator/blob/master/HowToWriteAnLLVMRegisterAllocator.rst
LLVMの話
https://arxiv.org/pdf/1804.02452.pdf
最近のサーベイ論文。よく纏まっている
http://nikic.github.io/2020/05/10/Make-LLVM-fast-again
https://github.com/nael8r/How-To-Write-An-LLVM-Register-Allocator