SlideShare a Scribd company logo
Engineering a Compiler 2nd Edition Keith Cooper -
PDF Download (2025)
https://ebookultra.com/download/engineering-a-compiler-2nd-
edition-keith-cooper/
Visit ebookultra.com today to download the complete set of
ebooks or textbooks
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com
Piling Engineering 3rd Edition Keith Elson
https://ebookultra.com/download/piling-engineering-3rd-edition-keith-
elson/
Optomechanical Systems Engineering 1st Edition Keith J.
Kasunic
https://ebookultra.com/download/optomechanical-systems-
engineering-1st-edition-keith-j-kasunic/
Biosensors a practical approach 2nd Edition Jonathan M.
Cooper
https://ebookultra.com/download/biosensors-a-practical-approach-2nd-
edition-jonathan-m-cooper/
Cochlear Implants A Practical Guide 2nd Edition Huw Cooper
https://ebookultra.com/download/cochlear-implants-a-practical-
guide-2nd-edition-huw-cooper/
Metabolic Regulation A Human Perspective 2nd Edition Keith
N. Frayn
https://ebookultra.com/download/metabolic-regulation-a-human-
perspective-2nd-edition-keith-n-frayn/
How to Be a Brilliant Leader Brilliant Business 2nd
Edition Simon Cooper
https://ebookultra.com/download/how-to-be-a-brilliant-leader-
brilliant-business-2nd-edition-simon-cooper/
Seed of Light 2nd Edition Edmund Cooper
https://ebookultra.com/download/seed-of-light-2nd-edition-edmund-
cooper/
Anesthesia emergencies 2nd Edition Keith J. Ruskin
https://ebookultra.com/download/anesthesia-emergencies-2nd-edition-
keith-j-ruskin/
Essential Guide to Acute Care 2nd Edition Nicola Cooper
https://ebookultra.com/download/essential-guide-to-acute-care-2nd-
edition-nicola-cooper/
Engineering a Compiler 2nd Edition Keith Cooper
Engineering a Compiler 2nd Edition Keith Cooper Digital
Instant Download
Author(s): Keith Cooper, Linda Torczon
ISBN(s): 9780080916613, 012088478X
Edition: 2
File Details: PDF, 7.56 MB
Year: 2012
Language: english
Engineering a Compiler 2nd Edition Keith Cooper
In Praise of Engineering a Compiler Second Edition
Compilers are a rich area of study, drawing together the whole world of computer science in
one, elegant construction. Cooper and Torczon have succeeded in creating a welcoming guide to
these software systems, enhancing this new edition with clear lessons and the details you simply
must get right, all the while keeping the big picture firmly in view. Engineering a Compiler is an
invaluable companion for anyone new to the subject.
Michael D. Smith
Dean of the Faculty of Arts and Sciences
John H. Finley, Jr. Professor of Engineering and Applied Sciences, Harvard University
The Second Edition of Engineering a Compiler is an excellent introduction to the construction
of modern optimizing compilers. The authors draw from a wealth of experience in compiler
construction in order to help students grasp the big picture while at the same time guiding
them through many important but subtle details that must be addressed to construct an effec-
tive optimizing compiler. In particular, this book contains the best introduction to Static Single
Assignment Form that I’ve seen.
Jeffery von Ronne
Assistant Professor
Department of Computer Science
The University of Texas at San Antonio
Engineering a Compiler increases its value as a textbook with a more regular and consistent
structure, and with a host of instructional aids: review questions, extra examples, sidebars, and
marginal notes. It also includes a wealth of technical updates, including more on nontraditional
languages, real-world compilers, and nontraditional uses of compiler technology. The optimi-
zation material—already a signature strength—has become even more accessible and clear.
Michael L. Scott
Professor
Computer Science Department
University of Rochester
Author of Programming Language Pragmatics
Keith Cooper and Linda Torczon present an effective treatment of the history as well as a
practitioner’s perspective of how compilers are developed. Theory as well as practical real
world examples of existing compilers (i.e. LISP, FORTRAN, etc.) comprise a multitude of effec-
tive discussions and illustrations. Full circle discussion of introductory along with advanced
“allocation” and “optimization” concepts encompass an effective “life-cycle” of compiler
engineering. This text should be on every bookshelf of computer science students as well as
professionals involved with compiler engineering and development.
David Orleans
Nova Southeastern University
This page intentionally left blank
Engineering a Compiler
Second Edition
About the Authors
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).
Engineering a Compiler
Second Edition
Keith D. Cooper
Linda Torczon
Rice University
Houston, Texas
AMSTERDAM • BOSTON • HEIDELBERG • LONDON
NEW YORK • OXFORD • PARIS • SAN DIEGO
SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO
Morgan Kaufmann Publishers is an imprint of Elsevier
Acquiring Editor: Todd Green
Development Editor: Nate McFadden
Project Manager: Andre Cuello
Designer: Alisa Andreola
Cover Image: “The Landing of the Ark,” a vaulted ceiling-design whose iconography was narrated, designed, and drawn by John
Outram of John Outram Associates, Architects and City Planners, London, England. To read more visit www.johnoutram.com/rice.html.
Morgan Kaufmann is an imprint of Elsevier.
30 Corporate Drive, Suite 400, Burlington, MA 01803, USA
Copyright © 2012 Elsevier, Inc. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including
photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on
how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as
the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions.
This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted
herein).
Notices
Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes
in research methods or professional practices may become necessary. Practitioners and researchers must always rely on their own
experience and knowledge in evaluating and using any information or methods described herein. In using such information or methods
they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility.
To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or
damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods,
products, instructions, or ideas contained in the material herein.
Library of Congress Cataloging-in-Publication Data
Application submitted
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library.
ISBN: 978-0-12-088478-0
For information on all Morgan Kaufmann publications
visit our website at www.mkp.com
Printed in the United States of America
11 12 13 14 10 9 8 7 6 5 4 3 2 1
We dedicate this volume to
n our parents, who instilled in us the thirst for knowledge and supported
us as we developed the skills to follow our quest for knowledge;
n our children, who have shown us again how wonderful the process of
learning and growing can be; and
n our spouses, without whom this book would never have been written.
About the Cover
The cover of this book features a portion of the drawing, “The Landing of the Ark,” which
decorates the ceiling of Duncan Hall at Rice University. Both Duncan Hall and its ceiling were
designed by British architect John Outram. Duncan Hall is an outward expression of architec-
tural, decorative, and philosophical themes developed over Outram’s career as an architect. The
decorated ceiling of the ceremonial hall plays a central role in the building’s decorative scheme.
Outram inscribed the ceiling with a set of significant ideas—a creation myth. By expressing
those ideas in an allegorical drawing of vast size and intense color, Outram created a signpost
that tells visitors who wander into the hall that, indeed, this building is not like other buildings.
By using the same signpost on the cover of Engineering a Compiler, the authors intend to signal
that this work contains significant ideas that are at the core of their discipline. Like Outram’s
building, this volume is the culmination of intellectual themes developed over the authors’
professional careers. Like Outram’s decorative scheme, this book is a device for communicating
ideas. Like Outram’s ceiling, it presents significant ideas in new ways.
By connecting the design and construction of compilers with the design and construction of
buildings, we intend to convey the many similarities in these two distinct activities. Our many
long discussions with Outram introduced us to the Vitruvian ideals for architecture: commodity,
firmness, and delight. These ideals apply to many kinds of construction. Their analogs for com-
piler construction are consistent themes of this text: function, structure, and elegance. Function
matters; a compiler that generates incorrect code is useless. Structure matters; engineering detail
determines a compiler’s efficiency and robustness. Elegance matters; a well-designed compiler,
in which the algorithms and data structures flow smoothly from one pass to another, can be a
thing of beauty.
We are delighted to have John Outram’s work grace the cover of this book.
Duncan Hall’s ceiling is an interesting technological artifact. Outram drew the original design
on one sheet of paper. It was photographed and scanned at 1200 dpi yielding roughly 750 mb
of data. The image was enlarged to form 234 distinct 2 × 8 foot panels, creating a 52 × 72 foot
image. The panels were printed onto oversize sheets of perforated vinyl using a 12 dpi acrylic-
ink printer. These sheets were precision mounted onto 2 × 8 foot acoustic tiles and hung on the
vault’s aluminum frame.
viii
Contents
About the Authors ........................................................................ iv
About the Cover .......................................................................... viii
Preface ..................................................................................... xix
CHAPTER 1 Overview of Compilation ................................................... 1
1.1 Introduction .......................................................... 1
1.2 Compiler Structure ................................................... 6
1.3 Overview of Translation ............................................. 9
1.3.1 The Front End ................................................. 10
1.3.2 The Optimizer ................................................. 14
1.3.3 The Back End ................................................. 15
1.4 Summary and Perspective ........................................... 21
Chapter Notes ........................................................ 22
Exercises ............................................................. 23
CHAPTER 2 Scanners...................................................................... 25
2.1 Introduction .......................................................... 25
2.2 Recognizing Words .................................................. 27
2.2.1 A Formalism for Recognizers ................................ 29
2.2.2 Recognizing More Complex Words .......................... 31
2.3 Regular Expressions ................................................. 34
2.3.1 Formalizing the Notation ..................................... 35
2.3.2 Examples ...................................................... 36
2.3.3 Closure Properties of REs .................................... 39
2.4 From Regular Expression to Scanner ............................... 42
2.4.1 Nondeterministic Finite Automata ........................... 43
2.4.2 Regular Expression to NFA: Thompson’s
Construction ................................................... 45
2.4.3 NFA to DFA: The Subset Construction ...................... 47
2.4.4 DFA to Minimal DFA: Hopcroft’s Algorithm ............... 53
2.4.5 Using a DFA as a Recognizer ............................... 57
2.5 Implementing Scanners .............................................. 59
2.5.1 Table-Driven Scanners ........................................ 60
2.5.2 Direct-Coded Scanners ....................................... 65
2.5.3 Hand-Coded Scanners ........................................ 69
2.5.4 Handling Keywords ........................................... 72
ix
x Contents
2.6 Advanced Topics ..................................................... 74
2.6.1 DFA to Regular Expression .................................. 74
2.6.2 Another Approach to DFA Minimization:
Brzozowski’s Algorithm ...................................... 75
2.6.3 Closure-Free Regular Expressions ........................... 77
2.7 Chapter Summary and Perspective .................................. 78
Chapter Notes ........................................................ 78
Exercises ............................................................. 80
CHAPTER 3 Parsers........................................................................ 83
3.1 Introduction .......................................................... 83
3.2 Expressing Syntax ................................................... 85
3.2.1 Why Not Regular Expressions? .............................. 85
3.2.2 Context-Free Grammars ...................................... 86
3.2.3 More Complex Examples ..................................... 89
3.2.4 Encoding Meaning into Structure ............................ 92
3.2.5 Discovering a Derivation for an Input String ................ 95
3.3 Top-Down Parsing ................................................... 96
3.3.1 Transforming a Grammar for Top-Down Parsing ........... 98
3.3.2 Top-Down Recursive-Descent Parsers ....................... 108
3.3.3 Table-Driven LL(1) Parsers .................................. 110
3.4 Bottom-Up Parsing .................................................. 116
3.4.1 The LR(1) Parsing Algorithm ................................ 118
3.4.2 Building LR(1) Tables ........................................ 124
3.4.3 Errors in the Table Construction ............................. 136
3.5 Practical Issues ....................................................... 141
3.5.1 Error Recovery ................................................ 141
3.5.2 Unary Operators .............................................. 142
3.5.3 Handling Context-Sensitive Ambiguity ..................... 143
3.5.4 Left versus Right Recursion .................................. 144
3.6 Advanced Topics ..................................................... 147
3.6.1 Optimizing a Grammar ....................................... 148
3.6.2 Reducing the Size of LR(1) Tables .......................... 150
3.7 Summary and Perspective ........................................... 155
Chapter Notes ........................................................ 156
Exercises ............................................................. 157
Contents xi
CHAPTER 4 Context-Sensitive Analysis.................................................. 161
4.1 Introduction .......................................................... 161
4.2 An Introduction to Type Systems ................................... 164
4.2.1 The Purpose of Type Systems ................................ 165
4.2.2 Components of a Type System ............................... 170
4.3 The Attribute-Grammar Framework ................................ 182
4.3.1 Evaluation Methods ........................................... 186
4.3.2 Circularity ..................................................... 187
4.3.3 Extended Examples ........................................... 187
4.3.4 Problems with the Attribute-Grammar Approach ........... 194
4.4 Ad Hoc Syntax-Directed Translation ............................... 198
4.4.1 Implementing Ad Hoc Syntax-Directed Translation ........ 199
4.4.2 Examples ...................................................... 202
4.5 Advanced Topics ..................................................... 211
4.5.1 Harder Problems in Type Inference .......................... 211
4.5.2 Changing Associativity ....................................... 213
4.6 Summary and Perspective ........................................... 215
Chapter Notes ........................................................ 216
Exercises ............................................................. 217
CHAPTER 5 Intermediate Representations ............................................. 221
5.1 Introduction .......................................................... 221
5.1.1 A Taxonomy of Intermediate Representations .............. 223
5.2 Graphical IRs ......................................................... 226
5.2.1 Syntax-Related Trees ......................................... 226
5.2.2 Graphs ......................................................... 230
5.3 Linear IRs ............................................................ 235
5.3.1 Stack-Machine Code .......................................... 237
5.3.2 Three-Address Code .......................................... 237
5.3.3 Representing Linear Codes ................................... 238
5.3.4 Building a Control-Flow Graph from a Linear Code ........ 241
5.4 Mapping Values to Names ........................................... 243
5.4.1 Naming Temporary Values ................................... 244
5.4.2 Static Single-Assignment Form .............................. 246
5.4.3 Memory Models .............................................. 250
xii Contents
5.5 Symbol Tables ........................................................ 253
5.5.1 Hash Tables ................................................... 254
5.5.2 Building a Symbol Table ..................................... 255
5.5.3 Handling Nested Scopes ...................................... 256
5.5.4 The Many Uses for Symbol Tables .......................... 261
5.5.5 Other Uses for Symbol Table Technology ................... 263
5.6 Summary and Perspective ........................................... 264
Chapter Notes ........................................................ 264
Exercises ............................................................. 265
CHAPTER 6 The Procedure Abstraction ................................................. 269
6.1 Introduction .......................................................... 269
6.2 Procedure Calls ...................................................... 272
6.3 Name Spaces ......................................................... 276
6.3.1 Name Spaces of Algol-like Languages ...................... 276
6.3.2 Runtime Structures to Support Algol-like
Languages ..................................................... 280
6.3.3 Name Spaces of Object-Oriented Languages ................ 285
6.3.4 Runtime Structures to Support Object-Oriented
Languages ..................................................... 290
6.4 Communicating Values Between Procedures ....................... 297
6.4.1 Passing Parameters ............................................ 297
6.4.2 Returning Values .............................................. 301
6.4.3 Establishing Addressability .................................. 301
6.5 Standardized Linkages ............................................... 308
6.6 Advanced Topics ..................................................... 312
6.6.1 Explicit Heap Management ................................... 313
6.6.2 Implicit Deallocation ......................................... 317
6.7 Summary and Perspective ........................................... 322
Chapter Notes ........................................................ 323
Exercises ............................................................. 324
CHAPTER 7 Code Shape................................................................... 331
7.1 Introduction .......................................................... 331
7.2 Assigning Storage Locations ........................................ 334
7.2.1 Placing Runtime Data Structures ............................. 335
7.2.2 Layout for Data Areas ........................................ 336
7.2.3 Keeping Values in Registers .................................. 340
7.3 Arithmetic Operators ................................................ 342
7.3.1 Reducing Demand for Registers ............................. 344
Contents xiii
7.3.2 Accessing Parameter Values .................................. 345
7.3.3 Function Calls in an Expression .............................. 347
7.3.4 Other Arithmetic Operators .................................. 348
7.3.5 Mixed-Type Expressions ..................................... 348
7.3.6 Assignment as an Operator ................................... 349
7.4 Boolean and Relational Operators .................................. 350
7.4.1 Representations ............................................... 351
7.4.2 Hardware Support for Relational Operations ................ 353
7.5 Storing and Accessing Arrays ....................................... 359
7.5.1 Referencing a Vector Element ................................ 359
7.5.2 Array Storage Layout ......................................... 361
7.5.3 Referencing an Array Element ............................... 362
7.5.4 Range Checking ............................................... 367
7.6 Character Strings ..................................................... 369
7.6.1 String Representations ........................................ 370
7.6.2 String Assignment ............................................ 370
7.6.3 String Concatenation .......................................... 372
7.6.4 String Length .................................................. 373
7.7 Structure References ................................................. 374
7.7.1 Understanding Structure Layouts ............................ 375
7.7.2 Arrays of Structures ........................................... 376
7.7.3 Unions and Runtime Tags .................................... 377
7.7.4 Pointers and Anonymous Values ............................. 378
7.8 Control-Flow Constructs ............................................ 380
7.8.1 Conditional Execution ........................................ 381
7.8.2 Loops and Iteration ........................................... 384
7.8.3 Case Statements ............................................... 388
7.9 Procedure Calls ...................................................... 392
7.9.1 Evaluating Actual Parameters ................................ 393
7.9.2 Saving and Restoring Registers .............................. 394
7.10 Summary and Perspective ........................................... 396
Chapter Notes ........................................................ 397
Exercises ............................................................. 398
CHAPTER 8 Introduction to Optimization .............................................. 405
8.1 Introduction .......................................................... 405
8.2 Background ........................................................... 407
8.2.1 Examples ...................................................... 408
8.2.2 Considerations for Optimization ............................. 412
8.2.3 Opportunities for Optimization ............................... 415
xiv Contents
8.3 Scope of Optimization ............................................... 417
8.4 Local Optimization .................................................. 420
8.4.1 Local Value Numbering ...................................... 420
8.4.2 Tree-Height Balancing ........................................ 428
8.5 Regional Optimization ............................................... 437
8.5.1 Superlocal Value Numbering ................................. 437
8.5.2 Loop Unrolling ................................................ 441
8.6 Global Optimization ................................................. 445
8.6.1 Finding Uninitialized Variables with Live
Information .................................................... 445
8.6.2 Global Code Placement ....................................... 451
8.7 Interprocedural Optimization ........................................ 457
8.7.1 Inline Substitution ............................................ 458
8.7.2 Procedure Placement .......................................... 462
8.7.3 Compiler Organization for Interprocedural
Optimization .................................................. 467
8.8 Summary and Perspective ........................................... 469
Chapter Notes ........................................................ 470
Exercises ............................................................. 471
CHAPTER 9 Data-Flow Analysis .......................................................... 475
9.1 Introduction .......................................................... 475
9.2 Iterative Data-Flow Analysis ........................................ 477
9.2.1 Dominance .................................................... 478
9.2.2 Live-Variable Analysis ....................................... 482
9.2.3 Limitations on Data-Flow Analysis .......................... 487
9.2.4 Other Data-Flow Problems ................................... 490
9.3 Static Single-Assignment Form ..................................... 495
9.3.1 A Simple Method for Building SSA Form .................. 496
9.3.2 Dominance Frontiers .......................................... 497
9.3.3 Placing φ-Functions .......................................... 500
9.3.4 Renaming ...................................................... 505
9.3.5 Translation Out of SSA Form ................................ 510
9.3.6 Using SSA Form .............................................. 515
9.4 Interprocedural Analysis ............................................. 519
9.4.1 Call-Graph Construction ...................................... 520
9.4.2 Interprocedural Constant Propagation ....................... 522
9.5 Advanced Topics ..................................................... 526
9.5.1 Structural Data-Flow Algorithms and Reducibility ......... 527
9.5.2 Speeding up the Iterative Dominance Framework .......... 530
Contents xv
9.6 Summary and Perspective ........................................... 533
Chapter Notes ........................................................ 534
Exercises ............................................................. 535
CHAPTER 10 Scalar Optimizations.......................................................... 539
10.1 Introduction ............................................................. 539
10.2 Eliminating Useless and Unreachable Code ........................ 544
10.2.1 Eliminating Useless Code .................................... 544
10.2.2 Eliminating Useless Control Flow .......................... 547
10.2.3 Eliminating Unreachable Code .............................. 550
10.3 Code Motion ........................................................... 551
10.3.1 Lazy Code Motion ............................................ 551
10.3.2 Code Hoisting ................................................. 559
10.4 Specialization .......................................................... 560
10.4.1 Tail-Call Optimization ........................................ 561
10.4.2 Leaf-Call Optimization ....................................... 562
10.4.3 Parameter Promotion ......................................... 563
10.5 Redundancy Elimination .............................................. 565
10.5.1 Value Identity versus Name Identity ........................ 565
10.5.2 Dominator-based Value Numbering ......................... 566
10.6 Enabling Other Transformations ..................................... 569
10.6.1 Superblock Cloning ........................................... 570
10.6.2 Procedure Cloning ............................................ 571
10.6.3 Loop Unswitching ............................................ 572
10.6.4 Renaming ...................................................... 573
10.7 Advanced Topics ....................................................... 575
10.7.1 Combining Optimizations .................................... 575
10.7.2 Strength Reduction ............................................ 580
10.7.3 Choosing an Optimization Sequence ........................ 591
10.8 Summary and Perspective ............................................ 592
Chapter Notes .......................................................... 593
Exercises ................................................................ 594
CHAPTER 11 Instruction Selection ......................................................... 597
11.1 Introduction ............................................................. 597
11.2 Code Generation ....................................................... 600
11.3 Extending the Simple Treewalk Scheme ............................ 603
11.4 Instruction Selection via Tree-Pattern Matching ................... 610
11.4.1 Rewrite Rules .................................................. 611
11.4.2 Finding a Tiling ............................................... 616
11.4.3 Tools ............................................................ 620
xvi Contents
11.5 Instruction Selection via Peephole Optimization ................... 621
11.5.1 Peephole Optimization ....................................... 622
11.5.2 Peephole Transformers ....................................... 629
11.6 Advanced Topics ....................................................... 632
11.6.1 Learning Peephole Patterns .................................. 632
11.6.2 Generating Instruction Sequences ........................... 633
11.7 Summary and Perspective ............................................ 634
Chapter Notes .......................................................... 635
Exercises ................................................................ 637
CHAPTER 12 Instruction Scheduling ....................................................... 639
12.1 Introduction ............................................................. 639
12.2 The Instruction-Scheduling Problem ................................ 643
12.2.1 Other Measures of Schedule Quality ........................ 648
12.2.2 What Makes Scheduling Hard? .............................. 649
12.3 Local List Scheduling ................................................. 651
12.3.1 The Algorithm ................................................. 651
12.3.2 Scheduling Operations with Variable Delays .............. 654
12.3.3 Extending the Algorithm ..................................... 655
12.3.4 Tie Breaking in the List-Scheduling
Algorithm ...................................................... 655
12.3.5 Forward versus Backward List Scheduling ................ 656
12.3.6 Improving the Efficiency of List Scheduling .............. 660
12.4 Regional Scheduling ................................................... 661
12.4.1 Scheduling Extended Basic Blocks ......................... 661
12.4.2 Trace Scheduling .............................................. 663
12.4.3 Cloning for Context ........................................... 664
12.5 Advanced Topics ....................................................... 666
12.5.1 The Strategy of Software Pipelining ........................ 666
12.5.2 An Algorithm for Software Pipelining ...................... 670
12.6 Summary and Perspective ............................................ 673
Chapter Notes .......................................................... 673
Exercises ................................................................ 675
CHAPTER 13 Register Allocation............................................................ 679
13.1 Introduction ............................................................. 679
13.2 Background Issues ..................................................... 681
13.2.1 Memory versus Registers .................................... 681
13.2.2 Allocation versus Assignment ............................... 682
13.2.3 Register Classes ............................................... 683
13.3 Local Register Allocation and Assignment ......................... 684
13.3.1 Top-Down Local Register Allocation ....................... 685
Contents xvii
13.3.2 Bottom-Up Local Register Allocation ...................... 686
13.3.3 Moving Beyond Single Blocks .............................. 689
13.4 Global Register Allocation and Assignment ........................ 693
13.4.1 Discovering Global Live Ranges ............................ 696
13.4.2 Estimating Global Spill Costs ............................... 697
13.4.3 Interferences and the Interference Graph ................... 699
13.4.4 Top-Down Coloring .......................................... 702
13.4.5 Bottom-Up Coloring .......................................... 704
13.4.6 Coalescing Copies to Reduce Degree ....................... 706
13.4.7 Comparing Top-Down and Bottom-Up
Global Allocators ............................................. 708
13.4.8 Encoding Machine Constraints in the
Interference Graph ............................................ 711
13.5 Advanced Topics ....................................................... 713
13.5.1 Variations on Graph-Coloring Allocation .................. 713
13.5.2 Global Register Allocation over SSA Form ................ 717
13.6 Summary and Perspective ............................................ 718
Chapter Notes .......................................................... 719
Exercises ................................................................ 720
APPENDIX A ILOC.............................................................................. 725
A.1 Introduction ............................................................. 725
A.2 Naming Conventions ................................................... 727
A.3 Individual Operations .................................................. 728
A.3.1 Arithmetic ....................................................... 728
A.3.2 Shifts ............................................................. 729
A.3.3 Memory Operations ............................................. 729
A.3.4 Register-to-Register Copy Operations ........................ 730
A.4 Control-Flow Operations .............................................. 731
A.4.1 Alternate Comparison and Branch Syntax ................... 732
A.4.2 Jumps ............................................................. 732
A.5 Representing SSA Form ............................................... 733
APPENDIX B Data Structures................................................................ 737
B.1 Introduction ............................................................. 737
B.2 Representing Sets ....................................................... 738
B.2.1 Representing Sets as Ordered Lists ........................... 739
B.2.2 Representing Sets as Bit Vectors .............................. 741
B.2.3 Representing Sparse Sets ....................................... 741
B.3 Implementing Intermediate Representations ......................... 743
B.3.1 Graphical Intermediate Representations ...................... 743
B.3.2 Linear Intermediate Forms ..................................... 748
xviii Contents
B.4 Implementing Hash Tables ............................................ 750
B.4.1 Choosing a Hash Function ..................................... 750
B.4.2 Open Hashing ................................................... 752
B.4.3 Open Addressing ................................................ 754
B.4.4 Storing Symbol Records ....................................... 756
B.4.5 Adding Nested Lexical Scopes ................................ 757
B.5 A Flexible Symbol-Table Design ..................................... 760
BIBLIOGRAPHY ................................................................................ 765
INDEX ........................................................................................... 787
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
Other documents randomly have
different content
Reich directorate [Reichsleitung] of the Nazi party and its higher
institutes of learning. I wish to inform you especially that as many as
7000 crates have been brought to Germany up to the present
moment. In the course of these confiscations we have found
according to the nature of the case other valuable cultural objects
including very valuable works of art. And in order that these things
should not be dispersed and that they be secured for the Fuehrer,
the Chief of the high command of the armed forces (OKW) on my
request and on the instance of the Fuehrer has ordered that these
art objects should be catalogued by me. I ask you that if necessary
it should be established for the benefit of the Reich Marshal that my
working staff has executed these tasks in a correct fashion and in an
objective blameless form. Art objects generally do not come into
question as far as the Balkans are concerned although there are
Free-Masonry archives and Jewish libraries and other relevant
research objects. In my opinion only the same attitude as that
prevailing in occupied French territory can be taken and what I
requested, was really only an expansion of an already existing
regulation. For General Field Marshal List, and likewise for the
General Quartermaster of the Army the work has already begun and
my men are at work with these circles in Belgrade. By command of
General Field Marshal List as well as of his deputy general, these
men will also be employed in closest relationship with the Security
Service in Salonika. As you know, Salonika is one of the largest
Jewish centers.
I should like to remark in this connection that this affair has already
been executed on our side with the Security Service in the most loyal
fashion. One of our collaborators who also belongs to the Security
Service, had his duty-obligation countermanded by the Security
Service, whereupon it was impressed upon him that the Security
Service cooperates with my administrative staff in a most loyal
fashion. The position is thus clarified in a practical fashion and the
work has taken its course. What I asked was only a confirmation
that the already pronounced decisions for the West should also have
validity under the given circumstances for other occupied or to be
occupied areas. Finally the representative of the Fuehrer has
expressly ordered that the appropriate party members in this
question should be placed, so as not to permit this unique
opportunity for an inquiry in the Jewish and Masonic lodge question
to be lost. The agreement on this matter is thus general.
I trust that this letter has cleared up the resulting
misunderstandings.
Heil Hitler!
TRANSLATION OF
DOCUMENT 072-PS
NATIONAL SOCIALIST GERMAN WORKERS PARTY
The Deputy of the Fuehrer, Staff Commander
Fuehrer Headquarters 19 April 1941
Fuehrer Bureau (Bo/Fu)
Chancellory Rosenberg
No 4609 H, 21 April 41
Shown to the Reichsleiter on the 22. 4
[rubber stamp]
To Reichsleiter Alfred Rosenberg
Berlin W 35, Margaretenstr. 17
Copy to Utikal
Dear party member Rosenberg!
In connection with the received draft of the decree I attended, as
ordered, a speech made by SS Brig. Gen. Heydrich. The latter called
attention to the fact that the sentence, "In the confiscations
undertaken, or to be undertaken in the Reich area, of the property
of ideological opponents, the same rules apply", anticipates a
regulation which has so far not been introduced and would for the
first time set a precedent through this decree-draft. Moreover, the
regional governments [Gauleitungen] are never allowed to carry out
confiscations.
Gruppenfuehrer Heydrich further pointed out that he could under no
circumstances recognize the attempted regulation in the final
sentence of your decree-draft, since there existed some objections
to it. The scientific treatment of the ideological opposition could only
be done in conjunction with the political police work. Only the
material should be handed over to you, and the seminar
respectively. If a speedier treatment through your office is necessary,
duplicates and photocopies should be put at your disposal.
The Fuehrer emphasized that in the Balkans the use of your experts
would not be necessary, since there were no art-objects to be
confiscated. In Belgrade only the collection of Prince Paul existed,
which would be returned to him completely. The remaining material
of the lodges, etc. would be seized by the agencies of
Gruppenfuehrer Heydrich.
The libraries and art objects of the monasteries, confiscated in the
Reich, were to remain for the time being in these monasteries,
insofar as the Gauleiters had not determined otherwise. After the
war, a careful examination of the stock could be undertaken. Under
no circumstances, however, should a centralization of all the libraries
be undertaken, the Fuehrer has repeatedly rejected this suggestion.
signed: M. BORMANN
TRANSLATION OF
DOCUMENT 078-PS
COPY
OFFICE IV
Berlin 28 June 1941
SECRET STATE MATTER!
Directives for the Chiefs of Security Police and Secret Service Teams
Assigned to PW Camps
These teams are assigned after agreement has been reached
between the chiefs of the Security Police, secret service and the
Supreme Command of the Army and * * * (see annex). The
Commands work upon the special authorization and according to the
general directives in the Camp regulations which was given to them
and is independently in close harmony with the AO.
The duty of the Commands is the political screening of prisoners and
the segregation and further handling of undesirable elements among
them with regard to political, criminal or similar respects.
Resources cannot be placed at the disposal of the Commands for the
fulfillment of their missions. The "German penal code"
[Fahndungsbuch], the "Temporary permit of Leave List"
[Aufenthaltsermittlungsliste], and "Special Penal Code USSR" will
prove to be of little value; the Special Penal Code USSR therefore
does not suffice as only a small part therein is dangerous to the
designated Soviet Russians.
The Commands will therefore have to rely on their own specialty and
ingenuity upon establishment and self-producing knowledge.
Therefore they will only then be able to begin with the fulfillment of
their mission when they have gathered an appropriate amount of
material.
For their work, the Commands are to make as much use of the
experiences of the Camp Commanders as possible, who in the
meantime have profited by the observation and examination of
prisoners.
Further, the Commands will have to take pains from the beginning to
search among the prisoners for seemingly trustworthy elements,
may they be communists or not, in order to make them useful for
their intelligence purposes.
Through the establishment of such trusted personnel [V-Personen]
and through the use of all other present possibilities among the
prisoners, it must succeed to screen all elements.
In every case the Commands are to provide themselves with definite
clarity over the encountered measures through the examination and
eventual questioning of prisoners.
Above all it is important to find out:
1. all outstanding functionaries of the State and of the Party,
especially
2. professional revolutionists,
3. the functionaries of the Comintern,
4. all leading Party functionaries of the Russian Secret Police
[KPdSU] and their associated organizations in the Central, district,
and county Committees,
5. all the Peoples' Commissars and their Assistants,
6. all the former Polit-Commissars in the Red Army,
7. all leading personalities of the Central and Middle Offices among
the State authorities,
8. the leading economic personalities,
9. the Soviet Russian Intelligence agents,
10. all Jews,
11. all persons who are established as being instigators or fanatical
communists.
Just as important is the finding of persons who are devoted to the
reconstruction, the administration, and management of the
conquered Russian provinces.
Finally, such persons must be secured who can be used to transact
further discoveries, whether of the Police or similar work, and for the
clarification of universal interesting questions. In this category fall all
the higher State and Party functionaries who are in the camp on the
basis of their position and knowledge and who can give information
on the measures and working methods of the Soviet State, the
Communistic Party or the Cominterns.
In view of the pending decisions, considerations must also be given
to the peoples' membership. At the end of the screening, measures,
to be decided later, as to the transfer of prisoners from one
command to another, will follow.
The Camp Commanders are directed by the Supreme Command of
the Army to report such proposals.
Executions will not be carried out in the camps or immediate vicinity.
Should the camps in the General Government be situated in the
immediate vicinity of the border, then the prisoners for special
handling are to be taken care of in former Soviet Russian Provinces.
The Commands are to keep records of the fulfillment of special
handlings; which must include:
Serial number
Family and Surname
Date of birth and place
Military rank
Profession
Last residence
Reason for special handling
Day and place of special handling
Office IV
SECRET STATE MATTER
Supplement to the Directives for the Commands of the Security
Police and Security Service assigned to P.W. camps
1. In the directives of the 17th July 1941, I have repeatedly pointed
to the fact that it is the duty of the Special Purpose Command of the
Security Police and Security Service to find not only the
untrustworthy but also those trustworthy elements in general which
can come into consideration for the reconstruction of the Eastern
provinces.
I reemphasize that one duty is as important as the other.
In order to obtain a most extensive view of the co-activity of the
Special Purpose Command, I order that the numeral 4 (number of
those persons found to be trustworthy) will be especially heeded in
the weekly reports.
The war prisoners who are found to be trustworthy and who were
formerly in leading positions in the Soviet Russian economic circles,
are to be listed, if possible, according to branch their last
employment, and by name.
2. I reemphasize again the fact that in view of the pending
decisions, consideration must especially be given to the peoples'
citizenship.
Ukrainians, White Russians, Aserbeidschanians, Armenians, North
Caucasians, Georgians, Turks are only to be designated as definitely
untrustworthy and dealt with according to the directive when they
are definitely proven to be Bolshevists, Polit-Commissars, or other
dangerous functionaries.
One must be careful, in as much as the Turkish people frequently
have a Jewish appearance and the circumcision alone does not
denote a Jewish descent (for example, Mohammedans).
3. The conception "highbrow" [Intelligenzler] should not be
interpreted along European viewpoints.
The simplest, most primitive Soviet-Russian illiterate can, in his
political fanaticism, be more dangerous than, for instance, the
Soviet-Russian engineer, who due to his ability, went to High School,
even though, he only outwardly appeared to be in accord with the
Bolshevistic system.
In this respect the highbrow are mainly the professional
revolutionists, writers, editors, and persons in the Comintern.
4. Those Soviet Russians who are definitely found to be
untrustworthy are to be forthwith reported—as designated in the
directives of the 17th July 1941. Following the introduction of the
execution authorization, further fulfillment of the designated
measures are to begin without further delay.
A further custody in the camps in question are to be avoided for
various reasons.
Finally I reemphasize that under no circumstances are the
executions to be carried out either in the Camp or in the near
vicinity.
It is self-understood that these executions are not public. It is a
matter of principle not to admit spectators.
5. I again charge the leaders and members of the Special Service
Staff with the following: exemplary behavior during and after duty
hours, top cooperation with camp commanders and careful checking
of work.
signed: Heydrich
(S)
Verified:
signed: Wolfert, Member of the Chancellory
TRANSLATION OF
DOCUMENT 081-PS
[TOP SECRET]
28 February 1942
1/1 /41 g.Ks
To the Chief of the Supreme Command of the Armed Forces [OKW]
Berlin W 35, Tirpitzufer 72-76
Subject: Prisoners of war.
Since the beginning of its existence, the Reich Ministry for the
occupied Eastern territories has taken the viewpoint, that the large
number of Soviet prisoners of war constitute a highly valuable
material for propaganda. The treatment of Soviet prisoners of war
must be considered differently than the treatment of prisoners of
war of other nations, for various reasons:
1. The war in the East has not been concluded, and the treatment of
the prisoners of war must have far-reaching results on the will-to-
desert of the Red Army man who is still fighting.
2. Germany intends to keep a large part of the former Soviet Union
occupied, even after the end of the war, and to develop it industrially
for her purposes. Therefore she depends on a far-reaching
cooperation of the population.
3. Germany is conducting the fight against the Soviet Union because
of ideological viewpoints. Bolshevism must be overthrown and
something better must be put in its place. Even the prisoners of war
themselves must realize that national socialism is willing and in the
position to bring them a better future. They must return later to
their homes from Germany with a feeling of admiration and esteem
for Germany and German institutions; and thus become
propagandists for the cause of Germany and national socialism.
This attempted goal has not been attained so far. The fate of the
Soviet prisoners of war in Germany is on the contrary a tragedy of
the greatest extent. Of 3.6 millions of prisoners of war, only several
hundred thousand are still able to work fully. A large part of them
has starved, or died, because of the hazards of the weather.
Thousands also died from spotted fever. It is understood, of course,
that there are difficulties encountered in the feeding of such a large
number of prisoners of war. Anyhow, with a certain amount of
understanding for goals aimed at by German politics, dying and
deterioration could have been avoided in the extent described. For
instance, according to information on hand, the native population
within the Soviet Union are absolutely willing to put food at the
disposal of the prisoners of war. Several understanding camp
commanders have successfully chosen this course. However in the
majority of the cases, the camp commanders have forbidden the
civilian population to put food at the disposal of the prisoners, and
they have rather let them starve to death. Even on the march to the
camps, the civilian population was not allowed to give the prisoners
of war food. In many cases, when prisoners of war could no longer
keep up on the march because of hunger and exhaustion, they were
shot before the eyes of the horrified civilian population, and the
corpses were left. In numerous camps, no shelter for the prisoners
of war was provided at all. They lay under the open sky during rain
or snow. Even tools were not made available to dig holes or caves. A
systematic delousing of the prisoners of war in the camps and of the
camps themselves has apparently been missed. Utterances such as
these have been heard: "The more of these prisoners die, the better
it is for us". The consequence of this treatment is now this, that
spotted fever is spreading due to the escape and discharge of
prisoners and has claimed its victims among the armed forces as
well as among the civilian population, even in the old part of
Germany. Finally, the shooting of prisoners of war must be
mentioned; these were partly carried out according to viewpoints
which ignore all political understanding. For instance, in various
camps, all the "Asiatics" were shot, although the inhabitants of the
areas, considered belonging to Asia, of Transcaucasia and Turkestan
especially, are among those people in the Soviet Union who are most
strongly opposed to Russian subjugation and to Bolshevism. The
Reich ministry of the occupied Eastern territories has repeatedly
emphasized these abuses. However, in November for instance, a
detail [Kommando] appeared in a prisoner of war camp in Nikolajew,
which wanted to liquidate all Asiatics.
The treatment of prisoners of war appears to be founded for a great
part on serious misconceptions about the people of the Soviet Union.
One finds the opinion that the people become more inferior the
further one goes East. If the Poles already were given harsh
treatment, one argues, it should therefore be done to a much
greater extent to the Ukrainians, White Ruthenians, Russians, and
finally the "Asiatics".
It was apparently completely ignored, in the treatment of prisoners
of war, that Germany found, in contrast to the West (France,
Belgium, the Netherlands, Norway), a people who went through all
the terror of Bolshevism, and who now, happy about their liberation,
put themselves willingly at the disposal of Germany. A better gift
could not come to Germany in this war, which requires every last
man. But instead of accepting this gift, the people of the East are
being treated more contemptibly and worse than the people of the
West, who do not hide their enmity towards Germany.
It was a basic mistake that no difference was made between real
prisoners of war and deserters. It is known that German propaganda
deposited millions of leaflets beyond the lines, and encouraged the
Red soldiers to desert, whereby good treatment and sufficient food
was specifically assured to them. These promises were not kept. The
deserters were beaten and left to starve the same as so many
prisoners of war. A natural consequence of this politically and
militarily unwise treatment was not only a paralyzing of the will to
desert, but a plain deadly fear to get into German captivity. It would
be naive to assume that the occurences in the prisoner of war camps
could be kept hidden from the Soviet government. As can be seen in
Molotov's circular, the Soviets have in fact an excellent knowledge of
the conditions described above, and naturally they have done
everything in their power to influence the Soviet population and Red
soldiers accordingly. It can be said without exaggeration that the
mistakes in the treatment of prisoners of war are to a great extent
the cause for the stiffening power of resistance of the Red Army, and
therefore also cause for the death of thousands of German soldiers.
After the Reich ministry for occupied Eastern territories was finally
successful in overcoming the prejudice against Soviet prisoners of
war partially, and when the prisoners of war were to come to
Germany to a great extent for work, it was found that of 3.6 million
only several hundred thousand were still able to work. Thus, German
economy and armament industry also must suffer for the treatment
of prisoners of war.
The above explanations are not intended to be a belated, fruitless
criticism, nor are they directed against any official agency, especially
since very many objective situations came into play, as has been
mentioned, and the responsibility is shared. They should only
become the basis for a new policy toward the prisoners of war which
corresponds more to our military and civilian interests. The Reich
ministry for the occupied Eastern territories is endeavoring with all
its powers to assist the fighting troops by effective propaganda for
the deterioration of the enemy's military forces. All propaganda will
be useless, however, if there is more fear of captivity than of death
and wounds on the battlefield.
The primary demand is that the treatment of the prisoners of war
ensues according to the laws of humanity and according to the
dignity of the German nation. It is understandable that inhuman
treatment, proven many times, of German prisoners of war, by
members of the Red Army has embittered the German troops so
much that they retaliate with the same treatment. However, such
retaliatory measures do not improve the situation of German
prisoners of war by any means, but must have as their last
consequence the fact that neither side will take any more prisoners,
thus that they conduct the war in a most inhuman manner. At any
rate, as much as is known, such retaliatory measures have not been
able up to now to cause the enemy to change. They were therefore
without purpose.
Furthermore, sufficient food, and at least primitive shelter, are to be
provided for the prisoners within the framework of possibility. In the
camps for prisoners, scheduled for work projects, as well as in those
for the others, skillful propaganda is necessary, which must be
carried out by camp newspapers, movies, lectures, simple musical
events, games, etc.
Every camp commandant must be made responsible that every
prisoner of war, guarded by him, will return to his home later on as a
propagandist for Germany. Of course, on the other side, action must
be taken with utmost severity against possible agitators. In any
case, in the future a difference must be made between real
prisoners of war and deserters. The deserters are to be provided
with identification certificates, and in any case are to be treated
better than the prisoners of war. Especially this measure should have
far-reaching success in reference to the deterioration of the Red
Army.
I would appreciate an expression of opinion soon, and information of
appropriate action.
TRANSLATION OF
DOCUMENT 084-PS
Berlin NW 7, The 30 Sept.
Hegelplatz 2
Central Office [Zentralstelle] for Members of Eastern Nationals. In
(ZO)
Concerning: Present Status of the question of Eastern Laborers.
The commitment and treatment of foreign laborers, who have been
brought into the Reich from occupied Eastern territories, depicts a
proceeding which will not only be of significant importance to the
German war production and the securing of food, but also for the
carrying out of German administrative interests in a former Soviet
area. Two large fields of action are affected by the way in which the
problems connected with the inclusion of millions of Eastern
nationals in the Reich are solved: 1. Development of the war
situation. 2. The enforcement of the German claim to leadership in
the East after the war.
When the call for labor in Germany was increased in January, 1942
among the occupied Eastern territories, this set up a situation
among those classes of Russian and Ukrainian civilians concerned
which had by all means the appearance of a risk. Even if one group
(the volunteers) set excessive hopes on the journey into the Reich
under the impression of irresponsible promises while the other
(forced laborers) left their homes reluctantly or at least with
misgivings because of memories of former Bolshevist deportations as
well as planted anti-German rumors, the fact remains that the trip to
Germany had to be felt as journey into the unknown not only by the
two concerned but also by those relatives who remained behind
because of the isolation of the USSR from Europe for decades. The
public judgment of the Reich and its leadership would be dependent
upon the outcome of this measure taken by the German military and
civilian authorities in the occupied Eastern territories. The
employment in Germany offered an unusual opportunity to learn to
know by personal experience, which no propaganda could replace.
The greater German Reich was much slandered by the Soviet press,
and the National Socialistic position to the working class and thus to
gain a basis of comparison to the corresponding Communistic
doctrines and methods. This meant no more nor less, than that the
draft of Eastern laborers would be of importance in the development
of political opinions among the Eastern nationals towards the power
which was presently occupying the region which would aid measures
taken to accomplish the recruitment, the housing etc., in the Reich,
which should have been taken into consideration from the start,
since in view of the necessity to keep the aid of the native
inhabitants in the huge areas behind the front, factors which cannot
be controlled by regulations or orders, namely the frame of mind,
which is of war potential value, must be considered.
Instead of taking consideration of this, the drafting and the
employment as well as the housing, treatment etc. of the so-called
Eastern laborers has so far been taken care of exclusively according
to labor, technical and the security police points of view, with the
result that the headquarters responsible for this were able to report
the due numerical fulfilment of the program as well as the security
of the German nationality and of the businesses. At the time,
however, facts had to be hushed which could have been avoided not
only in the interests of German prestige and to the satisfaction of
the occupied Eastern territories but which even today cost the lives
of thousands of German soldiers by their efforts. The facts which up
to the fall of 1942, have undergone only part or incomplete changes,
among others, the following.
1. The concept of the workers from the occupied territories of the
USSR was narrowed down to the labor- and social-legal term
"Eastern Laborers". A labor condition among "Foreigners" was
hereby created in a segregated "Employment under Special
Conditions" which had to be looked upon by those affected, as
degrading.
2. The drafting of Eastern workers and women workers often
occurred without the necessary examination of the capabilities of
those concerned, so that 5-10 out of a hundred, sick and children,
were transported along. On the other hand, in those places where
no volunteers were obtained, instead of using the lawful
employment obligations, coercive measures were used by the police
(imprisonment, penal expedition, and similar measures.)
3. The employment in businesses was not undertaken by considering
the occupation and previous training but according to the chance
assignment of the individual to the respective transports or transient
camps.
4. The billeting did not follow the policies according to which the
other foreigners are governed, but just as for civilian prisoners in
camps which were fenced in with barbed wire and were heavily
guarded, from which no exit was permitted.
5. The treatment by the guards was on the average without
intelligence and cruel so that the Russian and Ukrainian workers, in
enterprises with foreign laborers of different nationalities, were
exposed to the scorn of the Poles and the Czechs among other
things.
6. The food and care was so bad and insufficient in the camps for
the Eastern Laborers being employed in the industry and in the
mines that the good average capability of the camp members
dropped down shortly and many sicknesses and deaths took place.
7. Payment was carried out in the form of a ruling in which the
industrial worker would keep on the average 2 or 3 RM each week
and the farm laborers even less, so that the transfer of pay to their
homes became illusory, not to mention the fact there had been no
satisfactory procedure developed for this.
8. The postal service with their families was not feasible for months
because of the lack of a precautionary ruling; so that instead of
factual reports, wild rumors arrived in their countries,—among other
means by means of emigration.
9. The promises which had been made time and time again in the
areas of enlistment stood in contradiction with those facts mentioned
under 3-8.
Apart from the natural impairment of the frame of mind and
capabilities which these measures, as well as conditions, brought
with them, the result was that the Soviet propaganda took over the
matter and evaluated it carefully. Not only the actual conditions and
the letters which reached the country, in spite of the initial blockade,
as well as the stories of fugitives and such, but also the clumsy
publications in the German press of the legal rulings relative to the
matter gave them enough to manipulate with. Commissar for
Foreign Affairs Molotov in his note to the enemy powers referred
already in April 1942 to this, especially in para. III of this document
in which among others it is stated:
"The German administration is treading under its feet the long
recognized laws and customs governing war, in that it has given the
orders to the troops to take into captivity all male civilians and in
many places even the women, and to use against them those
measures which the Hitlerites have introduced towards prisoners of
war. This does not only mean slave labor for the captured peaceful
inhabitants but in most cases it also means inescapable starvation or
death through sickness, corporal punishments, and organized mass
murders.
"The deportation of peaceful inhabitants to the rear, which has been
widely practiced by the German-Fascist army, begins to take on a
mass character. It is carried out under direct rulings of the German
High Command (OKW) and its effects are especially cruel in the
immediate rear areas during a retreat of the German army. In a
series of documents, which have been found with the staffs of
destroyed German units, there is a directive to the order of the High-
Command under Nlr. 2974/41 of 6 Dec. 1942 which directs that all
grown men are to be deported from occupied populated points into
prisoner of war camps. From the order to the 37th Infantry
Regiment of the 6th Division of 2 Dec. 1941 under the heading
"About the deportation of the Civilian Population" it can be deduced
that for the period from the 4 to the 12 Dec the capture and forceful
deportation of the total population of 7 villages to the German rear
areas was planned, for which a carefully worked out plan was
proposed.
Sometimes all the inhabitants were deported, sometimes the men
were torn away from their families or mothers were separated from
their children. Only the smallest number of these deported people
have been able to return to their home village. These returnees
report terrible degradations, heaviest forced labor, abundant deaths
among inhabitants because of starvation and tortures, and murder
by the Fascists of all the weak, wounded, and sick."
Further, there are even today announcements in the Soviet
newspapers as well as radio about the treatment of Eastern laborers
which might have as an effect a strengthening of the moral power to
resist in the Red Army. Further, there is mentioned the text of a
letter which arrived in Ordshonikidsegrad from a Russian girl and
which was published in a "Proclamation" of the police administration
of the North-Western Front of the Red army under the heading of "A
Russian Girl in Cologne", attaching in connection with it an effective
propaganda viewpoint about the "Fascist Forced Laborers" in
Germany.
"Do you know"—, it goes on at the end of the proclamation,—"that
every one of us who goes to Germany will meet the same fate as
Olga Selesnewa! Do not forget that the German monster will make
each and every one of you, who has remained behind, a slave on
your own soil or drag you to eternal forced labor in Germany! Dear
brothers and sisters ... Go to the partisan detachments! Injure the
German occupants at every step. Hit the Hitler thieves everywhere
and continuously. The Russian soil shall become their graves!"
The effects of this large scale documentary proven radio-press-and
leaflet propaganda, operating even into German administered
territories, must be considered as one of the main reasons for this
year's stiffening of the Soviet resistance as well as the threatening
increase of guerilla bands up to the borders of the General
Government.
In the meantime, after a betterment of the condition of the Eastern
laborers had been insisted upon, not only by the main office for
politics in the Reichs ministry for the Occupied Eastern Territories,
which has been able to find support in the repeated requests by the
High Command of the Armed Forces, but also by the gentleman
charged with the responsibility for all labor employment as well as
the Department of Labor Employment in the German Labor
Movement, which has the supervision of the Eastern Laborers—
those previously existing legal and police rulings have been
mitigated and the conditions in the 8-10,000 camps in the Reich
have, on the whole, been improved. Thus those fixed wages, which
have been determined by the tables of compensation in a ruling of
the Council of Ministers, upon which deductions were made up to
75%, have been replaced by new tariffs. The Eastern Laborers were
left free of duty according to it, and the taxes were paid in a form of
an Eastern Laborer Tax by the owner of the enterprise (Ruling of
Council of Ministers for the Defense of the Reich of 30/6/42). Thus
after many months of negotiations, with the cooperation of the
Central Economic Bank in Rowno, a salary transfer, in the form of a
savings stamp procedure, was regulated. Thus, the ruling of the
Reichs Chief of the SS of 20/2/42 prescribing barbed wire has been
dropped by a supplementary ruling of 9/4/42 and at the same time,
in exceptional cases, groups were permitted to go out under German
guards, of late, it has even been permitted under their own
supervision. The food supply was adjusted by a special delivery
letter of the Reichs Food minister dated 17/4/42, to a degree where
the "Soviet Civilian Laborer", as well as the prisoners of war received
a uniform ration. This was still not enough compared to the normal
amount of food given to those employed in the industry and in the
mines, besides it was still much less and worse than that for the
Poles, but it was an improvement compared to former conditions.
Furthermore the postal communication has been adjusted for those
Eastern Laborers who come from the civilian administered as well as
those who are from the regions directly to the rear of the army,—at
least theoretically—. On account of the burden placed on the
censorship office for foreign countries the High Command of the
Armed Forces has recently asked again for a reduction of this
measure.
In spite of the improvements mentioned as well as others, which in
many cases can be traced back to the personal intervention of the
Deputy General of Labor Employment, the total situation of the
Eastern Laborer (sampling date: 1 October 1942) must still be
considered unsatisfactory, namely, not only in respect to the
differences in the treatment of industrial workers and farm laborers
but in the differences found in the different States and enterprises.
On the average there are still about 40% of the lodgings for Eastern
laborers which would not meet the requirements even if all the
wartime restrictions were considered. Among these are a frightening
number of camps whose conditions are such as to destroy the
success of the attempt of improving relationship and the
corresponding radiating uplift of the morale within the Eastern
territories. Not even to mention the fact that the marking OST
(East), an identification ordered by the police, is being felt as
degrading there remains such a quantity of grievances and problems
that it would be impossible to relate them now. Only the following
points are to be mentioned:
1. The Enlisting and Employing of persons of German Parentage, as
Eastern laborers. Several observations made by the commission from
the central office to inspect camps, as well as petitions which have
reached them, show that persons of German parentage were
enlisted,—against regulations,—as Eastern Laborers. Even if they are
not recognized people of German parentage according to the
"RKFestigung", they are, however persons of German descent and
with German names, as Mr. Middelhauve could establish in a camp
near Berlin. It is to be doubted that the branch offices of the sub-
office for Germans living in foreign countries had enough qualified
help who could separate these persons capable of becoming
Germans again.
2. Enlisting and Employing as Eastern Laborers of Tartars from the
Crimea. To increase the fighting numbers of the Tartar legions it
would be indispensable to return all those Tartars, who have been
employed in the Reich as Eastern Laborers, to their homes before
the coming of winter; a similar report to the "GBA" is being
prepared. Besides climatic reasons, the necessity for this return is to
intensify the wine and tobacco growths in the Crimea by experienced
help and at the same time, to prevent the invasion of Greek and
Bulgarian planters and traders. To prepare this return as well as to
deal with other Tartan problems a commissioner, namely a Crimean
Tartar, has been installed by the "ZO". In the meantime, difficulties
have arisen because of the effect of the furloughing of Tartan
Eastern Laborers for participation in the Mohammedan festival
during the 4th and 5/10/42 as well as the procurement of the meat
and millet supply needed for this occasion. The authority in these
and similar matters will have to be voiced, at the time of their
return, by those White Ruthanian Tartars who have been selected for
resettlement.
3. Enlisting and Employing as Eastern Laborers of Ukrainians from
Transnistrian. During an inspection of the camps for munition
workers at Topchin (Kreteltow) into which the Central Office was
induced because of an escape which became known to them, it was
found that the Eastern Laborers employed there were enlisted
January 1942 in Odessa. They do not come according to para. I of
the Rulings of the Council of Ministers dated 30/6/42, under the
category of Eastern Laborers. But will have to be termed, because of
the fact that the State of "Transnistrian" was placed in the Fall of
1941 under Rumanian sovereignty, as stateless members of the
Kingdom of Rumania. To clarify this point for all times, negotiations
have been made with the GBA and the Foreign Office as well as the
Feldzeuginspektion of the Office for General Affairs in the High-
Command of the Army.
4. Employment of Skilled Laborers in Occupations foreign to their
skills. Up until recently petitions have continually come to the
publishers of camp newspapers to the Reichs Ministry for the
occupied Eastern territories, to the German Workers Front and in
error also to the bureau for foreign nationals in the Reich from
Eastern laborers, men and women who are in occupations foreign to
their skills or inferior to their skills, without the transfer proposals,
which were approved by the central office as well as by other
offices, having led to success—except in rare cases. Gauleiter
Sauckel, who has repeatedly disclosed—the last time at the
conference in Weimar on the 10 and 11/9/42—that the "inner
arrangement" of the occupational employment would be his next
point on the program, does not seem to be informed about the real
conditions in which doctors, engineers, teachers, qualified skilled
laborers and such are employed as unskilled workers, mechanics as
farmers, and farmers as industrial workers. In any case, one of his
close associates, the Gauamtsleiter Orr Escher received the
information about this which was given him by Dr. Thiell, in
accordance with instructions of the Central Office, with unusual
interest.
5. Separation in employment of members of one Family. The
repeated separation of family members who have come to the Reich
as Eastern Laborers and Eastern Women Workers (married couples,
parents, brothers and sisters, and children) seems utterly contrary to
the usual customs governing other employments of foreigners. The
bringing together of those relatives who have been mistakenly
separated during the transport is principally desired just as much as
is the employment of family members in the same location. It does
however, in practice, encounter some difficulties. In order to make
possible at least the transfer of information from both parties, the
Reichs Ministry for the occupied Eastern territories in August 1942,
in conjunction with the Reich Main office and Reich Security Service
has allowed the limited publication of encoded advertisements
seeking information. Besides this an agreement has been made in
September 1942 between the Central Office and the German Red
Cross in accordance with which this organization will take over the
communication between these Eastern Laborers separated in the
Reich, keeping the place of employment secret however.
6. Disregarding the Nationality in Employment and Billeting. The plan
of the Herr Reichsmarshall to create special "Enterprises for the
Russians" could not be accomplished as yet on account of reasons of
wartime economy. The demands for a joint employment by the
members of Eastern nationalities, according to their racial
background could not be carried out in practice to any great degree.
In addition to the reasons of business, the usual variegated
composition of the transports coming from the great realms of the
Reichs Commissariate Ukraine opposed it. Basically, a regrouping to
racial membership might be possible after completion of an
examination of this membership which would have to be made in
conjunction with the issuance of employment permits for Eastern
Laborers, especially when a group of foremen has been found
among the Eastern Laborers based on partial pre-training
independently of the solution to this question, the commissions from
the Central Office will be striving to effect a rough sifting of the
camps according to racial membership, and to house them
accordingly in special barracks. The supplying of experienced
interpreters for this job and then systematic instruction has been
begun.
7. Distinctive, Mostly Insufficient Food Rations. The inadequate food
ration for Eastern Laborers is important not only in the matter of
performance but also politically, since the majority of the help
coming from the occupied Eastern territories were previously
accustomed to better rations. After using up all the food supplies
which had been brought along, a general lowering of the ability to
work and of the morale was noticeable. The written request to the
Herr Reichs Food-Minister on the matter, to examine the food quotas
in respect to the fact that the Eastern Laborer was in a worse
position in the matter of nourishment than the Poles, was answered
by a telephone communication from the respective Chief of Section,
that to his knowledge the Russians were better off than the Poles.
With this ignorance of the condition decisive measures could hardly
be expected on the part of the Reichs Food Ministry. Nevertheless
Gauleiter Sauckel has declared, in Weimar as a part of his program,
that the feeding of the German as well as the foreign laborer inside
of Germany would be shortly adapted to the requirements in
accordance with their performance—here he supported his program
on an utterance of the Fuehrer—. In connection with this a
conference took place in the Reichs Food Ministry on 29/9/42 in
which an improved food quota of the Eastern Laborer was decided
upon. The decree which is being co-signed by the High Command of
the Armed Forces and the GBA, [?] upon which the "Special Delivery
Letter" of the 17/4/42 will be nullified, provides for laborers of all
types an additional 1750 grams of potatoes, for workers in heavy
industry and additional 200 grams, and for the group, to be newly
instituted, of "overtime" and "night" workers a weekly 2600 grams of
bread, 300 of meat, and 150 of fat. Besides this, instead of the
tasteless bread made of turnips the usual kind will be delivered in
the future. Even though a complete equality of food rationing with
the other foreigners should be aspired to, this new measure, whose
enforcement is imminent, will counteract the intestinal diseases and
swelling of the stomach, as well as the sending of bread from
relatives in the Ukraine, which can not be hindered on political
grounds.
8. Partly insufficient, and Unjust Payment of Wages. The wage
adjustments for Eastern laborers and Eastern women workers must
still be considered unsatisfactory even after the new wage scales, by
the ruling of the Council of Ministers dated 30/6/42, as well as the
lower evaluation of those agricultural workers who are quartered and
fed free. The determining factor in keeping the net salary down is
the necessity even today of maintaining the natural lower social level
as compared to the German laborer, and to protect the German
produce market as well as—in the case of transfer accounts—the
enterprises in the domain of the Reichs Commissariat from an
accumulation of surplus purchasing power. The Central Office took
the viewpoint, in the conferences concerned with this matter, that it
is far better to keep the wage level, as such, down than later to
lower a nominally higher net salary to about half by means of the
forced savings plan, reportedly proposed by the Reichs Finance
Minister. The change of the hourly pay scale, as well as pay on
contracts and pay by means of premiums is therefore closely
connected with the success of the voluntary stamp savings plan,
which was installed in September 1942. This on the other hand will
depend upon the fact that the saved amount, which has been sent
to the respective home banks of the relatives in the form of savings
books—a system which has finally been introduced by the Herr
Reichs Commissar for the Ukraine—will at least be redeemable in
cash to half of the amount shown, even if no interest is paid on it at
the time. A change in the question of wages, considering that this is
the first time in bank technological procedure that savings and
transfer accounts have been joined together, would have prospects
only if an eventual rearrangement does not materially raise the total
wage increase of Eastern Laborers. A throttling measure would
otherwise be necessary eventually which would shatter the trust in
the honesty of the German social methods and would give
irresponsible material to the Soviet propaganda. A way to
correctness in the matter of pay within the limitations determined by
this viewpoint, could be seen in the proposal of the Reichs Trustee
Dr. Kimmich, who expounded it in a short report in Weimar on
11/9/42. In accordance with this a plan for arranging salaries should
be carried out by the industries by inserting increasing measures for
part time, apprenticeship, and instructional work, to bring into
prominence the principle of pay according to performance even in
the occupied territories. The foundation for the pay scale based on
this will be the evaluation according to eight categories of difficulty
in the performance of work, the use of which would exclude the
evaluation of previous preparatory training (in the judging of
differences) in favor of the success in performance. The complete
stoppage of wages would thereby be abolished with finality and the
offering of work premiums be made possible to foreign laborers.
This,—as Dr. Kimmich characterizes it,—"Re-establishment of a just
salary and contract" will have as an effect a general increase in
performance which will be advertised as "The thanks of the German
laborer to the combat soldier." Should these principles shortly be
made obligatory in all the states, this would also bring, in connection
with the measures of the project of occupational instruction, an
improvement to the former Soviet specialist without having impaired
the pre-eminence of the German specialist. The safeguarding of the
superiority of the latter is in spite of the wartime needs among other
things thereby guaranteed by the fact that the Herr Reichs Minister
for armament and ammunition has been able to carry out through
the High Command of the Armed Forces on September 1942, that
these 500,000 German war industrial workers, who are going to be
inducted during the winter half year, will only receive an eight week
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com

