美文网首页
LLVM 官翻

LLVM 官翻

作者: Django_Monstar | 来源:发表于2017-02-05 10:16 被阅读242次

    写在前面:LLVM是(Low Level Virtual Machine)的简称,官网为http://llvm.org/
    LLVM随着这个项目的不断的发展,已经无法完全的代表这个项目了,只是这种叫法一直延续下来。
    LLVM是一个开源的项目。它最早的时候是Illinois的一个研究项目,主要负责人是Chris Lattner,他现在就职于Apple. Apple 目前也是llvm项目的主要赞助者之一。
    LLVM的主要作用是它可以作为多种语言的后端,它可以提供可编程语言无关的优化和针对很多种CPU的代码生成功能。此外llvm目前已经不仅仅是个编程框架,它目前还包含了很多的子项目,比如最具盛名的clang.
    LLVM这个框架目前已经有基于这个框架的大量的工具可以使用。

    本文只是翻译LLVM官网的一小部分

    The LLVM Complier Infrastructure

    LLVM编译环境基础架构

    The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them. The name "LLVM" itself is not an acronym; it is the full name of the project.

    LLVM项目是模块化和复用编译器和技术工具链的集合,虽然它可以提供有用的库去构建传统虚拟机,但还是与传统虚拟机有很大不同.LLVM并不是首字母的缩写而是项目的全名

    LLVM began as a research project at the University of Illinois, with the goal of providing a modern, SSA-based compilation strategy capable of supporting both static and dynamic compilation of arbitrary programming languages. Since then, LLVM has grown to be an umbrella project consisting of a number of subprojects, many of which are being used in production by a wide variety ofcommercial and open source projects as well as being widely used in academic research. Code in the LLVM project is licensed under the "UIUC" BSD-Style license.

    LLVM 开始在伊利诺伊大学作为一个研究项目,目标是提供一个支持任意语言的静态和动态编译的现代的,基于SSA编译战略目标的语言集合.从那时起,LLVM现已发展成为由许多子项目,其中有许多是正在生产由各种各样的使用的综合项目的商业和开源项目以及被广泛用于学术研究.LLVM项目遵循'UIUC'BSD风格的许可证

    The primary sub-projects of LLVM are:
    LLVM的子项目包括:

    1.The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!) These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR"). The LLVM Core libraries are well documented, and it is particularly easy to invent your own language (or port an existing compiler) to use LLVM as an optimizer and code generator.

    1.LLVM内核提供一个现代化的源和目标无关的优化,随着许多CPU支持代码生成,这些库都是围绕着建立明确的规定被称为LLVM中间表示的代码表示(LLVM IR),LLVM的核心库是有据可查的,它使得你可以很轻松使用LLVM作为优化器和代码生成器构建你自己的语言

    2.Clang is an "LLVM native" C/C++/Objective-C compiler, which aims to deliver amazingly fast compiles (e.g. about 3x faster than GCC when compiling Objective-C code in a debug configuration), extremely useful error and warning messages and to provide a platform for building great source level tools. The Clang Static Analyzer is a tool that automatically finds bugs in your code, and is a great example of the sort of tool that can be built using the Clang frontend as a library to parse C/C++ code.

    2.Clang 是一个LLVM原生 用于提供 极速 编译的 C/C++/Objective-C 编译器(是GCC的3倍速度),非常有用的错误和警告消息,并为构建有效的源代码工具提供一个平台,该 锵静态分析是一种工具,自动查找代码中的错误,而且是那种工具,可以使用Clang前端作为一个库来解析C / C ++代码生成的一个很好的例子。

    3.dragonegg integrates the LLVM optimizers and code generator with the GCC parsers. This allows LLVM to compile Ada, Fortran, and other languages supported by the GCC compiler frontends, and access to C features not supported by Clang.
    3.dragonegg 集成了GCC解析器和LLVM优化程序和代码生成器.这允许LLVM编译 Ada, Fortran, 和其他CGG前端编译器支持的语言以及访问Clang不支持的C功能.

    4.The LLDB project builds on libraries provided by LLVM and Clang to provide a great native debugger. It uses the Clang ASTs and expression parser, LLVM JIT, LLVM disassembler, etc so that it provides an experience that "just works". It is also blazing fast and much more memory efficient than GDB at loading symbols.

    4.该LLDB项目建立在由LLVM和Clang提供的极大的调试库,它使用Clang AST和表达式解析器,LLVM JIT,LLVM反汇编器等,以便于提供一个 “只工作”的经验。在加载符号时,它比GDB的速度更快,效率也更高。

    In addition to official subprojects of LLVM, there are a broad variety of other projects that use components of LLVM for various tasks. Through these external projects you can use LLVM to compile Ruby, Python, Haskell, Java, D, PHP, Pure, Lua, and a number of other languages. A major strength of LLVM is its versatility, flexibility, and reusability, which is why it is being used for such a wide variety of different tasks: everything from doing light-weight JIT compiles of embedded languages like Lua to compiling Fortran code for massive super computers.

    除了LLVM的官方子项目,还有各种各样的其他项目使用LLVM的组件各项任务。 您可以使用LLVM编译Ruby,Python,Haskell,Java,D,PHP,Pure,Lua和许多其他语言。LLVM的一个主要优势是其多功能性,灵活性和可重用性,这就是为什么它被用于各种各样的不同任务:从轻量级JIT编译嵌入式语言如Lua到编译Fortran代码为大规模超级电脑。

    相关文章

      网友评论

          本文标题:LLVM 官翻

          本文链接:https://www.haomeiwen.com/subject/ycasittx.html