Chapter 1. LLVM Design and Use

In this chapter, we will cover the following topics:

  • Understanding modular design
  • Cross-compiling Clang/LLVM
  • Converting a C source code to LLVM assembly
  • Converting IR to LLVM bitcode
  • Converting LLVM bitcode to target machine assembly
  • Converting LLVM bitcode back to LLVM assembly
  • Transforming LLVM IR
  • Linking LLVM bitcode
  • Executing LLVM bitcode
  • Using C frontend Clang
  • Using the GO frontend
  • Using DragonEgg

Introduction

In this recipe, you get to know about LLVM, its design, and how we can make multiple uses out of the various tools it provides. You will also look into how you can transform a simple C code to the LLVM intermediate representation and how you can transform it into various forms. You will also learn how the code is organized ...

Get LLVM Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.