More Related Content

PDF
Engineering a Compiler 2nd Edition Keith Cooper
PDF
(Ebook) Engineering a Compiler by Keith Cooper, Linda Torczon ISBN 155860698X
PDF
Understanding And Writing Compilers A Doityourself Guide Richard Bornat
PDF
The compiler design handbook optimizations and machine code generation 1st Ed...
PDF
The compiler design handbook optimizations and machine code generation 1st Ed...
DOCX
SOFTWARE ENGINEERINGNinth EditionIan SommervilleAddi.docx
PDF
Modern Compiler Design 2e.pdf
PDF
Software Engineering Update 8th Edition Ian Sommerville
Engineering a Compiler 2nd Edition Keith Cooper
(Ebook) Engineering a Compiler by Keith Cooper, Linda Torczon ISBN 155860698X
Understanding And Writing Compilers A Doityourself Guide Richard Bornat
The compiler design handbook optimizations and machine code generation 1st Ed...
The compiler design handbook optimizations and machine code generation 1st Ed...
SOFTWARE ENGINEERINGNinth EditionIan SommervilleAddi.docx
Modern Compiler Design 2e.pdf
Software Engineering Update 8th Edition Ian Sommerville

Similar to Engineering a Compiler 2nd Edition Keith Cooper (20)

