7 This document is a work in progress!
16 Aggressive Dead Code Elimination
21 Due to Clang's influence (mostly the fact that parsing and semantic
22 analysis are so intertwined for C and especially C++), the typical
23 working definition of AST in the LLVM community is roughly "the
24 compiler's first complete symbolic (as opposed to textual)
25 representation of an input program".
26 As such, an "AST" might be a more general graph instead of a "tree"
27 (consider the symbolic representation for the type of a typical "linked
28 list node"). This working definition is closer to what some authors
29 call an "annotated abstract syntax tree".
31 Consult your favorite compiler book or search engine for more details.
36 .. _lexicon-bb-vectorization:
39 Basic-Block Vectorization
42 Bottom Up Rewriting System --- A method of instruction selection for code
43 generation. An example is the `BURG
44 <http://www.program-transformation.org/Transform/BURG>`_ tool.
50 Call Frame Information. Used in DWARF debug info and in C++ unwind info
51 to show how the function prolog lays out the stack frame.
54 Common Information Entry. A kind of CFI used to reduce the size of FDEs.
55 The compiler creates a CIE which contains the information common across all
56 the FDEs. Each FDE then points to its CIE.
59 Common Subexpression Elimination. An optimization that removes common
60 subexpression compuation. For example ``(a+b)*(a+b)`` has two subexpressions
61 that are the same: ``(a+b)``. This optimization would perform the addition
62 only once and then perform the multiply (but only if it's computationally
69 Directed Acyclic Graph
75 A pointer to the interior of an object, such that a garbage collector is
76 unable to use the pointer for reachability analysis. While a derived pointer
77 is live, the corresponding object pointer must be kept in a root, otherwise
78 the collector might free the referenced object. With copying collectors,
79 derived pointers pose an additional hazard that they may be invalidated at
80 any `safe point`_. This term is used in opposition to `object pointer`_.
83 Data Structure Analysis
86 Dead Store Elimination
95 Frame Description Entry. A kind of CFI used to describe the stack frame of
102 Garbage Collection. The practice of using reachability analysis instead of
103 explicit memory management to reclaim unused memory.
111 In garbage collection, the region of memory which is managed using
112 reachability analysis.
118 Inter-Procedural Analysis. Refers to any variety of code analysis that
119 occurs between procedures, functions or compilation units (modules).
122 Inter-Procedural Optimization. Refers to any variety of code optimization
123 that occurs between procedures, functions or compilation units (modules).
126 Instruction Selection
132 Loop-Closed Static Single Assignment Form
135 "Looks Good To Me". In a review thread, this indicates that the
136 reviewer thinks that the patch is okay to commit.
139 Loop Invariant Code Motion
142 Language Specific Data Area. C++ "zero cost" unwinding is built on top a
143 generic unwinding mechanism. As the unwinder walks each frame, it calls
144 a "personality" function to do language specific analysis. Each function's
145 FDE points to an optional LSDA which is passed to the personality function.
146 For C++, the LSDA contain info about the type and location of catch
147 statements in that function.
153 Link-Time Optimization
165 "No functional change". Used in a commit message to indicate that a patch
166 is a pure refactoring/cleanup.
167 Usually used in the first line, so it is visible without opening the
176 A pointer to an object such that the garbage collector is able to trace
177 references contained within the object. This term is used in opposition to
184 Partial Redundancy Elimination
191 Replace All Uses With. The functions ``User::replaceUsesOfWith()``,
192 ``Value::replaceAllUsesWith()``, and
193 ``Constant::replaceUsesOfWithOnConstant()`` implement the replacement of one
194 Value with another by iterating over its def/use chain and fixing up all of
195 the pointers to point to the new value. See
196 also `def/use chains <ProgrammersManual.html#iterating-over-def-use-use-def-chains>`_.
199 Rearranging associative expressions to promote better redundancy elimination
200 and other optimization. For example, changing ``(A+B-A)`` into ``(B+A-A)``,
201 permitting it to be optimized into ``(B+0)`` then ``(B)``.
207 In garbage collection, a pointer variable lying outside of the `heap`_ from
208 which the collector begins its reachability analysis. In the context of code
209 generation, "root" almost always refers to a "stack root" --- a local or
210 temporary variable within an executing function.
221 In garbage collection, it is necessary to identify `stack roots`_ so that
222 reachability analysis may proceed. It may be infeasible to provide this
223 information for every instruction, so instead the information may is
224 calculated only at designated safe points. With a copying collector,
225 `derived pointers`_ must not be retained across safe points and `object
226 pointers`_ must be reloaded from stack roots.
229 Selection DAG Instruction Selection.
232 Strongly Connected Component
235 Sparse Conditional Constant Propagation
238 Superword-Level Parallelism, same as :ref:`Basic-Block Vectorization
239 <lexicon-bb-vectorization>`.
242 Scalar Replacement of Aggregates
245 Static Single Assignment
248 In garbage collection, metadata emitted by the code generator which
249 identifies `roots`_ within the stack frame of an executing function.
255 Type-Based Alias Analysis