Shop top categories that ship internationally
Buy used:
$99.17
$25.99 delivery January 15 - February 6. Details
Used: Acceptable | Details
Sold by BookExcellence
Condition: Used: Acceptable
Comment: Best deals in town! This book is in acceptable condition with wear to the pages, binding, and some marks within
Access codes and supplements are not guaranteed with used items.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Advanced Compiler Design and Implementation 1st Edition

3.8 3.8 out of 5 stars 29 ratings

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 designThis 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 compiler design* 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 processors* 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

Customer reviews

3.8 out of 5 stars
29 global ratings

Review this product

Share your thoughts with other customers

Top reviews from the United States

  • Reviewed in the United States on January 18, 2023
    very good book, quick delivery.
  • Reviewed in the United States on June 14, 2013
    I love this book, and I want to do the exercises in the book.
    Where can I find the answers of the exercises in the book?
    Thanks!
    One person found this helpful
    Report
  • Reviewed in the United States on December 14, 2004
    Ok, let's be fair. This book provides a broad coverage of useful optimizations and it will be useful in case you work writing compilers AND have some experience.

    However, for learning the concepts, it is a very bad material. At the end you end up confused under a pile of thousands of lines of pseudocode in a weird notation (invented by the author) called "I CAN" (yes you can write a very bad book Mr. Muchnick) instead of reading useful explanations of the topics. The author also assumes that you already know some concepts and that's why he does not explain them as he should. If you want to really understand this book, first review Chapter 10 of the Dragon Book. I thought that the Dragon book was not so good because you have to re read some things in order to fully understand, but with Muchnick's book that is not always possible.

    You can also take a look at Morgan's book (unfortunately, out of print) or just read the papers (as the first reviewer suggested). This book is not enough, and sadly, a lot of "teachers" think of it as a kind of "bible" and as a very bad excuse to teach very poorly. Some of them even don't master all the concepts presented there and have to use other books (their "dirty little secret") but they don't tell you which ones and continue praising this bad piece of work. If you are a CS student who really wants to learn, be warned that this book is not for you (it has at least three erratas and still has errors!)
    22 people found this helpful
    Report
  • Reviewed in the United States on October 13, 2003
    Advances in compiler design do not get much press these days. The reasons for this are unclear, but no doubt the perception that compilers need no further improvement has something to do with this. This book, written by one of the leading experts on compilers, certainly dispels this belief. Once readers get used to the idiosyncratic ICAN (Informal Compiler Algorithm Notation) invented by the author and used throughout the book, they get a comprehensive overview of compilers, especially that of optimization. Compilers for the SPARC, PowerPC, DEC, and Pentium architectures are treated in the book. The predominant emphasis of the book is in optimization, and so a few more recent and important topics in compiler construction, such as partial evaluation, are not discussed. Readers are expected to have a prior background in elementary compiler theory. My primary interest in reading the book was to gain insight into the compilation issues that arise in symbolic programming languages such as LISP and Prolog.
    A detailed review of this book cannot be done for lack of space, but some of the helpful aspects and interesting discussions in the book include: 1. The "wrap-up" section at the end of each chapter, giving a compact summary of what was done in the chapter. 2. Generating loads and stores: The author shows how to move values to and from registers using routines more sophisticated than simply loading values into registers before using them or storing values as soon as they have been computed. 3. The main issues in the use of registers, such as variable allocation, efficiency of procedural calls, and scoping. The author lists the different categories that will result in contention for registers, such as stack, frame, and global offset table pointers and dynamic and static links. 4. The local stack frame and its uses, such as holding indexed variables (arrays, etc.) and debugging. 5. The five different parameter-passing mechanisms: call by value, call by result, call by value-result, call by reference, and call by name. A thorough discussion is given of their properties and what languages make use of them. In particular, the author notes that in the languages C and C++, call by value is the only parameter-passing mechanism, but that the address of an object may be passed, thus emulating essentially call by reference. This can be a source of confusion to those who program in C and C++. The most exotic of these mechanisms is call by name, which is a form of "lazy evaluation" in functional programming languages. The author gives a code example of the call by name parameter passing in ALGOL 60. I don't know of any modern practical programming languages that make use of call by name. 6. Shared libraries and the role of semantic linking and position independent code. 7. The compilation issues that arise in symbolic languages, such as LISP and Prolog. These languages typically have run-time type checking and function polymorphism, which gives them their power and ease of use. The author discusses how to produce efficient code for these languages. Since heap storage is utilized heavily by these languages, the allocation and recovering of it is very important. "Generation scavenging" is mentioned as the most efficient method for doing garbage collection in these languages. This method has been advertised in the literature as one that minimizes the time needed for storage reclamation in comparison with other approaches. In addition, the use of "on-the-fly" recompilation for polymorphic-language implementations is discussed. 8. Dynamic programming and its role in automatic production of code generators, as contrasted with the "greedy approach". The author explains the need for "uniform register machines" in the dynamic programming algorithm. 9. Interval analysis and its use in the analysis of control flow. This technique has been used in the field called "abstract interpretation" in recent years, the aim of which is too automatically and intelligently test program code. 10. Dependencies between dynamically allocated objects, such as links between graph structures in LISP and Prolog. The author describes the Hummel-Hendren-Nicolau technique for doing this, which involves naming schemes for locations in heap memory, a collection of axioms for characterizing aliasing locations among locations, and lastly, and most interestingly, utilizes a theorem prover to establish the properties of the data structures. The author emphasizes though that this technique, and others developed for doing dependence analysis of dynamically allocated objects, are very computationally intensive. 11. Individual optimizations, which the author divides into four groups in order of importance. 12. Induction-variable optimizations and their role in loop optimizations. The author shows how to identify induction variables, and how to transform them using various techniques, going by the name strength reduction, induction-variable removal, and linear-function test replacement. 13. Procedure integration and its role in "inlining" procedures in languages such as C++. The author emphasizes the drawbacks in using inlining, such as its impact on cache misses. 14. The trade-off between object abstraction and optimization, which occurs in object-oriented languages such as C++. The author discusses in detail the role of interprodecural optimizations in dealing with abstraction in the object-oriented modular approach to programming, particularly the identification of "side effects" in making procedure calls. 15. Code optimization that takes advantage of the memory hierarchy, such as data and instruction caches, and how to improve register allocation for arrays. The author gives a detailed and highly interesting discussion of scalar replacement for array elements. 16. Future trends and research in compiler design. The author mentions a few which he believes will dominate in the upcoming decade, such as scalar-oriented and data-cache optimizations. Scalar compilation will be he most active research area in his opinion. At the present time, there has been discussion of "intelligent compilers" that will interact with the user to develop optimal code, or even produce correct programs. These compilers will understand the intentions of the program and warn the user if these are violated, as well as reduce the time and cost needed for testing programs.
    34 people found this helpful
    Report
  • Reviewed in the United States on March 3, 2007
    Compiler development is more of a craft than a science, although there's plenty of science involved. It involves huge numbers of tradeoffs in features, optimizations, and use of the underlying processor. But, as long as people keep coming up with new computing platforms (and not just instruction set processors), new languages, and new performance demands there will always be need for new compiler developers. If you can't apprentice yourself to masters of the craft, or even if you can, this book is a great introduction 2000-era compiler development.

    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.

    //wiredweird
    11 people found this helpful
    Report

Top reviews from other countries

  • Chintan
    5.0 out of 5 stars Salute to the author
    Reviewed in India on July 16, 2015
    If you are able to understand this book, then you are among very few people on earth who understands compilers at deepest level.

    If my above line confuses you, do not buy this book.
  • Gleam&Glimpse
    1.0 out of 5 stars Not good
    Reviewed in India on January 14, 2018
    The item was supposed to be hard cover but didn't come in hard cover. It was torn at the edges of the binding . Highly dissatisfied.
    Customer image
    Gleam&Glimpse
    1.0 out of 5 stars Not good
    Reviewed in India on January 14, 2018
    The item was supposed to be hard cover but didn't come in hard cover. It was torn at the edges of the binding . Highly dissatisfied.
    Images in this review
    Customer image
    Customer image
  • Gareth Greenwood
    1.0 out of 5 stars Several pages blank. Avoid Indian reprints of this one!
    Reviewed in the United Kingdom on March 19, 2017
    An edition printed in India that has several pages blank. Fortunately I needed two copies so got a second US-printed one that did have the missing pages and allowed me to patch them into the dud copy. Apart from that, this is a standard text on compiler optimisations and a basic reference in the field. Only needed by specialists but indispensable when the need comes.