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

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
主站蜘蛛池模板: 桐柏县| 深水埗区| 霍林郭勒市| 莆田市| 宁蒗| 临澧县| 昌吉市| 台北县| 石河子市| 吉水县| 茌平县| 毕节市| 渝北区| 留坝县| 乌鲁木齐市| 二手房| 榕江县| 清流县| 保靖县| 铅山县| 葵青区| 鱼台县| 六安市| 嘉义市| 泊头市| 阿拉善右旗| 襄汾县| 凌源市| 句容市| 淮滨县| 彰化市| 紫云| 阳江市| 连云港市| 南康市| 青铜峡市| 嘉黎县| 莱芜市| 仁布县| 仙桃市| 灵寿县|