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 Common Subexpression Elimination. An optimization that removes common
51 subexpression compuation. For example ``(a+b)*(a+b)`` has two subexpressions
52 that are the same: ``(a+b)``. This optimization would perform the addition
53 only once and then perform the multiply (but only if it's computationally
60 Directed Acyclic Graph
66 A pointer to the interior of an object, such that a garbage collector is
67 unable to use the pointer for reachability analysis. While a derived pointer
68 is live, the corresponding object pointer must be kept in a root, otherwise
69 the collector might free the referenced object. With copying collectors,
70 derived pointers pose an additional hazard that they may be invalidated at
71 any `safe point`_. This term is used in opposition to `object pointer`_.
74 Data Structure Analysis
77 Dead Store Elimination
89 Garbage Collection. The practice of using reachability analysis instead of
90 explicit memory management to reclaim unused memory.
98 In garbage collection, the region of memory which is managed using
99 reachability analysis.
105 Inter-Procedural Analysis. Refers to any variety of code analysis that
106 occurs between procedures, functions or compilation units (modules).
109 Inter-Procedural Optimization. Refers to any variety of code optimization
110 that occurs between procedures, functions or compilation units (modules).
113 Instruction Selection
119 Loop-Closed Static Single Assignment Form
122 Loop Invariant Code Motion
128 Link-Time Optimization
140 "No functional change". Used in a commit message to indicate that a patch
141 is a pure refactoring/cleanup.
142 Usually used in the first line, so it is visible without opening the
151 A pointer to an object such that the garbage collector is able to trace
152 references contained within the object. This term is used in opposition to
159 Partial Redundancy Elimination
166 Replace All Uses With. The functions ``User::replaceUsesOfWith()``,
167 ``Value::replaceAllUsesWith()``, and
168 ``Constant::replaceUsesOfWithOnConstant()`` implement the replacement of one
169 Value with another by iterating over its def/use chain and fixing up all of
170 the pointers to point to the new value. See
171 also `def/use chains <ProgrammersManual.html#iterating-over-def-use-use-def-chains>`_.
174 Rearranging associative expressions to promote better redundancy elimination
175 and other optimization. For example, changing ``(A+B-A)`` into ``(B+A-A)``,
176 permitting it to be optimized into ``(B+0)`` then ``(B)``.
182 In garbage collection, a pointer variable lying outside of the `heap`_ from
183 which the collector begins its reachability analysis. In the context of code
184 generation, "root" almost always refers to a "stack root" --- a local or
185 temporary variable within an executing function.
196 In garbage collection, it is necessary to identify `stack roots`_ so that
197 reachability analysis may proceed. It may be infeasible to provide this
198 information for every instruction, so instead the information may is
199 calculated only at designated safe points. With a copying collector,
200 `derived pointers`_ must not be retained across safe points and `object
201 pointers`_ must be reloaded from stack roots.
204 Selection DAG Instruction Selection.
207 Strongly Connected Component
210 Sparse Conditional Constant Propagation
213 Superword-Level Parallelism, same as :ref:`Basic-Block Vectorization
214 <lexicon-bb-vectorization>`.
217 Scalar Replacement of Aggregates
220 Static Single Assignment
223 In garbage collection, metadata emitted by the code generator which
224 identifies `roots`_ within the stack frame of an executing function.
230 Type-Based Alias Analysis