Preface |
|
v | |
|
An Introduction to Data Flow Analysis |
|
|
1 | (20) |
|
|
1 | (11) |
|
Optimizing for Heap Memory |
|
|
1 | (3) |
|
|
4 | (5) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (2) |
|
Program Analysis: The Larger Perspective |
|
|
12 | (4) |
|
Characteristics of Data Flow Analysis |
|
|
16 | (2) |
|
Summary and Concluding Remarks |
|
|
18 | (1) |
|
|
19 | (2) |
|
I Intraprocedural Data Flow Analysis |
|
|
21 | (210) |
|
Classical Bit Vector Data Flow Analysis |
|
|
23 | (36) |
|
Basic Concepts and Notations |
|
|
23 | (1) |
|
Discovering Local Data Flow Information |
|
|
24 | (2) |
|
Discovering Global Properties of Variables |
|
|
26 | (7) |
|
|
26 | (3) |
|
|
29 | (1) |
|
Reaching Definitions Analysis |
|
|
29 | (3) |
|
Reaching Definitions for Copy Propagation |
|
|
32 | (1) |
|
Discovering Global Properties of Expressions |
|
|
33 | (20) |
|
Available Expressions Analysis |
|
|
33 | (3) |
|
Partially Available Expressions Analysis |
|
|
36 | (1) |
|
Anticipable Expressions Analysis |
|
|
37 | (2) |
|
Classical Partial Redundancy Elimination |
|
|
39 | (10) |
|
|
49 | (4) |
|
Combined May-Must Analyses |
|
|
53 | (3) |
|
Summary and Concluding Remarks |
|
|
56 | (1) |
|
|
57 | (2) |
|
Theoretical Abstractions in Data Flow Analysis |
|
|
59 | (42) |
|
Graph Properties Relevant to Data Flow Analysis |
|
|
59 | (4) |
|
|
63 | (11) |
|
Modeling Data Flow Values Using Lattices |
|
|
64 | (7) |
|
|
71 | (1) |
|
|
72 | (2) |
|
|
74 | (5) |
|
Meet Over Paths Assignment |
|
|
75 | (1) |
|
|
76 | (1) |
|
Existence of Fixed Point Assignment |
|
|
77 | (2) |
|
Computing Data Flow Assignments |
|
|
79 | (6) |
|
|
79 | (2) |
|
Comparing MFP and MOP Assignments |
|
|
81 | (2) |
|
Undecidability of MOP Assignment Computation |
|
|
83 | (2) |
|
Complexity of Data Flow Analysis for Rapid Frameworks |
|
|
85 | (14) |
|
Properties of Data Flow Frameworks |
|
|
86 | (4) |
|
Complexity for General CFGs |
|
|
90 | (7) |
|
Complexity in Special Cases |
|
|
97 | (2) |
|
Summary and Concluding Remarks |
|
|
99 | (1) |
|
|
100 | (1) |
|
General Data Flow Frameworks |
|
|
101 | (58) |
|
Non-Separable Flow Functions |
|
|
101 | (2) |
|
Discovering Properties of Variables |
|
|
103 | (16) |
|
|
103 | (3) |
|
Possibly Uninitialized Variables Analysis |
|
|
106 | (2) |
|
|
108 | (7) |
|
Variants of Constant Propagation |
|
|
115 | (4) |
|
Discovering Properties of Pointers |
|
|
119 | (16) |
|
Points-To Analysis of Stack and Static Data |
|
|
119 | (10) |
|
Alias Analysis of Stack and Static Data |
|
|
129 | (3) |
|
Formulating Data Flow Equations for Alias Analysis |
|
|
132 | (3) |
|
Liveness Analysis of Heap Data |
|
|
135 | (17) |
|
Access Expressions and Access Paths |
|
|
137 | (1) |
|
|
138 | (3) |
|
Representing Sets of Access Paths by Access Graphs |
|
|
141 | (5) |
|
Data Flow Analysis for Explicit Liveness |
|
|
146 | (5) |
|
The Motivating Example Revisited |
|
|
151 | (1) |
|
Modeling Entity Dependence |
|
|
152 | (4) |
|
Primitive Entity Functions |
|
|
153 | (2) |
|
Composite Entity Functions |
|
|
155 | (1) |
|
Summary and Concluding Remarks |
|
|
156 | (1) |
|
|
156 | (3) |
|
Complexity of Iterative Data Flow Analysis |
|
|
159 | (26) |
|
Generic Flow Functions and Data Flow Equations |
|
|
159 | (3) |
|
Generic Round-Robin Iterative Algorithm |
|
|
162 | (2) |
|
Complexity of Round-Robin Iterative Algorithm |
|
|
164 | (20) |
|
Identifying the Core Work Using Work List |
|
|
165 | (6) |
|
Information Flow Paths in Bit Vector Frameworks |
|
|
171 | (2) |
|
Defining Complexity Using Information Flow Paths |
|
|
173 | (2) |
|
Information Flow Paths in Fast Frameworks |
|
|
175 | (4) |
|
Information Flow Paths in Non-separable Frameworks |
|
|
179 | (5) |
|
Summary and Concluding Remarks |
|
|
184 | (1) |
|
|
184 | (1) |
|
Single Static Assignment Form as Intermediate Representation |
|
|
185 | (46) |
|
|
185 | (4) |
|
|
186 | (2) |
|
Benefits of SSA Representation |
|
|
188 | (1) |
|
Construction of SSA Form Programs |
|
|
189 | (18) |
|
|
191 | (3) |
|
Placement of ø-instructions |
|
|
194 | (2) |
|
|
196 | (2) |
|
Correctness of the Algorithm |
|
|
198 | (9) |
|
|
207 | (20) |
|
An Algorithm for SSA Destruction |
|
|
209 | (7) |
|
SSA Destruction and Register Allocation |
|
|
216 | (11) |
|
Summary and Concluding Remarks |
|
|
227 | (1) |
|
|
228 | (3) |
|
II Interprocedural Data Flow Analysis |
|
|
231 | (100) |
|
Introduction to Interprocedural Data Flow Analysis |
|
|
233 | (26) |
|
|
233 | (1) |
|
Program Representations for Interprocedural Analysis |
|
|
234 | (2) |
|
Modeling Interprocedural Data Flow Analysis |
|
|
236 | (3) |
|
|
236 | (1) |
|
Inherited and Synthesized Data Flow Information |
|
|
237 | (1) |
|
Approaches to Interprocedural Data Flow Analysis |
|
|
238 | (1) |
|
Compromising Precision for Scalability |
|
|
239 | (5) |
|
Flow and Context Insensitivity |
|
|
240 | (4) |
|
|
244 | (1) |
|
Language Features Influencing Interprocedural Analysis |
|
|
244 | (2) |
|
Common Variants of Interprocedural Data Flow Analysis |
|
|
246 | (8) |
|
Intraprocedural Analysis with Conservative Interprocedural Approximation |
|
|
246 | (2) |
|
Intraprocedural Analysis with Side Effects Computation |
|
|
248 | (5) |
|
|
253 | (1) |
|
An Aside on Interprocedural Optimizations |
|
|
254 | (2) |
|
Summary and Concluding Remarks |
|
|
256 | (1) |
|
|
256 | (3) |
|
Functional Approach to Interprocedural Data Flow Analysis |
|
|
259 | (34) |
|
Side Effects Analysis of Procedure Calls |
|
|
259 | (7) |
|
Computing Flow Sensitive Side Effects |
|
|
261 | (2) |
|
Computing Flow Insensitive Side Effects |
|
|
263 | (3) |
|
Handling the Effects of Parameters |
|
|
266 | (8) |
|
Defining Aliasing of Parameters |
|
|
267 | (1) |
|
Formulating Alias Analysis of Parameters |
|
|
268 | (3) |
|
Augmenting Data Flow Analyses Using Parameter Aliases |
|
|
271 | (2) |
|
Efficient Parameter Alias Analysis |
|
|
273 | (1) |
|
|
274 | (16) |
|
Lattice of Flow Functions |
|
|
274 | (1) |
|
Reducing Function Compositions and Confluences |
|
|
275 | (3) |
|
Constructing Summary Flow Functions |
|
|
278 | (4) |
|
Computing Data Flow Information |
|
|
282 | (3) |
|
Enumerating Summary Flow Functions |
|
|
285 | (5) |
|
Summary and Concluding Remarks |
|
|
290 | (1) |
|
|
291 | (2) |
|
Value-Based Approach to Interprocedural Data Flow Analysis |
|
|
293 | (38) |
|
Program Model for Value-Based Approaches to Interprocedural Data Flow Analysis |
|
|
293 | (3) |
|
Interprocedural Analysis Using Restricted Contexts |
|
|
296 | (5) |
|
Interprocedural Analysis Using Unrestricted Contexts |
|
|
301 | (10) |
|
Using Call Strings to Represent Unrestricted Contexts |
|
|
302 | (3) |
|
Issues in Termination of Call String Construction |
|
|
305 | (6) |
|
Bounding Unrestricted Contexts Using Data Flow Values |
|
|
311 | (13) |
|
|
311 | (6) |
|
Value-Based Termination of Call String Construction |
|
|
317 | (7) |
|
The Motivating Example Revisited |
|
|
324 | (2) |
|
Summary and Concluding Remarks |
|
|
326 | (2) |
|
|
328 | (3) |
|
III Implementing Data Flow Analysis |
|
|
331 | (40) |
|
Implementing Data Flow Analysis in GCC |
|
|
333 | (38) |
|
Specifying a Data Flow Analysis |
|
|
333 | (7) |
|
Registering a Pass With the Pass Manager in GCC |
|
|
334 | (2) |
|
Specifying Available Expressions Analysis |
|
|
336 | (2) |
|
Specifying Other Bit Vector Data Flow Analyses |
|
|
338 | (2) |
|
An Example of Data Row Analysis |
|
|
340 | (12) |
|
Executing the Data Flow Analyzer |
|
|
341 | (1) |
|
Examining the Gimple Version of CFG |
|
|
342 | (4) |
|
Examining the Result of Data Flow Analysis |
|
|
346 | (6) |
|
Implementing the Generic Data Flow Analyzer gdfa |
|
|
352 | (11) |
|
|
352 | (2) |
|
|
354 | (4) |
|
|
358 | (1) |
|
|
358 | (2) |
|
Global Data Flow Analysis |
|
|
360 | (3) |
|
Extending the Generic Data Flow Analyzer gdfa |
|
|
363 | (2) |
|
|
365 | (6) |
|
|
365 | (1) |
|
|
366 | (2) |
|
|
368 | (3) |
References |
|
371 | (7) |
Index |
|
378 | |