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