2012-06-20 12:36:41 +02:00
|
|
|
================
|
|
|
|
The LLVM Lexicon
|
|
|
|
================
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
This document is a work in progress!
|
|
|
|
|
|
|
|
Definitions
|
|
|
|
===========
|
|
|
|
|
|
|
|
A
|
|
|
|
-
|
|
|
|
|
|
|
|
**ADCE**
|
|
|
|
Aggressive Dead Code Elimination
|
|
|
|
|
2013-02-13 22:17:20 +01:00
|
|
|
**AST**
|
|
|
|
Abstract Syntax Tree.
|
|
|
|
|
|
|
|
Due to Clang's influence (mostly the fact that parsing and semantic
|
|
|
|
analysis are so intertwined for C and especially C++), the typical
|
|
|
|
working definition of AST in the LLVM community is roughly "the
|
|
|
|
compiler's first complete symbolic (as opposed to textual)
|
|
|
|
representation of an input program".
|
|
|
|
As such, an "AST" might be a more general graph instead of a "tree"
|
|
|
|
(consider the symbolic representation for the type of a typical "linked
|
|
|
|
list node"). This working definition is closer to what some authors
|
|
|
|
call an "annotated abstract syntax tree".
|
|
|
|
|
|
|
|
Consult your favorite compiler book or search engine for more details.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
B
|
|
|
|
-
|
|
|
|
|
2012-12-12 00:13:23 +01:00
|
|
|
.. _lexicon-bb-vectorization:
|
|
|
|
|
2012-10-13 19:34:49 +02:00
|
|
|
**BB Vectorization**
|
2012-12-12 00:13:23 +01:00
|
|
|
Basic-Block Vectorization
|
2012-06-20 12:36:41 +02:00
|
|
|
|
2017-05-04 18:50:37 +02:00
|
|
|
**BDCE**
|
|
|
|
Bit-tracking dead code elimination. Some bit-wise instructions (shifts,
|
|
|
|
ands, ors, etc.) "kill" some of their input bits -- that is, they make it
|
|
|
|
such that those bits can be either zero or one without affecting control or
|
|
|
|
data flow of a program. The BDCE pass removes instructions that only
|
|
|
|
compute these dead bits.
|
|
|
|
|
2012-10-13 19:34:49 +02:00
|
|
|
**BURS**
|
2012-06-20 12:36:41 +02:00
|
|
|
Bottom Up Rewriting System --- A method of instruction selection for code
|
|
|
|
generation. An example is the `BURG
|
|
|
|
<http://www.program-transformation.org/Transform/BURG>`_ tool.
|
|
|
|
|
|
|
|
C
|
|
|
|
-
|
|
|
|
|
2015-05-21 00:04:06 +02:00
|
|
|
**CFI**
|
|
|
|
Call Frame Information. Used in DWARF debug info and in C++ unwind info
|
|
|
|
to show how the function prolog lays out the stack frame.
|
|
|
|
|
|
|
|
**CIE**
|
|
|
|
Common Information Entry. A kind of CFI used to reduce the size of FDEs.
|
|
|
|
The compiler creates a CIE which contains the information common across all
|
|
|
|
the FDEs. Each FDE then points to its CIE.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**CSE**
|
|
|
|
Common Subexpression Elimination. An optimization that removes common
|
2019-12-23 18:20:25 +01:00
|
|
|
subexpression computation. For example ``(a+b)*(a+b)`` has two
|
|
|
|
subexpressions that are the same: ``(a+b)``. This optimization would
|
|
|
|
perform the addition only once and then perform the multiply (but only if
|
|
|
|
it's computationally correct/safe).
|
2012-06-20 12:36:41 +02:00
|
|
|
|
|
|
|
D
|
|
|
|
-
|
|
|
|
|
|
|
|
**DAG**
|
|
|
|
Directed Acyclic Graph
|
|
|
|
|
|
|
|
.. _derived pointer:
|
|
|
|
.. _derived pointers:
|
|
|
|
|
|
|
|
**Derived Pointer**
|
|
|
|
A pointer to the interior of an object, such that a garbage collector is
|
|
|
|
unable to use the pointer for reachability analysis. While a derived pointer
|
|
|
|
is live, the corresponding object pointer must be kept in a root, otherwise
|
|
|
|
the collector might free the referenced object. With copying collectors,
|
|
|
|
derived pointers pose an additional hazard that they may be invalidated at
|
|
|
|
any `safe point`_. This term is used in opposition to `object pointer`_.
|
|
|
|
|
|
|
|
**DSA**
|
|
|
|
Data Structure Analysis
|
|
|
|
|
|
|
|
**DSE**
|
|
|
|
Dead Store Elimination
|
|
|
|
|
|
|
|
F
|
|
|
|
-
|
|
|
|
|
|
|
|
**FCA**
|
|
|
|
First Class Aggregate
|
|
|
|
|
2015-05-21 00:04:06 +02:00
|
|
|
**FDE**
|
|
|
|
Frame Description Entry. A kind of CFI used to describe the stack frame of
|
|
|
|
one function.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
G
|
|
|
|
-
|
|
|
|
|
|
|
|
**GC**
|
|
|
|
Garbage Collection. The practice of using reachability analysis instead of
|
|
|
|
explicit memory management to reclaim unused memory.
|
|
|
|
|
2017-08-18 17:35:53 +02:00
|
|
|
**GEP**
|
|
|
|
``GetElementPtr``. An LLVM IR instruction that is used to get the address
|
|
|
|
of a subelement of an aggregate data structure. It is documented in detail
|
|
|
|
`here <http://llvm.org/docs/GetElementPtr.html>`_.
|
|
|
|
|
2017-06-13 05:06:16 +02:00
|
|
|
**GVN**
|
|
|
|
Global Value Numbering. GVN is a pass that partitions values computed by a
|
|
|
|
function into congruence classes. Values ending up in the same congruence
|
|
|
|
class are guaranteed to be the same for every execution of the program.
|
|
|
|
In that respect, congruency is a compile-time approximation of equivalence
|
|
|
|
of values at runtime.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
H
|
|
|
|
-
|
|
|
|
|
|
|
|
.. _heap:
|
|
|
|
|
|
|
|
**Heap**
|
|
|
|
In garbage collection, the region of memory which is managed using
|
|
|
|
reachability analysis.
|
|
|
|
|
|
|
|
I
|
|
|
|
-
|
|
|
|
|
2018-04-05 16:08:16 +02:00
|
|
|
**ICE**
|
|
|
|
Internal Compiler Error. This abbreviation is used to describe errors
|
|
|
|
that occur in LLVM or Clang as they are compiling source code. For example,
|
|
|
|
if a valid C++ source program were to trigger an assert in Clang when
|
|
|
|
compiled, that could be referred to as an "ICE".
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**IPA**
|
|
|
|
Inter-Procedural Analysis. Refers to any variety of code analysis that
|
|
|
|
occurs between procedures, functions or compilation units (modules).
|
|
|
|
|
|
|
|
**IPO**
|
|
|
|
Inter-Procedural Optimization. Refers to any variety of code optimization
|
|
|
|
that occurs between procedures, functions or compilation units (modules).
|
|
|
|
|
|
|
|
**ISel**
|
|
|
|
Instruction Selection
|
|
|
|
|
|
|
|
L
|
|
|
|
-
|
|
|
|
|
|
|
|
**LCSSA**
|
|
|
|
Loop-Closed Static Single Assignment Form
|
|
|
|
|
2015-06-04 22:28:09 +02:00
|
|
|
**LGTM**
|
|
|
|
"Looks Good To Me". In a review thread, this indicates that the
|
|
|
|
reviewer thinks that the patch is okay to commit.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**LICM**
|
|
|
|
Loop Invariant Code Motion
|
|
|
|
|
2015-05-21 00:04:06 +02:00
|
|
|
**LSDA**
|
|
|
|
Language Specific Data Area. C++ "zero cost" unwinding is built on top a
|
|
|
|
generic unwinding mechanism. As the unwinder walks each frame, it calls
|
|
|
|
a "personality" function to do language specific analysis. Each function's
|
|
|
|
FDE points to an optional LSDA which is passed to the personality function.
|
|
|
|
For C++, the LSDA contain info about the type and location of catch
|
|
|
|
statements in that function.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**Load-VN**
|
|
|
|
Load Value Numbering
|
|
|
|
|
|
|
|
**LTO**
|
|
|
|
Link-Time Optimization
|
|
|
|
|
|
|
|
M
|
|
|
|
-
|
|
|
|
|
|
|
|
**MC**
|
|
|
|
Machine Code
|
|
|
|
|
2014-09-06 02:19:16 +02:00
|
|
|
N
|
|
|
|
-
|
2018-08-10 19:26:07 +02:00
|
|
|
.. _nfc:
|
2014-09-06 02:19:16 +02:00
|
|
|
|
|
|
|
**NFC**
|
|
|
|
"No functional change". Used in a commit message to indicate that a patch
|
|
|
|
is a pure refactoring/cleanup.
|
|
|
|
Usually used in the first line, so it is visible without opening the
|
|
|
|
actual commit email.
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
O
|
|
|
|
-
|
|
|
|
.. _object pointer:
|
|
|
|
.. _object pointers:
|
|
|
|
|
|
|
|
**Object Pointer**
|
|
|
|
A pointer to an object such that the garbage collector is able to trace
|
|
|
|
references contained within the object. This term is used in opposition to
|
|
|
|
`derived pointer`_.
|
|
|
|
|
|
|
|
P
|
|
|
|
-
|
|
|
|
|
2016-10-06 18:39:22 +02:00
|
|
|
**PR**
|
|
|
|
Problem report. A bug filed on `the LLVM Bug Tracking System
|
2017-02-17 09:26:11 +01:00
|
|
|
<https://bugs.llvm.org/enter_bug.cgi>`_.
|
2016-10-06 18:39:22 +02:00
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**PRE**
|
|
|
|
Partial Redundancy Elimination
|
|
|
|
|
|
|
|
R
|
|
|
|
-
|
|
|
|
|
|
|
|
**RAUW**
|
|
|
|
|
|
|
|
Replace All Uses With. The functions ``User::replaceUsesOfWith()``,
|
|
|
|
``Value::replaceAllUsesWith()``, and
|
|
|
|
``Constant::replaceUsesOfWithOnConstant()`` implement the replacement of one
|
|
|
|
Value with another by iterating over its def/use chain and fixing up all of
|
|
|
|
the pointers to point to the new value. See
|
2014-07-14 21:52:36 +02:00
|
|
|
also `def/use chains <ProgrammersManual.html#iterating-over-def-use-use-def-chains>`_.
|
2012-06-20 12:36:41 +02:00
|
|
|
|
|
|
|
**Reassociation**
|
|
|
|
Rearranging associative expressions to promote better redundancy elimination
|
|
|
|
and other optimization. For example, changing ``(A+B-A)`` into ``(B+A-A)``,
|
|
|
|
permitting it to be optimized into ``(B+0)`` then ``(B)``.
|
|
|
|
|
|
|
|
.. _roots:
|
|
|
|
.. _stack roots:
|
|
|
|
|
|
|
|
**Root**
|
|
|
|
In garbage collection, a pointer variable lying outside of the `heap`_ from
|
|
|
|
which the collector begins its reachability analysis. In the context of code
|
|
|
|
generation, "root" almost always refers to a "stack root" --- a local or
|
2012-10-13 19:34:49 +02:00
|
|
|
temporary variable within an executing function.
|
2012-06-20 12:36:41 +02:00
|
|
|
|
|
|
|
**RPO**
|
|
|
|
Reverse postorder
|
|
|
|
|
|
|
|
S
|
|
|
|
-
|
|
|
|
|
|
|
|
.. _safe point:
|
|
|
|
|
|
|
|
**Safe Point**
|
|
|
|
In garbage collection, it is necessary to identify `stack roots`_ so that
|
|
|
|
reachability analysis may proceed. It may be infeasible to provide this
|
|
|
|
information for every instruction, so instead the information may is
|
|
|
|
calculated only at designated safe points. With a copying collector,
|
|
|
|
`derived pointers`_ must not be retained across safe points and `object
|
|
|
|
pointers`_ must be reloaded from stack roots.
|
|
|
|
|
|
|
|
**SDISel**
|
|
|
|
Selection DAG Instruction Selection.
|
|
|
|
|
|
|
|
**SCC**
|
|
|
|
Strongly Connected Component
|
|
|
|
|
|
|
|
**SCCP**
|
|
|
|
Sparse Conditional Constant Propagation
|
|
|
|
|
2012-12-12 00:13:23 +01:00
|
|
|
**SLP**
|
|
|
|
Superword-Level Parallelism, same as :ref:`Basic-Block Vectorization
|
|
|
|
<lexicon-bb-vectorization>`.
|
|
|
|
|
2017-05-12 23:30:31 +02:00
|
|
|
**Splat**
|
|
|
|
Splat refers to a vector of identical scalar elements.
|
|
|
|
|
|
|
|
The term is based on the PowerPC Altivec instructions that provided
|
|
|
|
this functionality in hardware. For example, "vsplth" and the corresponding
|
|
|
|
software intrinsic "vec_splat()". Examples of other hardware names for this
|
|
|
|
action include "duplicate" (ARM) and "broadcast" (x86).
|
|
|
|
|
2012-06-20 12:36:41 +02:00
|
|
|
**SRoA**
|
|
|
|
Scalar Replacement of Aggregates
|
|
|
|
|
|
|
|
**SSA**
|
|
|
|
Static Single Assignment
|
|
|
|
|
|
|
|
**Stack Map**
|
|
|
|
In garbage collection, metadata emitted by the code generator which
|
|
|
|
identifies `roots`_ within the stack frame of an executing function.
|
2012-10-13 19:34:49 +02:00
|
|
|
|
|
|
|
T
|
|
|
|
-
|
|
|
|
|
|
|
|
**TBAA**
|
|
|
|
Type-Based Alias Analysis
|
|
|
|
|