没有合适的资源?快使用搜索试试~ 我知道了~
首页Advanced Compiler Design and Implementation
Advanced Compiler Design and Implementation
5星 · 超过95%的资源 需积分: 9 119 下载量 179 浏览量
更新于2023-03-16
评论 2
收藏 12.23MB PDF 举报
Advanced Compiler Design and Implementation
资源详情
资源评论
资源推荐
Advanced
COMPILER DESIGN
IMPLEMENTATION
Steven S. M uchnick
Order of Optimizations
This flowchart represents a recommended order for performing optimizations in an aggres
sive optimizing compiler. Other orders are possible, and the examples of real-world compilers
in Chapter 21 present several alternatives, though none of them includes all of the optimiza
tions in this diagram. The letters at the left in the diagram correspond to the levels of code
appropriate for the corresponding optimizations. The correspondence between letters and
code levels is as follows:
A These optimizations typically are applied either to source code or to a high-level intermediate
code that preserves loop structure and the sequence in which operations are performed and
that has array accesses in essentially their source-code form. Usually, these optimizations are
done very early in the compilation process, since compilation tends to lower the level of the
code as it proceeds from one phase to the next.
D
(to constant folding, algebraic
simplifications, and reassociation)
A
B, C These optimizations are typically performed on medium- or low-level intermediate code,
depending on the overall organization of the compiler. If code selection is done before all
optimizations other than those in box A (known as the “low-level” model of optimizer struc
ture), then these optimizations are performed on low-level code. If, on the other hand, some
optimizations are performed on a medium-level, relatively machine-independent intermedi
ate code and others are performed on low-level code after code generation (known as the
“mixed” model), then these optimizations are generally done on the medium-level interme
diate code.
The branches from Cl to C2 and C3 represent a choice of the method used to perform
essentially the same optimization (namely, moving computations to places where they are per
formed less frequently without changing the semantics of the program). They also represent
a choice of the data-flow analyses used to perform the optimization.
D These optimizations are almost always done on a low-level form of code—one that may
be quite machine-dependent (e.g., a structured assembly language) or that may be somewhat
more general, such as the low-level intermediate code used in this book—because they require
that addresses have been turned into the form required by the target processor and because
several of them require low-level control-flow code.
E These optimizations are performed at link time, so they operate on relocatable object code.
Three optimizations, namely, constant folding, algebraic simplification, and reassociation,
are in boxes connected to the other phases of the optimization process by dotted lines because
they are best structured as subroutines that can be invoked whenever they are needed.
A version of this diagram appears in Chapters 1 and 11 through 20 to guide the reader
in ordering optimizer components in a compiler.
Advanced Compiler Design
and Implementation
Steven S. Muchnick
MORGAN KAUFMANN PUBLISHERS
AN IMPRINT OF ACADEMIC PRESS
A Harcourt Science and Technology Company
SAN FRANCISCO SAN DIEGO NEW YORK BOSTON
LONDON SYDNEY TOKYO
Senior Editor Denise E. M. Penrose
Director of Production and Manufacturing Yonie Overton
Senior Production Editor Cheri Palmer
Editorial Coordinator Jane Elliott
Cover Design Ross Carron Design
Text Design, Composition, and Illustration Windfall Software
Copyeditor Jeff Van Bueren
Proofreader Jennifer McClain
Indexer Ty Koontz
Printer Courier Corporation
ACADEMIC PRESS
A Harcourt Science and Technology Company
525 B Street, Suite 1900, San Diego, CA 92101-4495, USA
http://www.academicpress.com
Academic Press
Harcourt Place, 32 Jamestown Road, London, NW1 7BY, United Kingdom
http://www.academicpress.com
Morgan Kaufmann Publishers
340 Pine Street, Sixth Floor, San Francisco, CA 94104-3205, USA
http://www.mkp.com
© 1997 by Academic Press
All rights reserved
Printed in the United States of America
04 03 6
No part of this publication may be reproduced, stored in a retrieval system, or transmitted
in any form or by any means—electronic, mechanical, photocopying, recording, or
otherwise—without the prior written permission of the publisher.
Library of Congress Cataloging-in-Publication Data
Muchnick, Steven S., date.
Advanced compiler design and implementation / Steve Muchnick.
p. cm.
Includes bibliographical references and index.
ISBN 1-55860-320-4
1. Compilers (Computer programs) 2. Systems programming (Computer
science). I. Title.
QA76.76.C65M8 1997
005.4'53—dc21 97-13063
CIP
剩余886页未读,继续阅读
arthur_lisp
- 粉丝: 1
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论4