PDF
Software Engineering Update 8th Edition Ian Sommerville
PDF
Software Engineering 8ed. Edition Sommerville I.
PDF
Software Engineering 8ed. Edition Sommerville I.
PDF
Engineering Problem Solving with C Delores M. Etter
PDF
Software Engineering 8ed. Edition Sommerville I.
PDF
C programming from problem analysis to program design 4th ed Edition D S Malik
PDF
Modern Compiler Implementation in Java 2Ed 2nd Edition Andrew W. Appel
DOCX
Introduction1ObjectivesThe objectives of this chapte.docx
PDF
Engineering Problem Solving with C Delores M. Etter
PDF
C programming from problem analysis to program design 4th ed Edition D S Malik
PDF
Building Python Programs 1st Edition Stuart Reges Marty Stepp
PDF
New Software Engineering Paradigm Based On Complexity Science An Introduction...
PDF
Software Engineering 8ed. Edition Sommerville I.
PDF
Lecture # 1
PDF
C programming from problem analysis to program design 4th ed Edition D S Malik
PDF
Creating a compiler for your own language
PDF
Software Engineering A Methodical Approach 1st Ed Elvis Foster
PDF
Essentials of Compilation An Incremental Approach in Python 1st Edition Jerem...
PPT
Software engineering
PDF
Book-1(First 2 Units Coverage).pdf
Software Engineering Update 8th Edition Ian Sommerville
Software Engineering 8ed. Edition Sommerville I.
Software Engineering 8ed. Edition Sommerville I.
Engineering Problem Solving with C Delores M. Etter
Software Engineering 8ed. Edition Sommerville I.
C programming from problem analysis to program design 4th ed Edition D S Malik
Modern Compiler Implementation in Java 2Ed 2nd Edition Andrew W. Appel
Introduction1ObjectivesThe objectives of this chapte.docx
Engineering Problem Solving with C Delores M. Etter
C programming from problem analysis to program design 4th ed Edition D S Malik
Building Python Programs 1st Edition Stuart Reges Marty Stepp
New Software Engineering Paradigm Based On Complexity Science An Introduction...
Software Engineering 8ed. Edition Sommerville I.
Lecture # 1
C programming from problem analysis to program design 4th ed Edition D S Malik
Creating a compiler for your own language
Software Engineering A Methodical Approach 1st Ed Elvis Foster
Essentials of Compilation An Incremental Approach in Python 1st Edition Jerem...
Software engineering
Book-1(First 2 Units Coverage).pdf
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
Computing-Curriculum for Schools in Ghana
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Institutional Correction lecture only . . .
PPTX
Pharma ospi slides which help in ospi learning
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Pre independence Education in Inndia.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Complications of Minimal Access Surgery at WLH
Computing-Curriculum for Schools in Ghana
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
Institutional Correction lecture only . . .
Pharma ospi slides which help in ospi learning
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
TR - Agricultural Crops Production NC III.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Types and Its function , kingdom of life
Pre independence Education in Inndia.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
102 student loan defaulters named and shamed – Is someone you know on the list?
Renaissance Architecture: A Journey from Faith to Humanism
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Ad

