Engineering a Compiler, Second Edition - Keith Cooper, Linda Torczon

Engineering a Compiler, Second Edition

Keith Cooper, Linda Torczon

出版时间

2011-02-21

ISBN

9780120884780

评分

★★★★★
书籍介绍
This entirely revised second edition of Engineering a Compiler is full of technical updates and new material covering the latest developments in compiler technology. In this comprehensive text you will learn important techniques for constructing a modern compiler. Leading educators and researchers Keith Cooper and Linda Torczon combine basic principles with pragmatic insights from their experience building state-of-the-art compilers. They will help you fully understand important techniques such as compilation of imperative and object-oriented languages, construction of static single assignment forms, instruction scheduling, and graph-coloring register allocation. In-depth treatment of algorithms and techniques used in the front end of a modern compiler Focus on code optimization and code generation, the primary areas of recent research and development Improvements in presentation including conceptual overviews for each chapter, summaries and review questions for sections, and prominent placement of definitions for new terms Examples drawn from several different programming languages
AI导读
核心看点
  • 均衡覆盖前端解析与后端优化
  • 深入讲解SSA形式及寄存器分配
  • 结合工程实践与算法理论
适合谁读
  • 计算机科学专业学生
  • 编译器后端优化爱好者
  • 需构建现代编译器的开发者
读前提醒
  • 建议配合动手写代码以加深理解
  • 可搭配Compiler Construction共读
  • 注重算法解释而非死扣细节
读者共识
  • 结构友好,比龙书更适合入门
  • 图解精美,解析部分讲解透彻
  • 内容扎实,是优秀的入门指南

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "当且仅当在从某过程的入口点到p处的每条代码路径上e都已经求值,且从求值处到p之间e的任何成分子表达式都没有重新定义时,表达式e在该过程位置p处是可用的。An expression e is available at point p in a procedure if and only if on every path from the procedure’s entry to p, e is evaluated and none of its constituent subexpressions is redefined between that evaluation and p."
  • "更正式地说,节点n中的定义,仅在满足下述两个条件的汇合点才需要插入相应的函数∮"
  • "第三,如果对j的某些前驱节点k,j∈DF(k),那么对每个节点l∈Dom(k),必定有j∈DF(l),除非l∈Dom(j)"
  • "就假定a0,b0,c0和d0是在进入B0时定义的。"
  • "程序设计语言应该避免二义性,二义的程序没有语义。"
  • "COMPILER CONSTRUCTION IS ENGINEERING A typical compiler has a series of passes that, together, translate code from some source language into some target language. Along the way, the compiler uses dozens of algorithms and data structures. The compiler writer must select, for each step in the process,"
  • "Formally, a finite automaton (fa) is a five-tuple (S, 6, δ, s0, SA), where 1.S is the finite set of states in the recognizer, along with an error state se. 2.6 is finite alphabet used by the recognizer. Typically, 6 is the union of the edge labels in the transition diagram. 3.δ(s,c) is the recognize"
  • "SECTION REVIEW Given a regular expression, we can derive a minimal DFA to recognize the language specified by the RE using the following steps: (1) apply Thompson's construction to build an NFA for the RE; (2) use the subset construction to derive a DFA that simulates the behavior of the RE; and (3)"
作者简介
Keith D. Cooper is the Doerr Professor of Computational Engineering at Rice University. He has worked on a broad collection of problems in optimization of compiled code, including inter- procedural data-flow analysis and its applications, value numbering, algebraic reassociation, register allocation, and instruction scheduling. His recent work has focused on a fundamental reexamination of the structure and behavior of traditional compilers. He has taught a variety of courses at the undergraduate level, from introductory programming through code optimization at the graduate level. He is a Fellow of the ACM. Linda Torczon, Senior Research Scientist, Department of Computer Science at Rice Uni- versity, is a principal investigator on the Platform-Aware Compilation Environment project (PACE), a DARPA-sponsored project that is developing an optimizing compiler environment which automatically adjusts its optimizations and strategies to new platforms. From 1990 to 2000, Dr. Torczon served as executive director of the Center for Research on Parallel Compu- tation (CRPC), a National Science Foundation Science and Technology Center. She also served as the executive director of HiPerSoft, of the Los Alamos Computer Science Institute, and of the Virtual Grid Application Development Software Project (VGrADS).
用户评论
时隔写完编译器大作业多年又读了一遍这本书,着重学习了一下之前没来得及做的SSA及基于SSA的优化,终于解决了某些困扰我多年的疑惑。 不过分拘泥于细节同时不缺失必要的细节,每段算法之后都会有很长的解释,属于我读起来很舒服的写作风格。唯一让我觉得不满的是感觉大局观有些缺失,很少有哲学层面的探讨,做优化容易陷入加速某些特定的情况,而怎样的抽象是必要的,可能需要站在更高的视角。
roadmap on compiler
看内容编排就是极扎实
新年第一本
关于编译器中端和后端的部分着实让人受益匪浅。
恶补基础
比着Stanford的compiler看的,果然大家公认的讲的详细的部分就是我看不懂的部分
现代编译器学习roadmap,很早就引入了SSA form好评。优化部分讲的不是特别多,不过作为入门书也够了。
收藏