官术网_书友最值得收藏!

Chapter 1. Playing with LLVM

The LLVM Compiler infrastructure project, started in 2000 in University of Illinois, was originally a research project to provide modern, SSA based compilation technique for arbitrary static and dynamic programming languages. Now it has grown to be an umbrella project with many sub projects within it, providing a set of reusable libraries having well defined interfaces.

LLVM is implemented in C++ and the main crux of it is the LLVM core libraries it provides. These libraries provide us with opt tool, the target independent optimizer, and code generation support for various target architectures. There are other tools which make use of core libraries, but our main focus in the book will be related to the three mentioned above. These are built around LLVM Intermediate Representation (LLVM IR), which can almost map all the high-level languages. So basically, to use LLVM's optimizer and code generation technique for code written in a certain programming language, all we need to do is write a frontend for a language that takes the high level language and generates LLVM IR. There are already many frontends available for languages such as C, C++, Go, Python, and so on. We will cover the following topics in this chapter:

  • Modular design and collection of libraries
  • Getting familiar with LLVM IR
  • LLVM Tools and using them at command line
主站蜘蛛池模板: 巴东县| 顺昌县| 巧家县| 额济纳旗| 肃北| 柯坪县| 正定县| 太原市| 监利县| 永泰县| 汽车| 平凉市| 重庆市| 文成县| 五峰| 蒙阴县| 鄂托克前旗| 靖江市| 子洲县| 宣武区| 太仓市| 漳州市| 江永县| 内江市| 乌拉特中旗| 黎川县| 玉山县| 什邡市| 昌宁县| 宜宾市| 肇州县| 商河县| 安义县| 岳阳市| 云安县| 恩施市| 上饶县| 吉林省| 皋兰县| 乐至县| 霞浦县|