且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么llvm被认为不适合实施JIT?

更新时间:2023-11-10 17:44:58

Unladen Swallow验尸博客文章中有一些有关LLVM的说明: http://qinsb.blogspot.com/2011/03/unladen-swallow -retrospective.html .

There are some notes about LLVM in the Unladen Swallow post-mortem blog post: http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html .

不幸的是,当前状态下的LLVM实际上被设计为静态编译器优化器和后端. LLVM代码生成和优化是好的,但是很昂贵.所有优化均设计为可在由类似于静态C的语言生成的IR上工作.用于优化Python的大多数重要优化都需要对程序在以前的迭代中如何执行的高级了解,而LLVM并不能帮助我们做到这一点.

Unfortunately, LLVM in its current state is really designed as a static compiler optimizer and back end. LLVM code generation and optimization is good but expensive. The optimizations are all designed to work on IR generated by static C-like languages. Most of the important optimizations for optimizing Python require high-level knowledge of how the program executed on previous iterations, and LLVM didn't help us do that.