![](https://csdnimg.cn/release/download_crawler_static/10188727/bg14.jpg)
Preface to the Second Edition
The practice of compiler construction changes continually, in part because the designs of
processors and systems change. For example, when we began to write Engineering a Com-
piler (eac) in 1998, some of our colleagues questioned the wisdom of including a chapter on
instruction scheduling because out-of-order execution threatened to make scheduling largely
irrelevant. Today, as the second edition goes to press, the rise of multicore processors and the
push for more cores has made in-order execution pipelines attractive again because their smaller
footprints allow the designer to place more cores on a chip. Instruction scheduling will remain
important for the near-term future.
At the same time, the compiler construction community continues to develop new insights and
algorithms, and to rediscover older techniques that were effective but largely forgotten. Recent
research has created excitement surrounding the use of chordal graphs in register allocation
(see Section 13.5.2). That work promises to simplify some aspects of graph-coloring allocators.
Brzozowski’s algorithm is a dfa minimization technique that dates to the early 1960s but has
not been taught in compiler courses for decades (see Section 2.6.2). It provides an easy path
from an implementation of the subset construction to one that minimizes dfas. A modern course
in compiler construction might include both of these ideas.
How, then, are we to structure a curriculum in compiler construction so that it prepares students
to enter this ever changing field? We believe that the course should provide each student with
the set of base skills that they will need to build new compiler components and to modify
existing ones. Students need to understand both sweeping concepts, such as the collaboration
between the compiler, linker, loader, and operating system embodied in a linkage convention,
and minute detail, such as how the compiler writer might reduce the aggregate code space used
by the register-save code at each procedure call.
n CHANGES IN THE SECOND EDITION
The second edition of Engineering a Compiler (eac2e) presents both perspectives: big-picture
views of the problems in compiler construction and detailed discussions of algorithmic alterna-
tives. In preparing eac2e, we focused on the usability of the book, both as a textbook and as a
reference for professionals. Specifically, we
n Improved the flow of ideas to help the student who reads the book sequentially. Chapter
introductions explain the purpose of the chapter, lay out the major concepts, and provide a
high-level overview of the chapter’s subject matter. Examples have been reworked to
provide continuity across chapters. In addition, each chapter begins with a summary and a
set of keywords to aid the user who treats eac2e as a reference book.
n Added section reviews and review questions at the end of each major section. The review
questions provide a quick check as to whether or not the reader has understood the major
points of the section.
xix