blob: 00e99db297f780b518fe2825a20e92f4c92a7760 [file] [log] [blame]
DeForest Richardse3e66242019-09-05 17:30:52 +00001User Guides
2===========
3
DeForest Richardse3e66242019-09-05 17:30:52 +00004NOTE: If you are a user who is only interested in using an LLVM-based compiler,
Sylvestre Ledru72fd1032020-03-22 22:42:03 +01005you should look into `Clang <https://clang.llvm.org>`_ instead. The
DeForest Richardse3e66242019-09-05 17:30:52 +00006documentation here is intended for users who have a need to work with the
7intermediate LLVM representation.
8
DeForest Richards6d196512019-10-06 15:36:37 +00009.. contents::
10 :local:
11
DeForest Richardse3e66242019-09-05 17:30:52 +000012.. toctree::
13 :hidden:
14
DeForest Richards38d16c12019-10-06 22:49:22 +000015 AddingConstrainedIntrinsics
16 AdvancedBuilds
17 AliasAnalysis
18 AMDGPUUsage
19 Benchmarking
20 BigEndianNEON
21 BuildingADistribution
DeForest Richards22373c52019-10-13 20:05:22 +000022 CFIVerify
DeForest Richardse3e66242019-09-05 17:30:52 +000023 CMake
24 CMakePrimer
DeForest Richards38d16c12019-10-06 22:49:22 +000025 CodeGenerator
26 CodeOfConduct
27 CommandLine
28 CompileCudaWithLLVM
29 CoverageMappingFormat
30 DebuggingJITedCode
31 Docker
32 ExtendingLLVM
33 GoldPlugin
DeForest Richardse3e66242019-09-05 17:30:52 +000034 HowToBuildOnARM
35 HowToBuildWithPGO
36 HowToCrossCompileBuiltinsOnArm
37 HowToCrossCompileLLVM
Vedant Kumarb429a0f2020-05-15 17:13:18 -070038 HowToUpdateDebugInfo
DeForest Richards38d16c12019-10-06 22:49:22 +000039 LinkTimeOptimization
40 LoopTerminology
DeForest Richardse3e66242019-09-05 17:30:52 +000041 MarkdownQuickstartTemplate
DeForest Richardsedbb8952019-10-09 21:09:09 +000042 MemorySSA
DeForest Richards38d16c12019-10-06 22:49:22 +000043 MergeFunctions
44 MCJITDesignAndImplementation
45 NVPTXUsage
DeForest Richardse3e66242019-09-05 17:30:52 +000046 Phabricator
DeForest Richardse3e66242019-09-05 17:30:52 +000047 Passes
DeForest Richardse3e66242019-09-05 17:30:52 +000048 ReportingGuide
DeForest Richardse3e66242019-09-05 17:30:52 +000049 Remarks
DeForest Richards38d16c12019-10-06 22:49:22 +000050 SourceLevelDebugging
DeForest Richardsedbb8952019-10-09 21:09:09 +000051 StackSafetyAnalysis
52 SupportLibrary
DeForest Richards38d16c12019-10-06 22:49:22 +000053 TableGen/index
54 TableGenFundamentals
55 Vectorizers
DeForest Richards6d196512019-10-06 15:36:37 +000056 WritingAnLLVMPass
Arthur Eubanks10b12d42020-08-31 18:36:11 -070057 WritingAnLLVMNewPMPass
DeForest Richards6d196512019-10-06 15:36:37 +000058 WritingAnLLVMBackend
DeForest Richards38d16c12019-10-06 22:49:22 +000059 yaml2obj
DeForest Richardse3e66242019-09-05 17:30:52 +000060
DeForest Richards2605f8c2019-09-27 19:12:00 +000061Clang
DeForest Richards6d196512019-10-06 15:36:37 +000062-----
DeForest Richards2605f8c2019-09-27 19:12:00 +000063
DeForest Richardse3e66242019-09-05 17:30:52 +000064:doc:`HowToBuildOnARM`
65 Notes on building and testing LLVM/Clang on ARM.
66
67:doc:`HowToBuildWithPGO`
68 Notes on building LLVM/Clang with PGO.
69
DeForest Richardse3e66242019-09-05 17:30:52 +000070:doc:`HowToCrossCompileLLVM`
71 Notes on cross-building and testing LLVM/Clang.
72
DeForest Richards2605f8c2019-09-27 19:12:00 +000073`How to build the C, C++, ObjC, and ObjC++ front end`__
74 Instructions for building the clang front-end from source.
75
Sylvestre Ledru72fd1032020-03-22 22:42:03 +010076 .. __: https://clang.llvm.org/get_started.html
DeForest Richards2605f8c2019-09-27 19:12:00 +000077
DeForest Richards38d16c12019-10-06 22:49:22 +000078:doc:`CoverageMappingFormat`
79 This describes the format and encoding used for LLVM’s code coverage mapping.
80
DeForest Richards22373c52019-10-13 20:05:22 +000081:doc:`CFIVerify`
82 A description of the verification tool for Control Flow Integrity.
83
DeForest Richards6d196512019-10-06 15:36:37 +000084LLVM Builds and Distributions
85-----------------------------
86
87:doc:`BuildingADistribution`
88 A best-practices guide for using LLVM's CMake build system to package and
89 distribute LLVM-based tools.
90
91:doc:`CMake`
92 An addendum to the main Getting Started guide for those using the `CMake
93 build system <http://www.cmake.org>`_.
DeForest Richards2605f8c2019-09-27 19:12:00 +000094
95:doc:`Docker`
96 A reference for using Dockerfiles provided with LLVM.
97
DeForest Richardsedbb8952019-10-09 21:09:09 +000098:doc:`Support Library <SupportLibrary>`
99 This document describes the LLVM Support Library (``lib/Support``) and
Yuanfang Chenf9ea86e2020-06-01 17:09:40 -0700100 how to keep LLVM source code portable.
101
102:doc:`AdvancedBuilds`
103 This document describes more advanced build configurations.
DeForest Richardsedbb8952019-10-09 21:09:09 +0000104
DeForest Richards6d196512019-10-06 15:36:37 +0000105Optimizations
106-------------
DeForest Richards2605f8c2019-09-27 19:12:00 +0000107
DeForest Richards6d196512019-10-06 15:36:37 +0000108:doc:`WritingAnLLVMPass`
109 Information on how to write LLVM transformations and analyses.
DeForest Richards2605f8c2019-09-27 19:12:00 +0000110
Arthur Eubanks10b12d42020-08-31 18:36:11 -0700111:doc:`WritingAnLLVMNewPMPass`
112 Information on how to write LLVM transformations under the new pass
113 manager.
114
DeForest Richardse3e66242019-09-05 17:30:52 +0000115:doc:`Passes`
116 A list of optimizations and analyses implemented in LLVM.
117
DeForest Richards38d16c12019-10-06 22:49:22 +0000118:doc:`StackSafetyAnalysis`
119 This document describes the design of the stack safety analysis of local
120 variables.
121
122:doc:`MergeFunctions`
123 Describes functions merging optimization.
124
125:doc:`AliasAnalysis`
126 Information on how to write a new alias analysis implementation or how to
127 use existing analyses.
128
DeForest Richardsedbb8952019-10-09 21:09:09 +0000129:doc:`MemorySSA`
130 Information about the MemorySSA utility in LLVM, as well as how to use it.
131
DeForest Richards6d196512019-10-06 15:36:37 +0000132:doc:`LoopTerminology`
133 A document describing Loops and associated terms as used in LLVM.
DeForest Richardse3e66242019-09-05 17:30:52 +0000134
DeForest Richards38d16c12019-10-06 22:49:22 +0000135:doc:`Vectorizers`
136 This document describes the current status of vectorization in LLVM.
137
138:doc:`LinkTimeOptimization`
139 This document describes the interface between LLVM intermodular optimizer
140 and the linker and its design
141
142:doc:`GoldPlugin`
143 How to build your programs with link-time optimization on Linux.
144
DeForest Richardse3e66242019-09-05 17:30:52 +0000145:doc:`Remarks`
DeForest Richards6d196512019-10-06 15:36:37 +0000146 A reference on the implementation of remarks in LLVM.
147
DeForest Richards38d16c12019-10-06 22:49:22 +0000148:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
149 This document describes the design and philosophy behind the LLVM
150 source-level debugger.
151
DeForest Richards6d196512019-10-06 15:36:37 +0000152Code Generation
153---------------
154
155:doc:`WritingAnLLVMBackend`
156 Information on how to write LLVM backends for machine targets.
157
158:doc:`CodeGenerator`
159 The design and implementation of the LLVM code generator. Useful if you are
160 working on retargetting LLVM to a new architecture, designing a new codegen
161 pass, or enhancing existing components.
162
163:doc:`TableGen <TableGen/index>`
164 Describes the TableGen tool, which is used heavily by the LLVM code
165 generator.
166
DeForest Richards38d16c12019-10-06 22:49:22 +0000167===
168JIT
169===
170
171:doc:`MCJITDesignAndImplementation`
172 Describes the inner workings of MCJIT execution engine.
173
174:doc:`DebuggingJITedCode`
175 How to debug JITed code with GDB.
176
DeForest Richards6d196512019-10-06 15:36:37 +0000177Additional Topics
178-----------------
179
DeForest Richardsde0e3aa2019-10-06 16:10:11 +0000180:doc:`CommandLine`
181 Provides information on using the command line parsing library.
182
183:doc:`ExtendingLLVM`
184 Look here to see how to add instructions and intrinsics to LLVM.
185
DeForest Richards38d16c12019-10-06 22:49:22 +0000186:doc:`AddingConstrainedIntrinsics`
187 Gives the steps necessary when adding a new constrained math intrinsic
188 to LLVM.
189
DeForest Richards6d196512019-10-06 15:36:37 +0000190:doc:`HowToCrossCompileBuiltinsOnArm`
191 Notes on cross-building and testing the compiler-rt builtins for Arm.
192
DeForest Richards38d16c12019-10-06 22:49:22 +0000193:doc:`BigEndianNEON`
194 LLVM's support for generating NEON instructions on big endian ARM targets is
195 somewhat nonintuitive. This document explains the implementation and rationale.
196
197:doc:`CompileCudaWithLLVM`
198 LLVM support for CUDA.
199
DeForest Richards6d196512019-10-06 15:36:37 +0000200:doc:`NVPTXUsage`
201 This document describes using the NVPTX backend to compile GPU kernels.
202
203:doc:`AMDGPUUsage`
Tony1eac2c52020-04-14 00:55:43 -0400204 This document describes using the AMDGPU backend to compile GPU kernels.
205
Tony629467e2020-07-30 05:10:21 +0000206:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
207 This document describes DWARF extensions to support heterogeneous debugging
Vedant Kumarb429a0f2020-05-15 17:13:18 -0700208 for targets such as the AMDGPU backend.