- Hardcover: 856 pages
- Publisher: Morgan Kaufmann; 1 edition (August 15, 1997)
- Language: English
- ISBN-10: 1558603204
- ISBN-13: 978-1558603202
- Product Dimensions: 9.6 x 7.6 x 1.7 inches
- Shipping Weight: 3.7 pounds
- Average Customer Review: 19 customer reviews
- Amazon Best Sellers Rank: #859,319 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Advanced Compiler Design and Implementation 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Customers who bought this item also bought
What other items do customers buy after viewing this item?
Optimizing compilers, which turn human-readable programming languages into the smallest, most efficient machine code possible, are among the most complex pieces of software ever written. Building a compiler is both science and black art and demands an intimate knowledge of data structures, algorithms, high-level programming languages, and processor architectures and their instruction sets. Advanced Compiler Design and Implementation presents a comprehensive and technically up-to-date look at design of real-world compilers for CISC- and RISC-based uni-processor architectures. The author led the advanced compiler design and implementation teams for both Hewlett-Packard's PA-RISC and Sun Microsystems's SPARC processors.
From the Back Cover
From the Foreword by Susan L. Graham:
This book takes on the challenges of contemporary languages and
architectures, and prepares the reader for the new compiling problems that
will inevitably arise in the future.
The definitive book on advanced compiler design
This comprehensive, up-to-date work examines advanced issues in the design
and implementation of compilers for modern processors. Written for
professionals and graduate students, the book guides readers in designing
and implementing efficient structures for highly optimizing compilers for
real-world languages. Covering advanced issues in fundamental areas of
compiler design, this book discusses a wide array of possible code
optimizations, determining the relative importance of optimizations, and
selecting the most effective methods of implementation.
- Lays the foundation for understanding the major issues of advanced
- Treats optimization in-depth
- Uses four case studies of commercial compiling suites to illustrate
different approaches to compiler structure, intermediate-code design, and
optimization―these include Sun Microsystems's compiler for SPARC, IBM's for
POWER and PowerPC, DEC's for Alpha, and Intel's for Pentium an related
- Presents numerous clearly defined algorithms based on actual cases
- Introduces Informal Compiler Algorithm Notation (ICAN), a language devised
by the author to communicate algorithms effectively to people
Discover books for all types of engineers, auto enthusiasts, and much more. Learn more
Top customer reviews
Also at the end of the book it covers real products and how they implement optimization techniques.
Where can I find the answers of the exercises in the book?
The problem with this book is that some parts are nearly indecipherable without prior knowledge. They are missing bits of detail that an advanced compiler designer might just "know", but without these details the rest is gibberish for the advanced beginner. For example, the section on iterated dominance frontiers didn't make sense after three readings. I finally pulled up the original paper on the subject, and all was clear. Muchnick had skipped a step in the algorithm.
Another example of missing detail is in the chapter on code generation. Muchnik uses the "=>" symbol without explaining its meaning. Without this detail, much of the section is meaningless. I pulled up a bunch of papers on the subject to try to find what I missed, and now it's clear.
Yet another example - Muchnick uses three kinds of intermediate language/representation (IR) - high-, medium-, and low-level IR. It's pretty obvious what's different between high- and medium-level IR, but his explanation of the difference between medium- and low-level IR is sorely lacking. More examples would have been helpful.
He uses his own programming language for describing the algorithms. This didn't bother me much after I understood the language. But his example code is a confusing mix of verbose and terse. His terse variable and function names make it difficult to grasp what the code is doing without already understanding the algorithm.
The good thing about this book is that it covers a lot of ground. It introduces most of the topics an advanced compiler designer needs to know. But to really grasp all the ideas in this book, you need access to a good computer science library. The bibliography is very good; you can learn a lot from reading the references. I signed up for the ACM Digital Library for just this purpose. If you're a student, you can get access to the ACM Digital Library for less than the price of this book - that's a real bargain.
My recommendation is to buy this book, and be prepared to do additional research to overcome its shortcomings.
Having spent nearly 15 years working on compiler development, with most of it spent on codegen & optimization in compiler backends, I was very happy to see this book published ten years ago when I was relatively new to the field and hungry for more information.
The good: Coverage of many important topics, and a better discussion of the phase ordering issues than I've seen in other texts.
The bad: The writing style is okay, but not great. Little insight is typically given for the problems discussed. A very annoying aspect of the book is that the author sometimes goes into great detail about one technique, and then later mentions another (often superior, IMO) way to solve the problem at hand, without going into much detail. As a working compiler writer, I would have preferred it be the other way around.
The very very bad: The ICAN notation used throughout the book is verbose, unintuitive, and ultimately takes away from the presentation. Compare the complicated detail-filled ICAN listings in this book to the simple, elegant algorithms in the Dragon Book or Cooper/Torczon's text.
Muchnik does a clear, thorough job of laying out the basics, starting with the intermediate representation used. (If you get that wrong, nothing else is going to work.) He then moves on to the basics of symbol table structure - an issue that can get immensely complicated in systems like Microsoft's CLR. He also discusses run time support briefly. Although that discussion is good as far as it goes, it skips past a lot of the complexities of dynamic loading, debug symbol tables, simulation support, and related issues. They aren't strictly part of the compiled, executable code, but responsibilities of the compiler developer nonetheless. Next comes a brief description of code generation, crucial in normal environments but tangential to my own needs.
That's just the first quarter of the book, though. The rest is the real meat of the topic: code analysis and optimization techniques, over 600 pages of discussion. It's way too much to summarize here, but even that just an introduction to a huge technology. Still, you have to start somewhere.
By this point, you may be asking "But what about tokens, lexemes, and grammars? Isn't that what compilers do?" Well, yes, but it's done. Tool developers have made lexical analysis a commodity. The easily automated tasks are not where modern compiler distinguishes itself. This book addresses the semantic levels, getting the reader into the shallow end of the industry's huge pool of specialized compilation knowledge.
If you have to self-teach compiler development - good luck. Start here, though, and luck will have a lot less to do with the outcome.
Most recent customer reviews
"Another conventional approach to...Read more
get "Programming Language Pragmatics" by michael l. scott
and coming to this book.Read more
compilers for almost twenty years.Read more