xref: /llvm-project/llvm/docs/UserGuides.rst (revision dbae7176a6ecf558dc5e92016cdda387c9d74d66)
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   AArch64SME
16   AddingConstrainedIntrinsics
17   AdvancedBuilds
18   AliasAnalysis
19   AMDGPUUsage
20   Benchmarking
21   BigEndianNEON
22   BuildingADistribution
23   CFIVerify
24   CMake
25   CMakePrimer
26   CodeGenerator
27   CodeOfConduct
28   CommandLine
29   CompileCudaWithLLVM
30   CoverageMappingFormat
31   CycleTerminology
32   DebuggingJITedCode
33   DirectXUsage
34   Docker
35   FatLTO
36   ExtendingLLVM
37   GitHub
38   GoldPlugin
39   GlobalISel/MIRPatterns
40   HowToBuildOnARM
41   HowToBuildWithPGO
42   HowToBuildWindowsItaniumPrograms
43   HowToCrossCompileBuiltinsOnArm
44   HowToCrossCompileLLVM
45   HowToUpdateDebugInfo
46   InstCombineContributorGuide
47   InstrProfileFormat
48   InstrRefDebugInfo
49   LinkTimeOptimization
50   LoopTerminology
51   MarkdownQuickstartTemplate
52   MemorySSA
53   MergeFunctions
54   MCJITDesignAndImplementation
55   MisExpect
56   ORCv2
57   OpaquePointers
58   JITLink
59   NewPassManager
60   NVPTXUsage
61   Passes
62   ReportingGuide
63   ResponseGuide
64   Remarks
65   RemoveDIsDebugInfo
66   RISCVUsage
67   RISCV/RISCVVectorExtension
68   SourceLevelDebugging
69   SPIRVUsage
70   SandboxIR
71   StackSafetyAnalysis
72   SupportLibrary
73   TableGen/index
74   TableGenFundamentals
75   Telemetry
76   Vectorizers
77   WritingAnLLVMPass
78   WritingAnLLVMNewPMPass
79   WritingAnLLVMBackend
80   yaml2obj
81
82Clang
83-----
84
85:doc:`HowToBuildOnARM`
86   Notes on building and testing LLVM/Clang on ARM.
87
88:doc:`HowToBuildWithPGO`
89    Notes on building LLVM/Clang with PGO.
90
91:doc:`HowToCrossCompileLLVM`
92   Notes on cross-building and testing LLVM/Clang.
93
94`How to build the C, C++, ObjC, and ObjC++ front end`__
95   Instructions for building the clang front-end from source.
96
97   .. __: https://clang.llvm.org/get_started.html
98
99:doc:`CoverageMappingFormat`
100  This describes the format and encoding used for LLVM’s code coverage mapping.
101
102:doc:`CFIVerify`
103  A description of the verification tool for Control Flow Integrity.
104
105LLVM Builds and Distributions
106-----------------------------
107
108:doc:`BuildingADistribution`
109  A best-practices guide for using LLVM's CMake build system to package and
110  distribute LLVM-based tools.
111
112:doc:`CMake`
113   An addendum to the main Getting Started guide for those using the `CMake
114   build system <http://www.cmake.org>`_.
115
116:doc:`Docker`
117   A reference for using Dockerfiles provided with LLVM.
118
119:doc:`Support Library <SupportLibrary>`
120   This document describes the LLVM Support Library (``lib/Support``) and
121   how to keep LLVM source code portable.
122
123:doc:`AdvancedBuilds`
124   This document describes more advanced build configurations.
125
126Optimizations
127-------------
128
129:doc:`WritingAnLLVMNewPMPass`
130   Information on how to write LLVM transformations under the new pass
131   manager.
132
133:doc:`WritingAnLLVMPass`
134   Information on how to write LLVM transformations and analyses under the
135   legacy pass manager.
136
137:doc:`Passes`
138   A list of optimizations and analyses implemented in LLVM.
139
140:doc:`StackSafetyAnalysis`
141  This document describes the design of the stack safety analysis of local
142  variables.
143
144:doc:`MergeFunctions`
145  Describes functions merging optimization.
146
147:doc:`AliasAnalysis`
148   Information on how to write a new alias analysis implementation or how to
149   use existing analyses.
150
151:doc:`MemorySSA`
152   Information about the MemorySSA utility in LLVM, as well as how to use it.
153
154:doc:`LoopTerminology`
155  A document describing Loops and associated terms as used in LLVM.
156
157:doc:`CycleTerminology`
158  A document describing cycles as a generalization of loops.
159
160:doc:`Vectorizers`
161   This document describes the current status of vectorization in LLVM.
162
163:doc:`LinkTimeOptimization`
164   This document describes the interface between LLVM intermodular optimizer
165   and the linker and its design
166
167:doc:`GoldPlugin`
168   How to build your programs with link-time optimization on Linux.
169
170:doc:`Remarks`
171   A reference on the implementation of remarks in LLVM.
172
173:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
174   This document describes the design and philosophy behind the LLVM
175   source-level debugger.
176
177:doc:`How to Update Debug Info <HowToUpdateDebugInfo>`
178   This document specifies how to correctly update debug info in various kinds
179   of code transformations.
180
181:doc:`InstrRefDebugInfo`
182   This document explains how LLVM uses value tracking, or instruction
183   referencing, to determine variable locations for debug info in the final
184   stages of compilation.
185
186:doc:`RemoveDIsDebugInfo`
187   This is a migration guide describing how to move from debug info using
188   intrinsics such as dbg.value to using the non-instruction DbgRecord object.
189
190:doc:`InstrProfileFormat`
191   This document explains two binary formats of instrumentation-based profiles.
192
193:doc:`InstCombineContributorGuide`
194   This document specifies guidelines for contributions for InstCombine and
195   related passes.
196
197
198Code Generation
199---------------
200
201:doc:`WritingAnLLVMBackend`
202   Information on how to write LLVM backends for machine targets.
203
204:doc:`CodeGenerator`
205   The design and implementation of the LLVM code generator.  Useful if you are
206   working on retargetting LLVM to a new architecture, designing a new codegen
207   pass, or enhancing existing components.
208
209:doc:`TableGen <TableGen/index>`
210   Describes the TableGen tool, which is used heavily by the LLVM code
211   generator.
212
213==========
214GlobalISel
215==========
216
217:doc:`MIRPatterns <GlobalISel/MIRPatterns>`
218   Describes the design of MIR Patterns and how to use them.
219
220===
221JIT
222===
223
224:doc:`MCJITDesignAndImplementation`
225   Describes the inner workings of MCJIT execution engine.
226
227:doc:`ORCv2`
228   Describes the design and implementation of the ORC APIs, including some
229   usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
230
231:doc:`JITLink`
232   Describes the design and APIs for the JITLink library, ORC's new JIT
233   linker.
234
235:doc:`DebuggingJITedCode`
236   How to debug JITed code with GDB.
237
238Additional Topics
239-----------------
240
241:doc:`CommandLine`
242  Provides information on using the command line parsing library.
243
244:doc:`ExtendingLLVM`
245  Look here to see how to add instructions and intrinsics to LLVM.
246
247:doc:`AddingConstrainedIntrinsics`
248   Gives the steps necessary when adding a new constrained math intrinsic
249   to LLVM.
250
251:doc:`HowToBuildWindowsItaniumPrograms`
252   Notes on assembling a Windows Itanium environment.
253
254:doc:`HowToCrossCompileBuiltinsOnArm`
255   Notes on cross-building and testing the compiler-rt builtins for Arm.
256
257:doc:`BigEndianNEON`
258  LLVM's support for generating NEON instructions on big endian ARM targets is
259  somewhat nonintuitive. This document explains the implementation and rationale.
260
261:doc:`AArch64SME`
262  LLVM's support for AArch64 SME ACLE and ABI.
263
264:doc:`CompileCudaWithLLVM`
265  LLVM support for CUDA.
266
267:doc:`NVPTXUsage`
268   This document describes using the NVPTX backend to compile GPU kernels.
269
270:doc:`AMDGPUUsage`
271   This document describes using the AMDGPU backend to compile GPU kernels.
272
273:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
274   This document describes DWARF extensions to support heterogeneous debugging
275   for targets such as the AMDGPU backend.
276
277:doc:`AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack`
278   This document describes a DWARF extension to allow location descriptions on
279   the DWARF expression stack. It is part of
280   :doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`.
281
282:doc:`SPIRVUsage`
283   This document describes using the SPIR-V target to compile GPU kernels.
284
285:doc:`DirectXUsage`
286   This document describes using the DirectX target to compile GPU code for the
287   DirectX runtime.
288
289:doc:`RISCVUsage`
290   This document describes using the RISC-V target.
291
292:doc:`RISCV/RISCVVectorExtension`
293   This document describes how the RISC-V Vector extension can be expressed in LLVM IR and how code is generated for it in the backend.
294
295:doc:`Sandbox IR <SandboxIR>`
296   This document describes the design and usage of Sandbox IR, a transactional layer over LLVM IR.
297
298:doc:`Telemetry`
299   This document describes the Telemetry framework in LLVM.
300