LLVM 官翻

寫在前面:LLVM是(Low Level Virtual Machine)的簡稱,官網(wǎng)為http://llvm.org/
LLVM隨著這個項目的不斷的發(fā)展兼犯,已經(jīng)無法完全的代表這個項目了,只是這種叫法一直延續(xù)下來杂曲。
LLVM是一個開源的項目。它最早的時候是Illinois的一個研究項目闯参,主要負責人是Chris Lattner拜姿,他現(xiàn)在就職于Apple. Apple 目前也是llvm項目的主要贊助者之一。
LLVM的主要作用是它可以作為多種語言的后端开仰,它可以提供可編程語言無關(guān)的優(yōu)化和針對很多種CPU的代碼生成功能。此外llvm目前已經(jīng)不僅僅是個編程框架薪铜,它目前還包含了很多的子項目众弓,比如最具盛名的clang.
LLVM這個框架目前已經(jīng)有基于這個框架的大量的工具可以使用。

本文只是翻譯LLVM官網(wǎng)的一小部分

The LLVM Complier Infrastructure

LLVM編譯環(huán)境基礎架構(gòu)

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項目是模塊化和復用編譯器和技術(shù)工具鏈的集合,雖然它可以提供有用的庫去構(gòu)建傳統(tǒng)虛擬機,但還是與傳統(tǒng)虛擬機有很大不同.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 開始在伊利諾伊大學作為一個研究項目,目標是提供一個支持任意語言的靜態(tài)和動態(tài)編譯的現(xiàn)代的,基于SSA編譯戰(zhàn)略目標的語言集合.從那時起,LLVM現(xiàn)已發(fā)展成為由許多子項目,其中有許多是正在生產(chǎn)由各種各樣的使用的綜合項目的商業(yè)和開源項目以及被廣泛用于學術(shù)研究.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內(nèi)核提供一個現(xiàn)代化的源和目標無關(guān)的優(yōu)化,隨著許多CPU支持代碼生成,這些庫都是圍繞著建立明確的規(guī)定被稱為LLVM中間表示的代碼表示(LLVM IR),LLVM的核心庫是有據(jù)可查的,它使得你可以很輕松使用LLVM作為優(yōu)化器和代碼生成器構(gòu)建你自己的語言

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倍速度),非常有用的錯誤和警告消息,并為構(gòu)建有效的源代碼工具提供一個平臺隔箍,該 鏘靜態(tài)分析是一種工具谓娃,自動查找代碼中的錯誤,而且是那種工具蜒滩,可以使用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優(yōu)化程序和代碼生成器.這允許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提供的極大的調(diào)試庫,它使用Clang AST和表達式解析器,LLVM JIT,LLVM反匯編器等,以便于提供一個 “只工作”的經(jīng)驗俯艰。在加載符號時,它比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的一個主要優(yōu)勢是其多功能性充边,靈活性和可重用性庸推,這就是為什么它被用于各種各樣的不同任務:從輕量級JIT編譯嵌入式語言如Lua到編譯Fortran代碼為大規(guī)模超級電腦常侦。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末浇冰,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子聋亡,更是在濱河造成了極大的恐慌肘习,老刑警劉巖,帶你破解...
    沈念sama閱讀 223,207評論 6 521
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件坡倔,死亡現(xiàn)場離奇詭異漂佩,居然都是意外死亡脖含,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,455評論 3 400
  • 文/潘曉璐 我一進店門投蝉,熙熙樓的掌柜王于貴愁眉苦臉地迎上來养葵,“玉大人,你說我怎么就攤上這事瘩缆」鼐埽” “怎么了?”我有些...
    開封第一講書人閱讀 170,031評論 0 366
  • 文/不壞的土叔 我叫張陵庸娱,是天一觀的道長着绊。 經(jīng)常有香客問我,道長熟尉,這世上最難降的妖魔是什么归露? 我笑而不...
    開封第一講書人閱讀 60,334評論 1 300
  • 正文 為了忘掉前任,我火速辦了婚禮斤儿,結(jié)果婚禮上剧包,老公的妹妹穿的比我還像新娘。我一直安慰自己雇毫,他們只是感情好玄捕,可當我...
    茶點故事閱讀 69,322評論 6 398
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著棚放,像睡著了一般枚粘。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上飘蚯,一...
    開封第一講書人閱讀 52,895評論 1 314
  • 那天馍迄,我揣著相機與錄音,去河邊找鬼局骤。 笑死攀圈,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的峦甩。 我是一名探鬼主播赘来,決...
    沈念sama閱讀 41,300評論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼凯傲!你這毒婦竟也來了犬辰?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 40,264評論 0 277
  • 序言:老撾萬榮一對情侶失蹤冰单,失蹤者是張志新(化名)和其女友劉穎幌缝,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體诫欠,經(jīng)...
    沈念sama閱讀 46,784評論 1 321
  • 正文 獨居荒郊野嶺守林人離奇死亡涵卵,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,870評論 3 343
  • 正文 我和宋清朗相戀三年浴栽,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片轿偎。...
    茶點故事閱讀 40,989評論 1 354
  • 序言:一個原本活蹦亂跳的男人離奇死亡典鸡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出坏晦,到底是詐尸還是另有隱情椿每,我是刑警寧澤,帶...
    沈念sama閱讀 36,649評論 5 351
  • 正文 年R本政府宣布英遭,位于F島的核電站间护,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏挖诸。R本人自食惡果不足惜汁尺,卻給世界環(huán)境...
    茶點故事閱讀 42,331評論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望多律。 院中可真熱鬧痴突,春花似錦、人聲如沸狼荞。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,814評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽相味。三九已至拾积,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間丰涉,已是汗流浹背拓巧。 一陣腳步聲響...
    開封第一講書人閱讀 33,940評論 1 275
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留一死,地道東北人肛度。 一個月前我還...
    沈念sama閱讀 49,452評論 3 379
  • 正文 我出身青樓,卻偏偏與公主長得像投慈,于是被迫代替她去往敵國和親承耿。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,995評論 2 361

推薦閱讀更多精彩內(nèi)容