1 option
LLVM cookbook : over 80 engaging recipes that will help you build a compiler frontend, optimizer, and code generator using LLVM / Mayur Pandey, Suyog Sarda.
- Format:
- Book
- Author/Creator:
- Pandey, Mayur, author.
- Sarda, Suyog, author.
- Language:
- English
- Subjects (All):
- Virtual computer systems.
- Physical Description:
- 1 online resource (296 p.)
- Edition:
- 1st edition
- Other Title:
- Low level virtual machine cookbook
- Over 80 engaging recipes that will help you build a compiler frontend, optimizer, and code generator using LLVM
- Place of Publication:
- Birmingham, [England] ; Mumbai, [India] : Packt Publishing, 2015.
- Language Note:
- English
- System Details:
- text file
- Summary:
- The book is for compiler programmers who are familiar with concepts of compilers and want to indulge in understanding, exploring, and using LLVM infrastructure in a meaningful way in their work. This book is also for programmers who are not directly involved in compiler projects but are often involved in development phases where they write thousands of lines of code. With knowledge of how compilers work, they will be able to code in an optimal way and improve performance with clean code.
- Contents:
- Cover; Copyright; Credits; About the Authors; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: LLVM Design and Use; Introduction; 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 the C frontend clang; Using the GO frontend; Using DragonEgg; Chapter 2: Steps in Writing a Frontend; Introduction
- Defining a TOY languageImplementing a lexer; Defining Abstract Syntax Tree; Implementing a parser; Parsing simple expressions; Parsing binary expressions; Invoking a driver for parsing; Running lexer and parser on our TOY language; Defining IR code generation methods for each AST class; Generating IR code for expressions; Generating IR code for functions; Adding IR optimization support; Chapter 3: Extending the Frontend and Adding JIT Support; Introduction; Handling decision making paradigms - if/then/else constructs; Generating code for loops
- Handling user-defined operators - binary operatorsHandling user-defined operators - unary operators; Adding JIT support; Chapter 4: Preparing Optimizations; Introduction; Various levels of optimization; Writing your own LLVM pass; Running your own pass with the opt tool; Using another pass in a new pass; Registering a pass with pass manager; Writing an analysis pass; Writing an alias analysis pass; Using other analysis passes; Chapter 5: Implementing Optimizations; Introduction; Writing a dead code elimination pass; Writing an inlining transformation pass
- Writing a pass for memory optimizationCombining LLVM IR; Transforming and optimizing loops; Reassociating expressions; Vectorizing IR; Other optimization passes; Chapter 6: Target-Independent Code Generator; Introduction; The life of an LLVM IR instruction; Visualizing LLVM IR CFG using GraphViz; Describing targets using TableGen; Defining an instruction set; Adding a machine code descriptor; Implementing the MachineInstrBuilder class; Implementing the MachineBasicBlock class; Implementing the MachineFunction class; Writing an instruction selector; Legalizing SelectionDAG
- Optimizing SelectionDAGSelecting instruction from the DAG; Scheduling instructions in SelectionDAG; Chapter 7: Optimizing the Machine Code; Introduction; Eliminating common subexpression from machine code; Analyzing live intervals; Allocating registers; Inserting the prologue-epilogue code; Code emission; Tail call optimization; Sibling call optimisation; Chapter 8: Writing an LLVM Backend; Introduction; Defining registers and registers sets; Defining the calling convention; Defining the instruction set; Implementing frame lowering; Printing an instruction; Selecting an instruction
- Adding instruction encoding
- Notes:
- "Quick answers to common problems"--Cover.
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed June 18, 2015).
- OCLC:
- 911430612
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.