LLVM到底是什么? [英] What exactly is LLVM?
问题描述
我一直都在听说有关LLVM的信息.它在Perl中,然后在Haskell中,然后有人以其他某种语言使用它?什么事?
I keep hearing about LLVM all the time. It's in Perl, then it's in Haskell, then someone uses it in some other language? What is it?
推荐答案
LLVM是用于构造,优化和产生中间和/或二进制机器代码的库.
LLVM is a library that is used to construct, optimize and produce intermediate and/or binary machine code.
LLVM可用作编译器框架,您可以在其中提供前端"(解析器和词法分析器)和后端"(将LLVM的表示形式转换为实际机器代码的代码).
LLVM can be used as a compiler framework, where you provide the "front end" (parser and lexer) and the "back end" (code that converts LLVM's representation to actual machine code).
LLVM还可以充当JIT编译器-它支持x86/x86_64和PPC/PPC64程序集生成,并具有针对编译速度的快速代码优化.
LLVM can also act as a JIT compiler - it has support for x86/x86_64 and PPC/PPC64 assembly generation with fast code optimizations aimed for compilation speed.
如果您有兴趣,可以在其演示页面中使用由C或C ++代码生成的LLVM的机器代码. ,但是自2013年以来,演示页面目前已被禁用.
If you're interested, you can play with LLVM's machine code that is generated from C or C++ code in their demo page, but the demo page is currently disabled since year 2013.
这篇关于LLVM到底是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!