码迷,mamicode.com
首页 > 其他好文 > 详细

llvm.0.Introduction

时间:2015-06-13 21:25:38      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

1. LLVM

1.1 LLVM 是什么? 

A): an umbrella project

"hosts and develops a set of close-knit low-level toolchain components (e.g., assemblers, compilers, debuggers, etc.)"

B): 区别于其它编译器的是它的内部架构。

[TODO] 区别是:

C): "From its beginning in December 2000, LLVM was designed as a set of reusable libraries with well-defined interfaces"

D): "LLVM is now used as a common infrastructure to implement a broad variety of statically and runtime compiled languages."

1.2 传统的编译器设计

三阶段的编译器:Front End, Optimizer, Back End.

"The front end parses source code, checking it for errors, and builds a language-specific Abstract Syntax

Tree (AST) to represent the input code. 

The optimizer is responsible for doing a broad variety of transformations to try to improve the code‘s running time,

such as eliminating redundant computations, and is usually more or less independent of language and target.

The back end (also known as the code generator) then maps the code onto the target instruction set. In addition to

making correct code, it is responsible for generating good code that takes advantage of unusual features of the

supported architecture. " Ref[2]

2. LLVM

A): LLVM 是C++来实现的。

B): LLVM IR: Complete Code Representation

C): LLVM 是一个library的集合。

"the next most important aspect of LLVM is that it is designed as a set of libraries, rather than as a monolithic

command line compiler like GCC or an opaque virtual machine like the JVM or .NET virtual machines. " Ref[2]

 

 

 


 

Reference

1. LLVM Command Guide

http://llvm.org/docs/CommandGuide/index.html

2. LLVM

http://www.aosabook.org/en/llvm.html 

 

llvm.0.Introduction

标签:

原文地址:http://www.cnblogs.com/cwgk/p/4572345.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!