1User Guides
2===========
3
4NOTE: If you are a user who is only interested in using an LLVM-based compiler,
5you should look into `Clang <https://clang.llvm.org>`_ instead. The
6documentation here is intended for users who have a need to work with the
7intermediate LLVM representation.
8
9.. contents::
10   :local:
11
12.. toctree::
13   :hidden:
14
15   AddingConstrainedIntrinsics
16   AdvancedBuilds
17   AliasAnalysis
18   AMDGPUUsage
19   Benchmarking
20   BigEndianNEON
21   BuildingADistribution
22   CFIVerify
23   CMake
24   CMakePrimer
25   CodeGenerator
26   CodeOfConduct
27   CommandLine
28   CompileCudaWithLLVM
29   CoverageMappingFormat
30   CycleTerminology
31   DebuggingJITedCode
32   Docker
33   ExtendingLLVM
34   GoldPlugin
35   HowToBuildOnARM
36   HowToBuildWithPGO
37   HowToBuildWindowsItaniumPrograms
38   HowToCrossCompileBuiltinsOnArm
39   HowToCrossCompileLLVM
40   HowToUpdateDebugInfo
41   LinkTimeOptimization
42   LoopTerminology
43   MarkdownQuickstartTemplate
44   MemorySSA
45   MergeFunctions
46   MCJITDesignAndImplementation
47   MisExpect
48   ORCv2
49   OpaquePointers
50   JITLink
51   NewPassManager
52   NVPTXUsage
53   Phabricator
54   Passes
55   ReportingGuide
56   ResponseGuide
57   Remarks
58   SourceLevelDebugging
59   StackSafetyAnalysis
60   SupportLibrary
61   TableGen/index
62   TableGenFundamentals
63   Vectorizers
64   WritingAnLLVMPass
65   WritingAnLLVMNewPMPass
66   WritingAnLLVMBackend
67   yaml2obj
68
69Clang
70-----
71
72:doc:`HowToBuildOnARM`
73   Notes on building and testing LLVM/Clang on ARM.
74
75:doc:`HowToBuildWithPGO`
76    Notes on building LLVM/Clang with PGO.
77
78:doc:`HowToCrossCompileLLVM`
79   Notes on cross-building and testing LLVM/Clang.
80
81`How to build the C, C++, ObjC, and ObjC++ front end`__
82   Instructions for building the clang front-end from source.
83
84   .. __: https://clang.llvm.org/get_started.html
85
86:doc:`CoverageMappingFormat`
87  This describes the format and encoding used for LLVM’s code coverage mapping.
88
89:doc:`CFIVerify`
90  A description of the verification tool for Control Flow Integrity.
91
92LLVM Builds and Distributions
93-----------------------------
94
95:doc:`BuildingADistribution`
96  A best-practices guide for using LLVM's CMake build system to package and
97  distribute LLVM-based tools.
98
99:doc:`CMake`
100   An addendum to the main Getting Started guide for those using the `CMake
101   build system <http://www.cmake.org>`_.
102
103:doc:`Docker`
104   A reference for using Dockerfiles provided with LLVM.
105
106:doc:`Support Library <SupportLibrary>`
107   This document describes the LLVM Support Library (``lib/Support``) and
108   how to keep LLVM source code portable.
109
110:doc:`AdvancedBuilds`
111   This document describes more advanced build configurations.
112
113Optimizations
114-------------
115
116:doc:`WritingAnLLVMPass`
117   Information on how to write LLVM transformations and analyses.
118
119:doc:`WritingAnLLVMNewPMPass`
120   Information on how to write LLVM transformations under the new pass
121   manager.
122
123:doc:`Passes`
124   A list of optimizations and analyses implemented in LLVM.
125
126:doc:`StackSafetyAnalysis`
127  This document describes the design of the stack safety analysis of local
128  variables.
129
130:doc:`MergeFunctions`
131  Describes functions merging optimization.
132
133:doc:`AliasAnalysis`
134   Information on how to write a new alias analysis implementation or how to
135   use existing analyses.
136
137:doc:`MemorySSA`
138   Information about the MemorySSA utility in LLVM, as well as how to use it.
139
140:doc:`LoopTerminology`
141  A document describing Loops and associated terms as used in LLVM.
142
143:doc:`CycleTerminology`
144  A document describing cycles as a generalization of loops.
145
146:doc:`Vectorizers`
147   This document describes the current status of vectorization in LLVM.
148
149:doc:`LinkTimeOptimization`
150   This document describes the interface between LLVM intermodular optimizer
151   and the linker and its design
152
153:doc:`GoldPlugin`
154   How to build your programs with link-time optimization on Linux.
155
156:doc:`Remarks`
157   A reference on the implementation of remarks in LLVM.
158
159:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
160   This document describes the design and philosophy behind the LLVM
161   source-level debugger.
162
163Code Generation
164---------------
165
166:doc:`WritingAnLLVMBackend`
167   Information on how to write LLVM backends for machine targets.
168
169:doc:`CodeGenerator`
170   The design and implementation of the LLVM code generator.  Useful if you are
171   working on retargetting LLVM to a new architecture, designing a new codegen
172   pass, or enhancing existing components.
173
174:doc:`TableGen <TableGen/index>`
175   Describes the TableGen tool, which is used heavily by the LLVM code
176   generator.
177
178===
179JIT
180===
181
182:doc:`MCJITDesignAndImplementation`
183   Describes the inner workings of MCJIT execution engine.
184
185:doc:`ORCv2`
186   Describes the design and implementation of the ORC APIs, including some
187   usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
188
189:doc:`JITLink`
190   Describes the design and APIs for the JITLink library, ORC's new JIT
191   linker.
192
193:doc:`DebuggingJITedCode`
194   How to debug JITed code with GDB.
195
196Additional Topics
197-----------------
198
199:doc:`CommandLine`
200  Provides information on using the command line parsing library.
201
202:doc:`ExtendingLLVM`
203  Look here to see how to add instructions and intrinsics to LLVM.
204
205:doc:`AddingConstrainedIntrinsics`
206   Gives the steps necessary when adding a new constrained math intrinsic
207   to LLVM.
208
209:doc:`HowToBuildWindowsItaniumPrograms`
210   Notes on assembling a Windows Itanium environment.
211
212:doc:`HowToCrossCompileBuiltinsOnArm`
213   Notes on cross-building and testing the compiler-rt builtins for Arm.
214
215:doc:`BigEndianNEON`
216  LLVM's support for generating NEON instructions on big endian ARM targets is
217  somewhat nonintuitive. This document explains the implementation and rationale.
218
219:doc:`CompileCudaWithLLVM`
220  LLVM support for CUDA.
221
222:doc:`NVPTXUsage`
223   This document describes using the NVPTX backend to compile GPU kernels.
224
225:doc:`AMDGPUUsage`
226   This document describes using the AMDGPU backend to compile GPU kernels.
227
228:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
229   This document describes DWARF extensions to support heterogeneous debugging
230   for targets such as the AMDGPU backend.
231
232:doc:`AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack`
233   This document describes a DWARF extension to allow location descriptions on
234   the DWARF expression stack. It is part of
235   :doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`.
236