Engineering a Compiler 2nd Edition Keith Cooper

  • 1. Engineering a Compiler 2nd Edition Keith Cooper - PDF Download (2025) https://ebookultra.com/download/engineering-a-compiler-2nd- edition-keith-cooper/ Visit ebookultra.com today to download the complete set of ebooks or textbooks
  • 2. Here are some recommended products for you. Click the link to download, or explore more at ebookultra.com Piling Engineering 3rd Edition Keith Elson https://ebookultra.com/download/piling-engineering-3rd-edition-keith- elson/ Optomechanical Systems Engineering 1st Edition Keith J. Kasunic https://ebookultra.com/download/optomechanical-systems- engineering-1st-edition-keith-j-kasunic/ Biosensors a practical approach 2nd Edition Jonathan M. Cooper https://ebookultra.com/download/biosensors-a-practical-approach-2nd- edition-jonathan-m-cooper/ Cochlear Implants A Practical Guide 2nd Edition Huw Cooper https://ebookultra.com/download/cochlear-implants-a-practical- guide-2nd-edition-huw-cooper/
  • 3. Metabolic Regulation A Human Perspective 2nd Edition Keith N. Frayn https://ebookultra.com/download/metabolic-regulation-a-human- perspective-2nd-edition-keith-n-frayn/ How to Be a Brilliant Leader Brilliant Business 2nd Edition Simon Cooper https://ebookultra.com/download/how-to-be-a-brilliant-leader- brilliant-business-2nd-edition-simon-cooper/ Seed of Light 2nd Edition Edmund Cooper https://ebookultra.com/download/seed-of-light-2nd-edition-edmund- cooper/ Anesthesia emergencies 2nd Edition Keith J. Ruskin https://ebookultra.com/download/anesthesia-emergencies-2nd-edition- keith-j-ruskin/ Essential Guide to Acute Care 2nd Edition Nicola Cooper https://ebookultra.com/download/essential-guide-to-acute-care-2nd- edition-nicola-cooper/
  • 5. Engineering a Compiler 2nd Edition Keith Cooper Digital Instant Download Author(s): Keith Cooper, Linda Torczon ISBN(s): 9780080916613, 012088478X Edition: 2 File Details: PDF, 7.56 MB Year: 2012 Language: english
  • 7. In Praise of Engineering a Compiler Second Edition Compilers are a rich area of study, drawing together the whole world of computer science in one, elegant construction. Cooper and Torczon have succeeded in creating a welcoming guide to these software systems, enhancing this new edition with clear lessons and the details you simply must get right, all the while keeping the big picture firmly in view. Engineering a Compiler is an invaluable companion for anyone new to the subject. Michael D. Smith Dean of the Faculty of Arts and Sciences John H. Finley, Jr. Professor of Engineering and Applied Sciences, Harvard University The Second Edition of Engineering a Compiler is an excellent introduction to the construction of modern optimizing compilers. The authors draw from a wealth of experience in compiler construction in order to help students grasp the big picture while at the same time guiding them through many important but subtle details that must be addressed to construct an effec- tive optimizing compiler. In particular, this book contains the best introduction to Static Single Assignment Form that I’ve seen. Jeffery von Ronne Assistant Professor Department of Computer Science The University of Texas at San Antonio Engineering a Compiler increases its value as a textbook with a more regular and consistent structure, and with a host of instructional aids: review questions, extra examples, sidebars, and marginal notes. It also includes a wealth of technical updates, including more on nontraditional languages, real-world compilers, and nontraditional uses of compiler technology. The optimi- zation material—already a signature strength—has become even more accessible and clear. Michael L. Scott Professor Computer Science Department University of Rochester Author of Programming Language Pragmatics Keith Cooper and Linda Torczon present an effective treatment of the history as well as a practitioner’s perspective of how compilers are developed. Theory as well as practical real world examples of existing compilers (i.e. LISP, FORTRAN, etc.) comprise a multitude of effec- tive discussions and illustrations. Full circle discussion of introductory along with advanced “allocation” and “optimization” concepts encompass an effective “life-cycle” of compiler engineering. This text should be on every bookshelf of computer science students as well as professionals involved with compiler engineering and development. David Orleans Nova Southeastern University
  • 10. About the Authors 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).
  • 11. Engineering a Compiler Second Edition Keith D. Cooper Linda Torczon Rice University Houston, Texas AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Morgan Kaufmann Publishers is an imprint of Elsevier
  • 12. Acquiring Editor: Todd Green Development Editor: Nate McFadden Project Manager: Andre Cuello Designer: Alisa Andreola Cover Image: “The Landing of the Ark,” a vaulted ceiling-design whose iconography was narrated, designed, and drawn by John Outram of John Outram Associates, Architects and City Planners, London, England. To read more visit www.johnoutram.com/rice.html. Morgan Kaufmann is an imprint of Elsevier. 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA Copyright © 2012 Elsevier, Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods or professional practices may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information or methods described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. Library of Congress Cataloging-in-Publication Data Application submitted British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. ISBN: 978-0-12-088478-0 For information on all Morgan Kaufmann publications visit our website at www.mkp.com Printed in the United States of America 11 12 13 14 10 9 8 7 6 5 4 3 2 1
  • 13. We dedicate this volume to n our parents, who instilled in us the thirst for knowledge and supported us as we developed the skills to follow our quest for knowledge; n our children, who have shown us again how wonderful the process of learning and growing can be; and n our spouses, without whom this book would never have been written.
  • 14. About the Cover The cover of this book features a portion of the drawing, “The Landing of the Ark,” which decorates the ceiling of Duncan Hall at Rice University. Both Duncan Hall and its ceiling were designed by British architect John Outram. Duncan Hall is an outward expression of architec- tural, decorative, and philosophical themes developed over Outram’s career as an architect. The decorated ceiling of the ceremonial hall plays a central role in the building’s decorative scheme. Outram inscribed the ceiling with a set of significant ideas—a creation myth. By expressing those ideas in an allegorical drawing of vast size and intense color, Outram created a signpost that tells visitors who wander into the hall that, indeed, this building is not like other buildings. By using the same signpost on the cover of Engineering a Compiler, the authors intend to signal that this work contains significant ideas that are at the core of their discipline. Like Outram’s building, this volume is the culmination of intellectual themes developed over the authors’ professional careers. Like Outram’s decorative scheme, this book is a device for communicating ideas. Like Outram’s ceiling, it presents significant ideas in new ways. By connecting the design and construction of compilers with the design and construction of buildings, we intend to convey the many similarities in these two distinct activities. Our many long discussions with Outram introduced us to the Vitruvian ideals for architecture: commodity, firmness, and delight. These ideals apply to many kinds of construction. Their analogs for com- piler construction are consistent themes of this text: function, structure, and elegance. Function matters; a compiler that generates incorrect code is useless. Structure matters; engineering detail determines a compiler’s efficiency and robustness. Elegance matters; a well-designed compiler, in which the algorithms and data structures flow smoothly from one pass to another, can be a thing of beauty. We are delighted to have John Outram’s work grace the cover of this book. Duncan Hall’s ceiling is an interesting technological artifact. Outram drew the original design on one sheet of paper. It was photographed and scanned at 1200 dpi yielding roughly 750 mb of data. The image was enlarged to form 234 distinct 2 × 8 foot panels, creating a 52 × 72 foot image. The panels were printed onto oversize sheets of perforated vinyl using a 12 dpi acrylic- ink printer. These sheets were precision mounted onto 2 × 8 foot acoustic tiles and hung on the vault’s aluminum frame. viii
  • 15. Contents About the Authors ........................................................................ iv About the Cover .......................................................................... viii Preface ..................................................................................... xix CHAPTER 1 Overview of Compilation ................................................... 1 1.1 Introduction .......................................................... 1 1.2 Compiler Structure ................................................... 6 1.3 Overview of Translation ............................................. 9 1.3.1 The Front End ................................................. 10 1.3.2 The Optimizer ................................................. 14 1.3.3 The Back End ................................................. 15 1.4 Summary and Perspective ........................................... 21 Chapter Notes ........................................................ 22 Exercises ............................................................. 23 CHAPTER 2 Scanners...................................................................... 25 2.1 Introduction .......................................................... 25 2.2 Recognizing Words .................................................. 27 2.2.1 A Formalism for Recognizers ................................ 29 2.2.2 Recognizing More Complex Words .......................... 31 2.3 Regular Expressions ................................................. 34 2.3.1 Formalizing the Notation ..................................... 35 2.3.2 Examples ...................................................... 36 2.3.3 Closure Properties of REs .................................... 39 2.4 From Regular Expression to Scanner ............................... 42 2.4.1 Nondeterministic Finite Automata ........................... 43 2.4.2 Regular Expression to NFA: Thompson’s Construction ................................................... 45 2.4.3 NFA to DFA: The Subset Construction ...................... 47 2.4.4 DFA to Minimal DFA: Hopcroft’s Algorithm ............... 53 2.4.5 Using a DFA as a Recognizer ............................... 57 2.5 Implementing Scanners .............................................. 59 2.5.1 Table-Driven Scanners ........................................ 60 2.5.2 Direct-Coded Scanners ....................................... 65 2.5.3 Hand-Coded Scanners ........................................ 69 2.5.4 Handling Keywords ........................................... 72 ix
  • 16. x Contents 2.6 Advanced Topics ..................................................... 74 2.6.1 DFA to Regular Expression .................................. 74 2.6.2 Another Approach to DFA Minimization: Brzozowski’s Algorithm ...................................... 75 2.6.3 Closure-Free Regular Expressions ........................... 77 2.7 Chapter Summary and Perspective .................................. 78 Chapter Notes ........................................................ 78 Exercises ............................................................. 80 CHAPTER 3 Parsers........................................................................ 83 3.1 Introduction .......................................................... 83 3.2 Expressing Syntax ................................................... 85 3.2.1 Why Not Regular Expressions? .............................. 85 3.2.2 Context-Free Grammars ...................................... 86 3.2.3 More Complex Examples ..................................... 89 3.2.4 Encoding Meaning into Structure ............................ 92 3.2.5 Discovering a Derivation for an Input String ................ 95 3.3 Top-Down Parsing ................................................... 96 3.3.1 Transforming a Grammar for Top-Down Parsing ........... 98 3.3.2 Top-Down Recursive-Descent Parsers ....................... 108 3.3.3 Table-Driven LL(1) Parsers .................................. 110 3.4 Bottom-Up Parsing .................................................. 116 3.4.1 The LR(1) Parsing Algorithm ................................ 118 3.4.2 Building LR(1) Tables ........................................ 124 3.4.3 Errors in the Table Construction ............................. 136 3.5 Practical Issues ....................................................... 141 3.5.1 Error Recovery ................................................ 141 3.5.2 Unary Operators .............................................. 142 3.5.3 Handling Context-Sensitive Ambiguity ..................... 143 3.5.4 Left versus Right Recursion .................................. 144 3.6 Advanced Topics ..................................................... 147 3.6.1 Optimizing a Grammar ....................................... 148 3.6.2 Reducing the Size of LR(1) Tables .......................... 150 3.7 Summary and Perspective ........................................... 155 Chapter Notes ........................................................ 156 Exercises ............................................................. 157
  • 17. Contents xi CHAPTER 4 Context-Sensitive Analysis.................................................. 161 4.1 Introduction .......................................................... 161 4.2 An Introduction to Type Systems ................................... 164 4.2.1 The Purpose of Type Systems ................................ 165 4.2.2 Components of a Type System ............................... 170 4.3 The Attribute-Grammar Framework ................................ 182 4.3.1 Evaluation Methods ........................................... 186 4.3.2 Circularity ..................................................... 187 4.3.3 Extended Examples ........................................... 187 4.3.4 Problems with the Attribute-Grammar Approach ........... 194 4.4 Ad Hoc Syntax-Directed Translation ............................... 198 4.4.1 Implementing Ad Hoc Syntax-Directed Translation ........ 199 4.4.2 Examples ...................................................... 202 4.5 Advanced Topics ..................................................... 211 4.5.1 Harder Problems in Type Inference .......................... 211 4.5.2 Changing Associativity ....................................... 213 4.6 Summary and Perspective ........................................... 215 Chapter Notes ........................................................ 216 Exercises ............................................................. 217 CHAPTER 5 Intermediate Representations ............................................. 221 5.1 Introduction .......................................................... 221 5.1.1 A Taxonomy of Intermediate Representations .............. 223 5.2 Graphical IRs ......................................................... 226 5.2.1 Syntax-Related Trees ......................................... 226 5.2.2 Graphs ......................................................... 230 5.3 Linear IRs ............................................................ 235 5.3.1 Stack-Machine Code .......................................... 237 5.3.2 Three-Address Code .......................................... 237 5.3.3 Representing Linear Codes ................................... 238 5.3.4 Building a Control-Flow Graph from a Linear Code ........ 241 5.4 Mapping Values to Names ........................................... 243 5.4.1 Naming Temporary Values ................................... 244 5.4.2 Static Single-Assignment Form .............................. 246 5.4.3 Memory Models .............................................. 250
  • 18. xii Contents 5.5 Symbol Tables ........................................................ 253 5.5.1 Hash Tables ................................................... 254 5.5.2 Building a Symbol Table ..................................... 255 5.5.3 Handling Nested Scopes ...................................... 256 5.5.4 The Many Uses for Symbol Tables .......................... 261 5.5.5 Other Uses for Symbol Table Technology ................... 263 5.6 Summary and Perspective ........................................... 264 Chapter Notes ........................................................ 264 Exercises ............................................................. 265 CHAPTER 6 The Procedure Abstraction ................................................. 269 6.1 Introduction .......................................................... 269 6.2 Procedure Calls ...................................................... 272 6.3 Name Spaces ......................................................... 276 6.3.1 Name Spaces of Algol-like Languages ...................... 276 6.3.2 Runtime Structures to Support Algol-like Languages ..................................................... 280 6.3.3 Name Spaces of Object-Oriented Languages ................ 285 6.3.4 Runtime Structures to Support Object-Oriented Languages ..................................................... 290 6.4 Communicating Values Between Procedures ....................... 297 6.4.1 Passing Parameters ............................................ 297 6.4.2 Returning Values .............................................. 301 6.4.3 Establishing Addressability .................................. 301 6.5 Standardized Linkages ............................................... 308 6.6 Advanced Topics ..................................................... 312 6.6.1 Explicit Heap Management ................................... 313 6.6.2 Implicit Deallocation ......................................... 317 6.7 Summary and Perspective ........................................... 322 Chapter Notes ........................................................ 323 Exercises ............................................................. 324 CHAPTER 7 Code Shape................................................................... 331 7.1 Introduction .......................................................... 331 7.2 Assigning Storage Locations ........................................ 334 7.2.1 Placing Runtime Data Structures ............................. 335 7.2.2 Layout for Data Areas ........................................ 336 7.2.3 Keeping Values in Registers .................................. 340 7.3 Arithmetic Operators ................................................ 342 7.3.1 Reducing Demand for Registers ............................. 344
  • 19. Contents xiii 7.3.2 Accessing Parameter Values .................................. 345 7.3.3 Function Calls in an Expression .............................. 347 7.3.4 Other Arithmetic Operators .................................. 348 7.3.5 Mixed-Type Expressions ..................................... 348 7.3.6 Assignment as an Operator ................................... 349 7.4 Boolean and Relational Operators .................................. 350 7.4.1 Representations ............................................... 351 7.4.2 Hardware Support for Relational Operations ................ 353 7.5 Storing and Accessing Arrays ....................................... 359 7.5.1 Referencing a Vector Element ................................ 359 7.5.2 Array Storage Layout ......................................... 361 7.5.3 Referencing an Array Element ............................... 362 7.5.4 Range Checking ............................................... 367 7.6 Character Strings ..................................................... 369 7.6.1 String Representations ........................................ 370 7.6.2 String Assignment ............................................ 370 7.6.3 String Concatenation .......................................... 372 7.6.4 String Length .................................................. 373 7.7 Structure References ................................................. 374 7.7.1 Understanding Structure Layouts ............................ 375 7.7.2 Arrays of Structures ........................................... 376 7.7.3 Unions and Runtime Tags .................................... 377 7.7.4 Pointers and Anonymous Values ............................. 378 7.8 Control-Flow Constructs ............................................ 380 7.8.1 Conditional Execution ........................................ 381 7.8.2 Loops and Iteration ........................................... 384 7.8.3 Case Statements ............................................... 388 7.9 Procedure Calls ...................................................... 392 7.9.1 Evaluating Actual Parameters ................................ 393 7.9.2 Saving and Restoring Registers .............................. 394 7.10 Summary and Perspective ........................................... 396 Chapter Notes ........................................................ 397 Exercises ............................................................. 398 CHAPTER 8 Introduction to Optimization .............................................. 405 8.1 Introduction .......................................................... 405 8.2 Background ........................................................... 407 8.2.1 Examples ...................................................... 408 8.2.2 Considerations for Optimization ............................. 412 8.2.3 Opportunities for Optimization ............................... 415
  • 20. xiv Contents 8.3 Scope of Optimization ............................................... 417 8.4 Local Optimization .................................................. 420 8.4.1 Local Value Numbering ...................................... 420 8.4.2 Tree-Height Balancing ........................................ 428 8.5 Regional Optimization ............................................... 437 8.5.1 Superlocal Value Numbering ................................. 437 8.5.2 Loop Unrolling ................................................ 441 8.6 Global Optimization ................................................. 445 8.6.1 Finding Uninitialized Variables with Live Information .................................................... 445 8.6.2 Global Code Placement ....................................... 451 8.7 Interprocedural Optimization ........................................ 457 8.7.1 Inline Substitution ............................................ 458 8.7.2 Procedure Placement .......................................... 462 8.7.3 Compiler Organization for Interprocedural Optimization .................................................. 467 8.8 Summary and Perspective ........................................... 469 Chapter Notes ........................................................ 470 Exercises ............................................................. 471 CHAPTER 9 Data-Flow Analysis .......................................................... 475 9.1 Introduction .......................................................... 475 9.2 Iterative Data-Flow Analysis ........................................ 477 9.2.1 Dominance .................................................... 478 9.2.2 Live-Variable Analysis ....................................... 482 9.2.3 Limitations on Data-Flow Analysis .......................... 487 9.2.4 Other Data-Flow Problems ................................... 490 9.3 Static Single-Assignment Form ..................................... 495 9.3.1 A Simple Method for Building SSA Form .................. 496 9.3.2 Dominance Frontiers .......................................... 497 9.3.3 Placing φ-Functions .......................................... 500 9.3.4 Renaming ...................................................... 505 9.3.5 Translation Out of SSA Form ................................ 510 9.3.6 Using SSA Form .............................................. 515 9.4 Interprocedural Analysis ............................................. 519 9.4.1 Call-Graph Construction ...................................... 520 9.4.2 Interprocedural Constant Propagation ....................... 522 9.5 Advanced Topics ..................................................... 526 9.5.1 Structural Data-Flow Algorithms and Reducibility ......... 527 9.5.2 Speeding up the Iterative Dominance Framework .......... 530
  • 21. Contents xv 9.6 Summary and Perspective ........................................... 533 Chapter Notes ........................................................ 534 Exercises ............................................................. 535 CHAPTER 10 Scalar Optimizations.......................................................... 539 10.1 Introduction ............................................................. 539 10.2 Eliminating Useless and Unreachable Code ........................ 544 10.2.1 Eliminating Useless Code .................................... 544 10.2.2 Eliminating Useless Control Flow .......................... 547 10.2.3 Eliminating Unreachable Code .............................. 550 10.3 Code Motion ........................................................... 551 10.3.1 Lazy Code Motion ............................................ 551 10.3.2 Code Hoisting ................................................. 559 10.4 Specialization .......................................................... 560 10.4.1 Tail-Call Optimization ........................................ 561 10.4.2 Leaf-Call Optimization ....................................... 562 10.4.3 Parameter Promotion ......................................... 563 10.5 Redundancy Elimination .............................................. 565 10.5.1 Value Identity versus Name Identity ........................ 565 10.5.2 Dominator-based Value Numbering ......................... 566 10.6 Enabling Other Transformations ..................................... 569 10.6.1 Superblock Cloning ........................................... 570 10.6.2 Procedure Cloning ............................................ 571 10.6.3 Loop Unswitching ............................................ 572 10.6.4 Renaming ...................................................... 573 10.7 Advanced Topics ....................................................... 575 10.7.1 Combining Optimizations .................................... 575 10.7.2 Strength Reduction ............................................ 580 10.7.3 Choosing an Optimization Sequence ........................ 591 10.8 Summary and Perspective ............................................ 592 Chapter Notes .......................................................... 593 Exercises ................................................................ 594 CHAPTER 11 Instruction Selection ......................................................... 597 11.1 Introduction ............................................................. 597 11.2 Code Generation ....................................................... 600 11.3 Extending the Simple Treewalk Scheme ............................ 603 11.4 Instruction Selection via Tree-Pattern Matching ................... 610 11.4.1 Rewrite Rules .................................................. 611 11.4.2 Finding a Tiling ............................................... 616 11.4.3 Tools ............................................................ 620
  • 22. xvi Contents 11.5 Instruction Selection via Peephole Optimization ................... 621 11.5.1 Peephole Optimization ....................................... 622 11.5.2 Peephole Transformers ....................................... 629 11.6 Advanced Topics ....................................................... 632 11.6.1 Learning Peephole Patterns .................................. 632 11.6.2 Generating Instruction Sequences ........................... 633 11.7 Summary and Perspective ............................................ 634 Chapter Notes .......................................................... 635 Exercises ................................................................ 637 CHAPTER 12 Instruction Scheduling ....................................................... 639 12.1 Introduction ............................................................. 639 12.2 The Instruction-Scheduling Problem ................................ 643 12.2.1 Other Measures of Schedule Quality ........................ 648 12.2.2 What Makes Scheduling Hard? .............................. 649 12.3 Local List Scheduling ................................................. 651 12.3.1 The Algorithm ................................................. 651 12.3.2 Scheduling Operations with Variable Delays .............. 654 12.3.3 Extending the Algorithm ..................................... 655 12.3.4 Tie Breaking in the List-Scheduling Algorithm ...................................................... 655 12.3.5 Forward versus Backward List Scheduling ................ 656 12.3.6 Improving the Efficiency of List Scheduling .............. 660 12.4 Regional Scheduling ................................................... 661 12.4.1 Scheduling Extended Basic Blocks ......................... 661 12.4.2 Trace Scheduling .............................................. 663 12.4.3 Cloning for Context ........................................... 664 12.5 Advanced Topics ....................................................... 666 12.5.1 The Strategy of Software Pipelining ........................ 666 12.5.2 An Algorithm for Software Pipelining ...................... 670 12.6 Summary and Perspective ............................................ 673 Chapter Notes .......................................................... 673 Exercises ................................................................ 675 CHAPTER 13 Register Allocation............................................................ 679 13.1 Introduction ............................................................. 679 13.2 Background Issues ..................................................... 681 13.2.1 Memory versus Registers .................................... 681 13.2.2 Allocation versus Assignment ............................... 682 13.2.3 Register Classes ............................................... 683 13.3 Local Register Allocation and Assignment ......................... 684 13.3.1 Top-Down Local Register Allocation ....................... 685
  • 23. Contents xvii 13.3.2 Bottom-Up Local Register Allocation ...................... 686 13.3.3 Moving Beyond Single Blocks .............................. 689 13.4 Global Register Allocation and Assignment ........................ 693 13.4.1 Discovering Global Live Ranges ............................ 696 13.4.2 Estimating Global Spill Costs ............................... 697 13.4.3 Interferences and the Interference Graph ................... 699 13.4.4 Top-Down Coloring .......................................... 702 13.4.5 Bottom-Up Coloring .......................................... 704 13.4.6 Coalescing Copies to Reduce Degree ....................... 706 13.4.7 Comparing Top-Down and Bottom-Up Global Allocators ............................................. 708 13.4.8 Encoding Machine Constraints in the Interference Graph ............................................ 711 13.5 Advanced Topics ....................................................... 713 13.5.1 Variations on Graph-Coloring Allocation .................. 713 13.5.2 Global Register Allocation over SSA Form ................ 717 13.6 Summary and Perspective ............................................ 718 Chapter Notes .......................................................... 719 Exercises ................................................................ 720 APPENDIX A ILOC.............................................................................. 725 A.1 Introduction ............................................................. 725 A.2 Naming Conventions ................................................... 727 A.3 Individual Operations .................................................. 728 A.3.1 Arithmetic ....................................................... 728 A.3.2 Shifts ............................................................. 729 A.3.3 Memory Operations ............................................. 729 A.3.4 Register-to-Register Copy Operations ........................ 730 A.4 Control-Flow Operations .............................................. 731 A.4.1 Alternate Comparison and Branch Syntax ................... 732 A.4.2 Jumps ............................................................. 732 A.5 Representing SSA Form ............................................... 733 APPENDIX B Data Structures................................................................ 737 B.1 Introduction ............................................................. 737 B.2 Representing Sets ....................................................... 738 B.2.1 Representing Sets as Ordered Lists ........................... 739 B.2.2 Representing Sets as Bit Vectors .............................. 741 B.2.3 Representing Sparse Sets ....................................... 741 B.3 Implementing Intermediate Representations ......................... 743 B.3.1 Graphical Intermediate Representations ...................... 743 B.3.2 Linear Intermediate Forms ..................................... 748
  • 24. xviii Contents B.4 Implementing Hash Tables ............................................ 750 B.4.1 Choosing a Hash Function ..................................... 750 B.4.2 Open Hashing ................................................... 752 B.4.3 Open Addressing ................................................ 754 B.4.4 Storing Symbol Records ....................................... 756 B.4.5 Adding Nested Lexical Scopes ................................ 757 B.5 A Flexible Symbol-Table Design ..................................... 760 BIBLIOGRAPHY ................................................................................ 765 INDEX ........................................................................................... 787
  • 25. 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
  • 26. Other documents randomly have different content
  • 27. Reich directorate [Reichsleitung] of the Nazi party and its higher institutes of learning. I wish to inform you especially that as many as 7000 crates have been brought to Germany up to the present moment. In the course of these confiscations we have found according to the nature of the case other valuable cultural objects including very valuable works of art. And in order that these things should not be dispersed and that they be secured for the Fuehrer, the Chief of the high command of the armed forces (OKW) on my request and on the instance of the Fuehrer has ordered that these art objects should be catalogued by me. I ask you that if necessary it should be established for the benefit of the Reich Marshal that my working staff has executed these tasks in a correct fashion and in an objective blameless form. Art objects generally do not come into question as far as the Balkans are concerned although there are Free-Masonry archives and Jewish libraries and other relevant research objects. In my opinion only the same attitude as that prevailing in occupied French territory can be taken and what I requested, was really only an expansion of an already existing regulation. For General Field Marshal List, and likewise for the General Quartermaster of the Army the work has already begun and my men are at work with these circles in Belgrade. By command of General Field Marshal List as well as of his deputy general, these men will also be employed in closest relationship with the Security Service in Salonika. As you know, Salonika is one of the largest Jewish centers. I should like to remark in this connection that this affair has already been executed on our side with the Security Service in the most loyal fashion. One of our collaborators who also belongs to the Security Service, had his duty-obligation countermanded by the Security Service, whereupon it was impressed upon him that the Security Service cooperates with my administrative staff in a most loyal fashion. The position is thus clarified in a practical fashion and the work has taken its course. What I asked was only a confirmation that the already pronounced decisions for the West should also have validity under the given circumstances for other occupied or to be
  • 28. occupied areas. Finally the representative of the Fuehrer has expressly ordered that the appropriate party members in this question should be placed, so as not to permit this unique opportunity for an inquiry in the Jewish and Masonic lodge question to be lost. The agreement on this matter is thus general. I trust that this letter has cleared up the resulting misunderstandings. Heil Hitler! TRANSLATION OF DOCUMENT 072-PS NATIONAL SOCIALIST GERMAN WORKERS PARTY The Deputy of the Fuehrer, Staff Commander Fuehrer Headquarters 19 April 1941 Fuehrer Bureau (Bo/Fu) Chancellory Rosenberg No 4609 H, 21 April 41 Shown to the Reichsleiter on the 22. 4 [rubber stamp] To Reichsleiter Alfred Rosenberg Berlin W 35, Margaretenstr. 17 Copy to Utikal Dear party member Rosenberg! In connection with the received draft of the decree I attended, as ordered, a speech made by SS Brig. Gen. Heydrich. The latter called attention to the fact that the sentence, "In the confiscations undertaken, or to be undertaken in the Reich area, of the property
  • 29. of ideological opponents, the same rules apply", anticipates a regulation which has so far not been introduced and would for the first time set a precedent through this decree-draft. Moreover, the regional governments [Gauleitungen] are never allowed to carry out confiscations. Gruppenfuehrer Heydrich further pointed out that he could under no circumstances recognize the attempted regulation in the final sentence of your decree-draft, since there existed some objections to it. The scientific treatment of the ideological opposition could only be done in conjunction with the political police work. Only the material should be handed over to you, and the seminar respectively. If a speedier treatment through your office is necessary, duplicates and photocopies should be put at your disposal. The Fuehrer emphasized that in the Balkans the use of your experts would not be necessary, since there were no art-objects to be confiscated. In Belgrade only the collection of Prince Paul existed, which would be returned to him completely. The remaining material of the lodges, etc. would be seized by the agencies of Gruppenfuehrer Heydrich. The libraries and art objects of the monasteries, confiscated in the Reich, were to remain for the time being in these monasteries, insofar as the Gauleiters had not determined otherwise. After the war, a careful examination of the stock could be undertaken. Under no circumstances, however, should a centralization of all the libraries be undertaken, the Fuehrer has repeatedly rejected this suggestion. signed: M. BORMANN TRANSLATION OF DOCUMENT 078-PS COPY
  • 30. OFFICE IV Berlin 28 June 1941 SECRET STATE MATTER! Directives for the Chiefs of Security Police and Secret Service Teams Assigned to PW Camps These teams are assigned after agreement has been reached between the chiefs of the Security Police, secret service and the Supreme Command of the Army and * * * (see annex). The Commands work upon the special authorization and according to the general directives in the Camp regulations which was given to them and is independently in close harmony with the AO. The duty of the Commands is the political screening of prisoners and the segregation and further handling of undesirable elements among them with regard to political, criminal or similar respects. Resources cannot be placed at the disposal of the Commands for the fulfillment of their missions. The "German penal code" [Fahndungsbuch], the "Temporary permit of Leave List" [Aufenthaltsermittlungsliste], and "Special Penal Code USSR" will prove to be of little value; the Special Penal Code USSR therefore does not suffice as only a small part therein is dangerous to the designated Soviet Russians. The Commands will therefore have to rely on their own specialty and ingenuity upon establishment and self-producing knowledge. Therefore they will only then be able to begin with the fulfillment of their mission when they have gathered an appropriate amount of material. For their work, the Commands are to make as much use of the experiences of the Camp Commanders as possible, who in the meantime have profited by the observation and examination of prisoners.
  • 31. Further, the Commands will have to take pains from the beginning to search among the prisoners for seemingly trustworthy elements, may they be communists or not, in order to make them useful for their intelligence purposes. Through the establishment of such trusted personnel [V-Personen] and through the use of all other present possibilities among the prisoners, it must succeed to screen all elements. In every case the Commands are to provide themselves with definite clarity over the encountered measures through the examination and eventual questioning of prisoners. Above all it is important to find out: 1. all outstanding functionaries of the State and of the Party, especially 2. professional revolutionists, 3. the functionaries of the Comintern, 4. all leading Party functionaries of the Russian Secret Police [KPdSU] and their associated organizations in the Central, district, and county Committees, 5. all the Peoples' Commissars and their Assistants, 6. all the former Polit-Commissars in the Red Army, 7. all leading personalities of the Central and Middle Offices among the State authorities, 8. the leading economic personalities, 9. the Soviet Russian Intelligence agents, 10. all Jews, 11. all persons who are established as being instigators or fanatical communists. Just as important is the finding of persons who are devoted to the reconstruction, the administration, and management of the
  • 32. conquered Russian provinces. Finally, such persons must be secured who can be used to transact further discoveries, whether of the Police or similar work, and for the clarification of universal interesting questions. In this category fall all the higher State and Party functionaries who are in the camp on the basis of their position and knowledge and who can give information on the measures and working methods of the Soviet State, the Communistic Party or the Cominterns. In view of the pending decisions, considerations must also be given to the peoples' membership. At the end of the screening, measures, to be decided later, as to the transfer of prisoners from one command to another, will follow. The Camp Commanders are directed by the Supreme Command of the Army to report such proposals. Executions will not be carried out in the camps or immediate vicinity. Should the camps in the General Government be situated in the immediate vicinity of the border, then the prisoners for special handling are to be taken care of in former Soviet Russian Provinces. The Commands are to keep records of the fulfillment of special handlings; which must include: Serial number Family and Surname Date of birth and place Military rank Profession Last residence Reason for special handling Day and place of special handling Office IV
  • 33. SECRET STATE MATTER Supplement to the Directives for the Commands of the Security Police and Security Service assigned to P.W. camps 1. In the directives of the 17th July 1941, I have repeatedly pointed to the fact that it is the duty of the Special Purpose Command of the Security Police and Security Service to find not only the untrustworthy but also those trustworthy elements in general which can come into consideration for the reconstruction of the Eastern provinces. I reemphasize that one duty is as important as the other. In order to obtain a most extensive view of the co-activity of the Special Purpose Command, I order that the numeral 4 (number of those persons found to be trustworthy) will be especially heeded in the weekly reports. The war prisoners who are found to be trustworthy and who were formerly in leading positions in the Soviet Russian economic circles, are to be listed, if possible, according to branch their last employment, and by name. 2. I reemphasize again the fact that in view of the pending decisions, consideration must especially be given to the peoples' citizenship. Ukrainians, White Russians, Aserbeidschanians, Armenians, North Caucasians, Georgians, Turks are only to be designated as definitely untrustworthy and dealt with according to the directive when they are definitely proven to be Bolshevists, Polit-Commissars, or other dangerous functionaries. One must be careful, in as much as the Turkish people frequently have a Jewish appearance and the circumcision alone does not denote a Jewish descent (for example, Mohammedans). 3. The conception "highbrow" [Intelligenzler] should not be interpreted along European viewpoints.
  • 34. The simplest, most primitive Soviet-Russian illiterate can, in his political fanaticism, be more dangerous than, for instance, the Soviet-Russian engineer, who due to his ability, went to High School, even though, he only outwardly appeared to be in accord with the Bolshevistic system. In this respect the highbrow are mainly the professional revolutionists, writers, editors, and persons in the Comintern. 4. Those Soviet Russians who are definitely found to be untrustworthy are to be forthwith reported—as designated in the directives of the 17th July 1941. Following the introduction of the execution authorization, further fulfillment of the designated measures are to begin without further delay. A further custody in the camps in question are to be avoided for various reasons. Finally I reemphasize that under no circumstances are the executions to be carried out either in the Camp or in the near vicinity. It is self-understood that these executions are not public. It is a matter of principle not to admit spectators. 5. I again charge the leaders and members of the Special Service Staff with the following: exemplary behavior during and after duty hours, top cooperation with camp commanders and careful checking of work. signed: Heydrich (S) Verified: signed: Wolfert, Member of the Chancellory
  • 35. TRANSLATION OF DOCUMENT 081-PS [TOP SECRET] 28 February 1942 1/1 /41 g.Ks To the Chief of the Supreme Command of the Armed Forces [OKW] Berlin W 35, Tirpitzufer 72-76 Subject: Prisoners of war. Since the beginning of its existence, the Reich Ministry for the occupied Eastern territories has taken the viewpoint, that the large number of Soviet prisoners of war constitute a highly valuable material for propaganda. The treatment of Soviet prisoners of war must be considered differently than the treatment of prisoners of war of other nations, for various reasons: 1. The war in the East has not been concluded, and the treatment of the prisoners of war must have far-reaching results on the will-to- desert of the Red Army man who is still fighting. 2. Germany intends to keep a large part of the former Soviet Union occupied, even after the end of the war, and to develop it industrially for her purposes. Therefore she depends on a far-reaching cooperation of the population. 3. Germany is conducting the fight against the Soviet Union because of ideological viewpoints. Bolshevism must be overthrown and something better must be put in its place. Even the prisoners of war themselves must realize that national socialism is willing and in the position to bring them a better future. They must return later to their homes from Germany with a feeling of admiration and esteem for Germany and German institutions; and thus become propagandists for the cause of Germany and national socialism.
  • 36. This attempted goal has not been attained so far. The fate of the Soviet prisoners of war in Germany is on the contrary a tragedy of the greatest extent. Of 3.6 millions of prisoners of war, only several hundred thousand are still able to work fully. A large part of them has starved, or died, because of the hazards of the weather. Thousands also died from spotted fever. It is understood, of course, that there are difficulties encountered in the feeding of such a large number of prisoners of war. Anyhow, with a certain amount of understanding for goals aimed at by German politics, dying and deterioration could have been avoided in the extent described. For instance, according to information on hand, the native population within the Soviet Union are absolutely willing to put food at the disposal of the prisoners of war. Several understanding camp commanders have successfully chosen this course. However in the majority of the cases, the camp commanders have forbidden the civilian population to put food at the disposal of the prisoners, and they have rather let them starve to death. Even on the march to the camps, the civilian population was not allowed to give the prisoners of war food. In many cases, when prisoners of war could no longer keep up on the march because of hunger and exhaustion, they were shot before the eyes of the horrified civilian population, and the corpses were left. In numerous camps, no shelter for the prisoners of war was provided at all. They lay under the open sky during rain or snow. Even tools were not made available to dig holes or caves. A systematic delousing of the prisoners of war in the camps and of the camps themselves has apparently been missed. Utterances such as these have been heard: "The more of these prisoners die, the better it is for us". The consequence of this treatment is now this, that spotted fever is spreading due to the escape and discharge of prisoners and has claimed its victims among the armed forces as well as among the civilian population, even in the old part of Germany. Finally, the shooting of prisoners of war must be mentioned; these were partly carried out according to viewpoints which ignore all political understanding. For instance, in various camps, all the "Asiatics" were shot, although the inhabitants of the areas, considered belonging to Asia, of Transcaucasia and Turkestan
  • 37. especially, are among those people in the Soviet Union who are most strongly opposed to Russian subjugation and to Bolshevism. The Reich ministry of the occupied Eastern territories has repeatedly emphasized these abuses. However, in November for instance, a detail [Kommando] appeared in a prisoner of war camp in Nikolajew, which wanted to liquidate all Asiatics. The treatment of prisoners of war appears to be founded for a great part on serious misconceptions about the people of the Soviet Union. One finds the opinion that the people become more inferior the further one goes East. If the Poles already were given harsh treatment, one argues, it should therefore be done to a much greater extent to the Ukrainians, White Ruthenians, Russians, and finally the "Asiatics". It was apparently completely ignored, in the treatment of prisoners of war, that Germany found, in contrast to the West (France, Belgium, the Netherlands, Norway), a people who went through all the terror of Bolshevism, and who now, happy about their liberation, put themselves willingly at the disposal of Germany. A better gift could not come to Germany in this war, which requires every last man. But instead of accepting this gift, the people of the East are being treated more contemptibly and worse than the people of the West, who do not hide their enmity towards Germany. It was a basic mistake that no difference was made between real prisoners of war and deserters. It is known that German propaganda deposited millions of leaflets beyond the lines, and encouraged the Red soldiers to desert, whereby good treatment and sufficient food was specifically assured to them. These promises were not kept. The deserters were beaten and left to starve the same as so many prisoners of war. A natural consequence of this politically and militarily unwise treatment was not only a paralyzing of the will to desert, but a plain deadly fear to get into German captivity. It would be naive to assume that the occurences in the prisoner of war camps could be kept hidden from the Soviet government. As can be seen in Molotov's circular, the Soviets have in fact an excellent knowledge of
  • 38. the conditions described above, and naturally they have done everything in their power to influence the Soviet population and Red soldiers accordingly. It can be said without exaggeration that the mistakes in the treatment of prisoners of war are to a great extent the cause for the stiffening power of resistance of the Red Army, and therefore also cause for the death of thousands of German soldiers. After the Reich ministry for occupied Eastern territories was finally successful in overcoming the prejudice against Soviet prisoners of war partially, and when the prisoners of war were to come to Germany to a great extent for work, it was found that of 3.6 million only several hundred thousand were still able to work. Thus, German economy and armament industry also must suffer for the treatment of prisoners of war. The above explanations are not intended to be a belated, fruitless criticism, nor are they directed against any official agency, especially since very many objective situations came into play, as has been mentioned, and the responsibility is shared. They should only become the basis for a new policy toward the prisoners of war which corresponds more to our military and civilian interests. The Reich ministry for the occupied Eastern territories is endeavoring with all its powers to assist the fighting troops by effective propaganda for the deterioration of the enemy's military forces. All propaganda will be useless, however, if there is more fear of captivity than of death and wounds on the battlefield. The primary demand is that the treatment of the prisoners of war ensues according to the laws of humanity and according to the dignity of the German nation. It is understandable that inhuman treatment, proven many times, of German prisoners of war, by members of the Red Army has embittered the German troops so much that they retaliate with the same treatment. However, such retaliatory measures do not improve the situation of German prisoners of war by any means, but must have as their last consequence the fact that neither side will take any more prisoners, thus that they conduct the war in a most inhuman manner. At any
  • 39. rate, as much as is known, such retaliatory measures have not been able up to now to cause the enemy to change. They were therefore without purpose. Furthermore, sufficient food, and at least primitive shelter, are to be provided for the prisoners within the framework of possibility. In the camps for prisoners, scheduled for work projects, as well as in those for the others, skillful propaganda is necessary, which must be carried out by camp newspapers, movies, lectures, simple musical events, games, etc. Every camp commandant must be made responsible that every prisoner of war, guarded by him, will return to his home later on as a propagandist for Germany. Of course, on the other side, action must be taken with utmost severity against possible agitators. In any case, in the future a difference must be made between real prisoners of war and deserters. The deserters are to be provided with identification certificates, and in any case are to be treated better than the prisoners of war. Especially this measure should have far-reaching success in reference to the deterioration of the Red Army. I would appreciate an expression of opinion soon, and information of appropriate action. TRANSLATION OF DOCUMENT 084-PS Berlin NW 7, The 30 Sept. Hegelplatz 2 Central Office [Zentralstelle] for Members of Eastern Nationals. In (ZO) Concerning: Present Status of the question of Eastern Laborers.
  • 40. The commitment and treatment of foreign laborers, who have been brought into the Reich from occupied Eastern territories, depicts a proceeding which will not only be of significant importance to the German war production and the securing of food, but also for the carrying out of German administrative interests in a former Soviet area. Two large fields of action are affected by the way in which the problems connected with the inclusion of millions of Eastern nationals in the Reich are solved: 1. Development of the war situation. 2. The enforcement of the German claim to leadership in the East after the war. When the call for labor in Germany was increased in January, 1942 among the occupied Eastern territories, this set up a situation among those classes of Russian and Ukrainian civilians concerned which had by all means the appearance of a risk. Even if one group (the volunteers) set excessive hopes on the journey into the Reich under the impression of irresponsible promises while the other (forced laborers) left their homes reluctantly or at least with misgivings because of memories of former Bolshevist deportations as well as planted anti-German rumors, the fact remains that the trip to Germany had to be felt as journey into the unknown not only by the two concerned but also by those relatives who remained behind because of the isolation of the USSR from Europe for decades. The public judgment of the Reich and its leadership would be dependent upon the outcome of this measure taken by the German military and civilian authorities in the occupied Eastern territories. The employment in Germany offered an unusual opportunity to learn to know by personal experience, which no propaganda could replace. The greater German Reich was much slandered by the Soviet press, and the National Socialistic position to the working class and thus to gain a basis of comparison to the corresponding Communistic doctrines and methods. This meant no more nor less, than that the draft of Eastern laborers would be of importance in the development of political opinions among the Eastern nationals towards the power which was presently occupying the region which would aid measures taken to accomplish the recruitment, the housing etc., in the Reich,
  • 41. which should have been taken into consideration from the start, since in view of the necessity to keep the aid of the native inhabitants in the huge areas behind the front, factors which cannot be controlled by regulations or orders, namely the frame of mind, which is of war potential value, must be considered. Instead of taking consideration of this, the drafting and the employment as well as the housing, treatment etc. of the so-called Eastern laborers has so far been taken care of exclusively according to labor, technical and the security police points of view, with the result that the headquarters responsible for this were able to report the due numerical fulfilment of the program as well as the security of the German nationality and of the businesses. At the time, however, facts had to be hushed which could have been avoided not only in the interests of German prestige and to the satisfaction of the occupied Eastern territories but which even today cost the lives of thousands of German soldiers by their efforts. The facts which up to the fall of 1942, have undergone only part or incomplete changes, among others, the following. 1. The concept of the workers from the occupied territories of the USSR was narrowed down to the labor- and social-legal term "Eastern Laborers". A labor condition among "Foreigners" was hereby created in a segregated "Employment under Special Conditions" which had to be looked upon by those affected, as degrading. 2. The drafting of Eastern workers and women workers often occurred without the necessary examination of the capabilities of those concerned, so that 5-10 out of a hundred, sick and children, were transported along. On the other hand, in those places where no volunteers were obtained, instead of using the lawful employment obligations, coercive measures were used by the police (imprisonment, penal expedition, and similar measures.) 3. The employment in businesses was not undertaken by considering the occupation and previous training but according to the chance
  • 42. assignment of the individual to the respective transports or transient camps. 4. The billeting did not follow the policies according to which the other foreigners are governed, but just as for civilian prisoners in camps which were fenced in with barbed wire and were heavily guarded, from which no exit was permitted. 5. The treatment by the guards was on the average without intelligence and cruel so that the Russian and Ukrainian workers, in enterprises with foreign laborers of different nationalities, were exposed to the scorn of the Poles and the Czechs among other things. 6. The food and care was so bad and insufficient in the camps for the Eastern Laborers being employed in the industry and in the mines that the good average capability of the camp members dropped down shortly and many sicknesses and deaths took place. 7. Payment was carried out in the form of a ruling in which the industrial worker would keep on the average 2 or 3 RM each week and the farm laborers even less, so that the transfer of pay to their homes became illusory, not to mention the fact there had been no satisfactory procedure developed for this. 8. The postal service with their families was not feasible for months because of the lack of a precautionary ruling; so that instead of factual reports, wild rumors arrived in their countries,—among other means by means of emigration. 9. The promises which had been made time and time again in the areas of enlistment stood in contradiction with those facts mentioned under 3-8. Apart from the natural impairment of the frame of mind and capabilities which these measures, as well as conditions, brought with them, the result was that the Soviet propaganda took over the matter and evaluated it carefully. Not only the actual conditions and the letters which reached the country, in spite of the initial blockade, as well as the stories of fugitives and such, but also the clumsy
  • 43. publications in the German press of the legal rulings relative to the matter gave them enough to manipulate with. Commissar for Foreign Affairs Molotov in his note to the enemy powers referred already in April 1942 to this, especially in para. III of this document in which among others it is stated: "The German administration is treading under its feet the long recognized laws and customs governing war, in that it has given the orders to the troops to take into captivity all male civilians and in many places even the women, and to use against them those measures which the Hitlerites have introduced towards prisoners of war. This does not only mean slave labor for the captured peaceful inhabitants but in most cases it also means inescapable starvation or death through sickness, corporal punishments, and organized mass murders. "The deportation of peaceful inhabitants to the rear, which has been widely practiced by the German-Fascist army, begins to take on a mass character. It is carried out under direct rulings of the German High Command (OKW) and its effects are especially cruel in the immediate rear areas during a retreat of the German army. In a series of documents, which have been found with the staffs of destroyed German units, there is a directive to the order of the High- Command under Nlr. 2974/41 of 6 Dec. 1942 which directs that all grown men are to be deported from occupied populated points into prisoner of war camps. From the order to the 37th Infantry Regiment of the 6th Division of 2 Dec. 1941 under the heading "About the deportation of the Civilian Population" it can be deduced that for the period from the 4 to the 12 Dec the capture and forceful deportation of the total population of 7 villages to the German rear areas was planned, for which a carefully worked out plan was proposed. Sometimes all the inhabitants were deported, sometimes the men were torn away from their families or mothers were separated from their children. Only the smallest number of these deported people have been able to return to their home village. These returnees
  • 44. report terrible degradations, heaviest forced labor, abundant deaths among inhabitants because of starvation and tortures, and murder by the Fascists of all the weak, wounded, and sick." Further, there are even today announcements in the Soviet newspapers as well as radio about the treatment of Eastern laborers which might have as an effect a strengthening of the moral power to resist in the Red Army. Further, there is mentioned the text of a letter which arrived in Ordshonikidsegrad from a Russian girl and which was published in a "Proclamation" of the police administration of the North-Western Front of the Red army under the heading of "A Russian Girl in Cologne", attaching in connection with it an effective propaganda viewpoint about the "Fascist Forced Laborers" in Germany. "Do you know"—, it goes on at the end of the proclamation,—"that every one of us who goes to Germany will meet the same fate as Olga Selesnewa! Do not forget that the German monster will make each and every one of you, who has remained behind, a slave on your own soil or drag you to eternal forced labor in Germany! Dear brothers and sisters ... Go to the partisan detachments! Injure the German occupants at every step. Hit the Hitler thieves everywhere and continuously. The Russian soil shall become their graves!" The effects of this large scale documentary proven radio-press-and leaflet propaganda, operating even into German administered territories, must be considered as one of the main reasons for this year's stiffening of the Soviet resistance as well as the threatening increase of guerilla bands up to the borders of the General Government. In the meantime, after a betterment of the condition of the Eastern laborers had been insisted upon, not only by the main office for politics in the Reichs ministry for the Occupied Eastern Territories, which has been able to find support in the repeated requests by the High Command of the Armed Forces, but also by the gentleman charged with the responsibility for all labor employment as well as the Department of Labor Employment in the German Labor
  • 45. Movement, which has the supervision of the Eastern Laborers— those previously existing legal and police rulings have been mitigated and the conditions in the 8-10,000 camps in the Reich have, on the whole, been improved. Thus those fixed wages, which have been determined by the tables of compensation in a ruling of the Council of Ministers, upon which deductions were made up to 75%, have been replaced by new tariffs. The Eastern Laborers were left free of duty according to it, and the taxes were paid in a form of an Eastern Laborer Tax by the owner of the enterprise (Ruling of Council of Ministers for the Defense of the Reich of 30/6/42). Thus after many months of negotiations, with the cooperation of the Central Economic Bank in Rowno, a salary transfer, in the form of a savings stamp procedure, was regulated. Thus, the ruling of the Reichs Chief of the SS of 20/2/42 prescribing barbed wire has been dropped by a supplementary ruling of 9/4/42 and at the same time, in exceptional cases, groups were permitted to go out under German guards, of late, it has even been permitted under their own supervision. The food supply was adjusted by a special delivery letter of the Reichs Food minister dated 17/4/42, to a degree where the "Soviet Civilian Laborer", as well as the prisoners of war received a uniform ration. This was still not enough compared to the normal amount of food given to those employed in the industry and in the mines, besides it was still much less and worse than that for the Poles, but it was an improvement compared to former conditions. Furthermore the postal communication has been adjusted for those Eastern Laborers who come from the civilian administered as well as those who are from the regions directly to the rear of the army,—at least theoretically—. On account of the burden placed on the censorship office for foreign countries the High Command of the Armed Forces has recently asked again for a reduction of this measure. In spite of the improvements mentioned as well as others, which in many cases can be traced back to the personal intervention of the Deputy General of Labor Employment, the total situation of the Eastern Laborer (sampling date: 1 October 1942) must still be
  • 46. considered unsatisfactory, namely, not only in respect to the differences in the treatment of industrial workers and farm laborers but in the differences found in the different States and enterprises. On the average there are still about 40% of the lodgings for Eastern laborers which would not meet the requirements even if all the wartime restrictions were considered. Among these are a frightening number of camps whose conditions are such as to destroy the success of the attempt of improving relationship and the corresponding radiating uplift of the morale within the Eastern territories. Not even to mention the fact that the marking OST (East), an identification ordered by the police, is being felt as degrading there remains such a quantity of grievances and problems that it would be impossible to relate them now. Only the following points are to be mentioned: 1. The Enlisting and Employing of persons of German Parentage, as Eastern laborers. Several observations made by the commission from the central office to inspect camps, as well as petitions which have reached them, show that persons of German parentage were enlisted,—against regulations,—as Eastern Laborers. Even if they are not recognized people of German parentage according to the "RKFestigung", they are, however persons of German descent and with German names, as Mr. Middelhauve could establish in a camp near Berlin. It is to be doubted that the branch offices of the sub- office for Germans living in foreign countries had enough qualified help who could separate these persons capable of becoming Germans again. 2. Enlisting and Employing as Eastern Laborers of Tartars from the Crimea. To increase the fighting numbers of the Tartar legions it would be indispensable to return all those Tartars, who have been employed in the Reich as Eastern Laborers, to their homes before the coming of winter; a similar report to the "GBA" is being prepared. Besides climatic reasons, the necessity for this return is to intensify the wine and tobacco growths in the Crimea by experienced help and at the same time, to prevent the invasion of Greek and Bulgarian planters and traders. To prepare this return as well as to
  • 47. deal with other Tartan problems a commissioner, namely a Crimean Tartar, has been installed by the "ZO". In the meantime, difficulties have arisen because of the effect of the furloughing of Tartan Eastern Laborers for participation in the Mohammedan festival during the 4th and 5/10/42 as well as the procurement of the meat and millet supply needed for this occasion. The authority in these and similar matters will have to be voiced, at the time of their return, by those White Ruthanian Tartars who have been selected for resettlement. 3. Enlisting and Employing as Eastern Laborers of Ukrainians from Transnistrian. During an inspection of the camps for munition workers at Topchin (Kreteltow) into which the Central Office was induced because of an escape which became known to them, it was found that the Eastern Laborers employed there were enlisted January 1942 in Odessa. They do not come according to para. I of the Rulings of the Council of Ministers dated 30/6/42, under the category of Eastern Laborers. But will have to be termed, because of the fact that the State of "Transnistrian" was placed in the Fall of 1941 under Rumanian sovereignty, as stateless members of the Kingdom of Rumania. To clarify this point for all times, negotiations have been made with the GBA and the Foreign Office as well as the Feldzeuginspektion of the Office for General Affairs in the High- Command of the Army. 4. Employment of Skilled Laborers in Occupations foreign to their skills. Up until recently petitions have continually come to the publishers of camp newspapers to the Reichs Ministry for the occupied Eastern territories, to the German Workers Front and in error also to the bureau for foreign nationals in the Reich from Eastern laborers, men and women who are in occupations foreign to their skills or inferior to their skills, without the transfer proposals, which were approved by the central office as well as by other offices, having led to success—except in rare cases. Gauleiter Sauckel, who has repeatedly disclosed—the last time at the conference in Weimar on the 10 and 11/9/42—that the "inner arrangement" of the occupational employment would be his next
  • 48. point on the program, does not seem to be informed about the real conditions in which doctors, engineers, teachers, qualified skilled laborers and such are employed as unskilled workers, mechanics as farmers, and farmers as industrial workers. In any case, one of his close associates, the Gauamtsleiter Orr Escher received the information about this which was given him by Dr. Thiell, in accordance with instructions of the Central Office, with unusual interest. 5. Separation in employment of members of one Family. The repeated separation of family members who have come to the Reich as Eastern Laborers and Eastern Women Workers (married couples, parents, brothers and sisters, and children) seems utterly contrary to the usual customs governing other employments of foreigners. The bringing together of those relatives who have been mistakenly separated during the transport is principally desired just as much as is the employment of family members in the same location. It does however, in practice, encounter some difficulties. In order to make possible at least the transfer of information from both parties, the Reichs Ministry for the occupied Eastern territories in August 1942, in conjunction with the Reich Main office and Reich Security Service has allowed the limited publication of encoded advertisements seeking information. Besides this an agreement has been made in September 1942 between the Central Office and the German Red Cross in accordance with which this organization will take over the communication between these Eastern Laborers separated in the Reich, keeping the place of employment secret however. 6. Disregarding the Nationality in Employment and Billeting. The plan of the Herr Reichsmarshall to create special "Enterprises for the Russians" could not be accomplished as yet on account of reasons of wartime economy. The demands for a joint employment by the members of Eastern nationalities, according to their racial background could not be carried out in practice to any great degree. In addition to the reasons of business, the usual variegated composition of the transports coming from the great realms of the Reichs Commissariate Ukraine opposed it. Basically, a regrouping to
  • 49. racial membership might be possible after completion of an examination of this membership which would have to be made in conjunction with the issuance of employment permits for Eastern Laborers, especially when a group of foremen has been found among the Eastern Laborers based on partial pre-training independently of the solution to this question, the commissions from the Central Office will be striving to effect a rough sifting of the camps according to racial membership, and to house them accordingly in special barracks. The supplying of experienced interpreters for this job and then systematic instruction has been begun. 7. Distinctive, Mostly Insufficient Food Rations. The inadequate food ration for Eastern Laborers is important not only in the matter of performance but also politically, since the majority of the help coming from the occupied Eastern territories were previously accustomed to better rations. After using up all the food supplies which had been brought along, a general lowering of the ability to work and of the morale was noticeable. The written request to the Herr Reichs Food-Minister on the matter, to examine the food quotas in respect to the fact that the Eastern Laborer was in a worse position in the matter of nourishment than the Poles, was answered by a telephone communication from the respective Chief of Section, that to his knowledge the Russians were better off than the Poles. With this ignorance of the condition decisive measures could hardly be expected on the part of the Reichs Food Ministry. Nevertheless Gauleiter Sauckel has declared, in Weimar as a part of his program, that the feeding of the German as well as the foreign laborer inside of Germany would be shortly adapted to the requirements in accordance with their performance—here he supported his program on an utterance of the Fuehrer—. In connection with this a conference took place in the Reichs Food Ministry on 29/9/42 in which an improved food quota of the Eastern Laborer was decided upon. The decree which is being co-signed by the High Command of the Armed Forces and the GBA, [?] upon which the "Special Delivery Letter" of the 17/4/42 will be nullified, provides for laborers of all
  • 50. types an additional 1750 grams of potatoes, for workers in heavy industry and additional 200 grams, and for the group, to be newly instituted, of "overtime" and "night" workers a weekly 2600 grams of bread, 300 of meat, and 150 of fat. Besides this, instead of the tasteless bread made of turnips the usual kind will be delivered in the future. Even though a complete equality of food rationing with the other foreigners should be aspired to, this new measure, whose enforcement is imminent, will counteract the intestinal diseases and swelling of the stomach, as well as the sending of bread from relatives in the Ukraine, which can not be hindered on political grounds. 8. Partly insufficient, and Unjust Payment of Wages. The wage adjustments for Eastern laborers and Eastern women workers must still be considered unsatisfactory even after the new wage scales, by the ruling of the Council of Ministers dated 30/6/42, as well as the lower evaluation of those agricultural workers who are quartered and fed free. The determining factor in keeping the net salary down is the necessity even today of maintaining the natural lower social level as compared to the German laborer, and to protect the German produce market as well as—in the case of transfer accounts—the enterprises in the domain of the Reichs Commissariat from an accumulation of surplus purchasing power. The Central Office took the viewpoint, in the conferences concerned with this matter, that it is far better to keep the wage level, as such, down than later to lower a nominally higher net salary to about half by means of the forced savings plan, reportedly proposed by the Reichs Finance Minister. The change of the hourly pay scale, as well as pay on contracts and pay by means of premiums is therefore closely connected with the success of the voluntary stamp savings plan, which was installed in September 1942. This on the other hand will depend upon the fact that the saved amount, which has been sent to the respective home banks of the relatives in the form of savings books—a system which has finally been introduced by the Herr Reichs Commissar for the Ukraine—will at least be redeemable in cash to half of the amount shown, even if no interest is paid on it at
  • 51. the time. A change in the question of wages, considering that this is the first time in bank technological procedure that savings and transfer accounts have been joined together, would have prospects only if an eventual rearrangement does not materially raise the total wage increase of Eastern Laborers. A throttling measure would otherwise be necessary eventually which would shatter the trust in the honesty of the German social methods and would give irresponsible material to the Soviet propaganda. A way to correctness in the matter of pay within the limitations determined by this viewpoint, could be seen in the proposal of the Reichs Trustee Dr. Kimmich, who expounded it in a short report in Weimar on 11/9/42. In accordance with this a plan for arranging salaries should be carried out by the industries by inserting increasing measures for part time, apprenticeship, and instructional work, to bring into prominence the principle of pay according to performance even in the occupied territories. The foundation for the pay scale based on this will be the evaluation according to eight categories of difficulty in the performance of work, the use of which would exclude the evaluation of previous preparatory training (in the judging of differences) in favor of the success in performance. The complete stoppage of wages would thereby be abolished with finality and the offering of work premiums be made possible to foreign laborers. This,—as Dr. Kimmich characterizes it,—"Re-establishment of a just salary and contract" will have as an effect a general increase in performance which will be advertised as "The thanks of the German laborer to the combat soldier." Should these principles shortly be made obligatory in all the states, this would also bring, in connection with the measures of the project of occupational instruction, an improvement to the former Soviet specialist without having impaired the pre-eminence of the German specialist. The safeguarding of the superiority of the latter is in spite of the wartime needs among other things thereby guaranteed by the fact that the Herr Reichs Minister for armament and ammunition has been able to carry out through the High Command of the Armed Forces on September 1942, that these 500,000 German war industrial workers, who are going to be inducted during the winter half year, will only receive an eight week
  • 52. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com