[閒聊] 聊聊LLVM吧o_O
自我大學畢業時(2009)LLVM已經算熱門,
LLVM-IR的處理速度快,而且格式完整,還很好用,
IR層的使用者可以將成熟的編譯器理論跟優化策略應用上去,
如果你有disasm跟codegen,也能利用LLVM的pass生成轉換器。
目前在上面的應用有Renderscript/Filterscript、LLVMPipe(mesa/Gallium)…。
近幾年NVIDIA也擴充LLVM弄了個nvvm http://docs.nvidia.com/cuda/nvvm-ir-spec
不過自從jserv大大的這篇 http://www.slideshare.net/jserv/nes-llvm
我就很少看到國內討論llvm,ptt上的文章還因為時間的關係都消失了。
目前我在學術研究上也看過一些應用,像是看上llvm codegen的效能,
把qemu的binary translation換成llvm-codegen,用jit結果導致效能下降的例子。
另一個是利用llvm當CPU multicore的backend,把multicore cpu當CUDA device
https://code.google.com/p/gpuocelot/ 用這作法的是ocelot
他是在__cudaRegisterFatBinary那個nvcc插入的undocumented function解出,
取出fatbin後用gz解壓縮,得到ptx,再交給他的Module,ptx-parser。接著就是由
configuration決定轉給哪個ExecutiveDevice,他可以給RemoteDevice、ATI GPU、
NVIDIA GPU、Emulator(1 CPU)、LLVM(Multicore)。不過ocelot在2013就沒繼續了,
只支援到CUDA 5。
目前在llvm都玩什麼?在vm/ir這一塊好像很少國內分享跟討論?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.132.1.247
※ 文章網址: https://www.ptt.cc/bbs/Programming/M.1430660144.A.EEC.html
推
05/03 22:25, , 1F
05/03 22:25, 1F
→
05/03 22:25, , 2F
05/03 22:25, 2F
→
05/03 22:25, , 3F
05/03 22:25, 3F
推
05/03 22:57, , 4F
05/03 22:57, 4F
→
05/03 22:57, , 5F
05/03 22:57, 5F
→
05/03 22:57, , 6F
05/03 22:57, 6F
推
05/03 23:08, , 7F
05/03 23:08, 7F
→
05/04 04:12, , 8F
05/04 04:12, 8F
→
05/04 04:13, , 9F
05/04 04:13, 9F
→
05/04 04:14, , 10F
05/04 04:14, 10F
→
05/04 04:25, , 11F
05/04 04:25, 11F
推
04/23 11:49, , 12F
04/23 11:49, 12F