2019-09-05 19:30:52 +02:00
|
|
|
|
User Guides
|
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|
NOTE: If you are a user who is only interested in using an LLVM-based compiler,
|
2020-03-22 22:42:03 +01:00
|
|
|
|
you should look into `Clang <https://clang.llvm.org>`_ instead. The
|
2019-09-05 19:30:52 +02:00
|
|
|
|
documentation here is intended for users who have a need to work with the
|
|
|
|
|
intermediate LLVM representation.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
.. contents::
|
|
|
|
|
:local:
|
|
|
|
|
|
2019-09-05 19:30:52 +02:00
|
|
|
|
.. toctree::
|
|
|
|
|
:hidden:
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
AddingConstrainedIntrinsics
|
|
|
|
|
AdvancedBuilds
|
|
|
|
|
AliasAnalysis
|
|
|
|
|
AMDGPUUsage
|
|
|
|
|
Benchmarking
|
|
|
|
|
BigEndianNEON
|
|
|
|
|
BuildingADistribution
|
2019-10-13 22:05:22 +02:00
|
|
|
|
CFIVerify
|
2019-09-05 19:30:52 +02:00
|
|
|
|
CMake
|
|
|
|
|
CMakePrimer
|
2019-10-07 00:49:22 +02:00
|
|
|
|
CodeGenerator
|
|
|
|
|
CodeOfConduct
|
|
|
|
|
CommandLine
|
|
|
|
|
CompileCudaWithLLVM
|
|
|
|
|
CoverageMappingFormat
|
|
|
|
|
DebuggingJITedCode
|
|
|
|
|
Docker
|
|
|
|
|
ExtendingLLVM
|
|
|
|
|
GoldPlugin
|
2019-09-05 19:30:52 +02:00
|
|
|
|
HowToBuildOnARM
|
|
|
|
|
HowToBuildWithPGO
|
2021-03-09 02:33:54 +01:00
|
|
|
|
HowToBuildWindowsItaniumPrograms
|
2019-09-05 19:30:52 +02:00
|
|
|
|
HowToCrossCompileBuiltinsOnArm
|
|
|
|
|
HowToCrossCompileLLVM
|
2020-05-16 02:13:18 +02:00
|
|
|
|
HowToUpdateDebugInfo
|
2019-10-07 00:49:22 +02:00
|
|
|
|
LinkTimeOptimization
|
|
|
|
|
LoopTerminology
|
2019-09-05 19:30:52 +02:00
|
|
|
|
MarkdownQuickstartTemplate
|
2019-10-09 23:09:09 +02:00
|
|
|
|
MemorySSA
|
2019-10-07 00:49:22 +02:00
|
|
|
|
MergeFunctions
|
|
|
|
|
MCJITDesignAndImplementation
|
2021-02-24 11:04:35 +01:00
|
|
|
|
ORCv2
|
2021-05-12 02:02:12 +02:00
|
|
|
|
OpaquePointers
|
2021-02-24 22:30:47 +01:00
|
|
|
|
JITLink
|
2021-02-26 02:21:35 +01:00
|
|
|
|
NewPassManager
|
2019-10-07 00:49:22 +02:00
|
|
|
|
NVPTXUsage
|
2019-09-05 19:30:52 +02:00
|
|
|
|
Phabricator
|
|
|
|
|
Passes
|
|
|
|
|
ReportingGuide
|
|
|
|
|
Remarks
|
2019-10-07 00:49:22 +02:00
|
|
|
|
SourceLevelDebugging
|
2019-10-09 23:09:09 +02:00
|
|
|
|
StackSafetyAnalysis
|
|
|
|
|
SupportLibrary
|
2019-10-07 00:49:22 +02:00
|
|
|
|
TableGen/index
|
|
|
|
|
TableGenFundamentals
|
|
|
|
|
Vectorizers
|
2019-10-06 17:36:37 +02:00
|
|
|
|
WritingAnLLVMPass
|
2020-09-01 03:36:11 +02:00
|
|
|
|
WritingAnLLVMNewPMPass
|
2019-10-06 17:36:37 +02:00
|
|
|
|
WritingAnLLVMBackend
|
2019-10-07 00:49:22 +02:00
|
|
|
|
yaml2obj
|
2019-09-05 19:30:52 +02:00
|
|
|
|
|
2019-09-27 21:12:00 +02:00
|
|
|
|
Clang
|
2019-10-06 17:36:37 +02:00
|
|
|
|
-----
|
2019-09-27 21:12:00 +02:00
|
|
|
|
|
2019-09-05 19:30:52 +02:00
|
|
|
|
:doc:`HowToBuildOnARM`
|
|
|
|
|
Notes on building and testing LLVM/Clang on ARM.
|
|
|
|
|
|
|
|
|
|
:doc:`HowToBuildWithPGO`
|
|
|
|
|
Notes on building LLVM/Clang with PGO.
|
|
|
|
|
|
|
|
|
|
:doc:`HowToCrossCompileLLVM`
|
|
|
|
|
Notes on cross-building and testing LLVM/Clang.
|
|
|
|
|
|
2019-09-27 21:12:00 +02:00
|
|
|
|
`How to build the C, C++, ObjC, and ObjC++ front end`__
|
|
|
|
|
Instructions for building the clang front-end from source.
|
|
|
|
|
|
2020-03-22 22:42:03 +01:00
|
|
|
|
.. __: https://clang.llvm.org/get_started.html
|
2019-09-27 21:12:00 +02:00
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`CoverageMappingFormat`
|
|
|
|
|
This describes the format and encoding used for LLVM’s code coverage mapping.
|
|
|
|
|
|
2019-10-13 22:05:22 +02:00
|
|
|
|
:doc:`CFIVerify`
|
|
|
|
|
A description of the verification tool for Control Flow Integrity.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
LLVM Builds and Distributions
|
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
|
|
:doc:`BuildingADistribution`
|
|
|
|
|
A best-practices guide for using LLVM's CMake build system to package and
|
|
|
|
|
distribute LLVM-based tools.
|
|
|
|
|
|
|
|
|
|
:doc:`CMake`
|
|
|
|
|
An addendum to the main Getting Started guide for those using the `CMake
|
|
|
|
|
build system <http://www.cmake.org>`_.
|
2019-09-27 21:12:00 +02:00
|
|
|
|
|
|
|
|
|
:doc:`Docker`
|
|
|
|
|
A reference for using Dockerfiles provided with LLVM.
|
|
|
|
|
|
2019-10-09 23:09:09 +02:00
|
|
|
|
:doc:`Support Library <SupportLibrary>`
|
|
|
|
|
This document describes the LLVM Support Library (``lib/Support``) and
|
2020-06-02 02:09:40 +02:00
|
|
|
|
how to keep LLVM source code portable.
|
|
|
|
|
|
|
|
|
|
:doc:`AdvancedBuilds`
|
|
|
|
|
This document describes more advanced build configurations.
|
2019-10-09 23:09:09 +02:00
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
Optimizations
|
|
|
|
|
-------------
|
2019-09-27 21:12:00 +02:00
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`WritingAnLLVMPass`
|
|
|
|
|
Information on how to write LLVM transformations and analyses.
|
2019-09-27 21:12:00 +02:00
|
|
|
|
|
2020-09-01 03:36:11 +02:00
|
|
|
|
:doc:`WritingAnLLVMNewPMPass`
|
|
|
|
|
Information on how to write LLVM transformations under the new pass
|
|
|
|
|
manager.
|
|
|
|
|
|
2019-09-05 19:30:52 +02:00
|
|
|
|
:doc:`Passes`
|
|
|
|
|
A list of optimizations and analyses implemented in LLVM.
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`StackSafetyAnalysis`
|
|
|
|
|
This document describes the design of the stack safety analysis of local
|
|
|
|
|
variables.
|
|
|
|
|
|
|
|
|
|
:doc:`MergeFunctions`
|
|
|
|
|
Describes functions merging optimization.
|
|
|
|
|
|
|
|
|
|
:doc:`AliasAnalysis`
|
|
|
|
|
Information on how to write a new alias analysis implementation or how to
|
|
|
|
|
use existing analyses.
|
|
|
|
|
|
2019-10-09 23:09:09 +02:00
|
|
|
|
:doc:`MemorySSA`
|
|
|
|
|
Information about the MemorySSA utility in LLVM, as well as how to use it.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`LoopTerminology`
|
|
|
|
|
A document describing Loops and associated terms as used in LLVM.
|
2019-09-05 19:30:52 +02:00
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`Vectorizers`
|
|
|
|
|
This document describes the current status of vectorization in LLVM.
|
|
|
|
|
|
|
|
|
|
:doc:`LinkTimeOptimization`
|
|
|
|
|
This document describes the interface between LLVM intermodular optimizer
|
|
|
|
|
and the linker and its design
|
|
|
|
|
|
|
|
|
|
:doc:`GoldPlugin`
|
|
|
|
|
How to build your programs with link-time optimization on Linux.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`Remarks`
|
|
|
|
|
A reference on the implementation of remarks in LLVM.
|
2019-09-05 19:30:52 +02:00
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`Source Level Debugging with LLVM <SourceLevelDebugging>`
|
|
|
|
|
This document describes the design and philosophy behind the LLVM
|
|
|
|
|
source-level debugger.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
Code Generation
|
|
|
|
|
---------------
|
2019-09-05 19:30:52 +02:00
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`WritingAnLLVMBackend`
|
|
|
|
|
Information on how to write LLVM backends for machine targets.
|
2019-09-05 19:30:52 +02:00
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`CodeGenerator`
|
|
|
|
|
The design and implementation of the LLVM code generator. Useful if you are
|
|
|
|
|
working on retargetting LLVM to a new architecture, designing a new codegen
|
|
|
|
|
pass, or enhancing existing components.
|
|
|
|
|
|
|
|
|
|
:doc:`TableGen <TableGen/index>`
|
|
|
|
|
Describes the TableGen tool, which is used heavily by the LLVM code
|
|
|
|
|
generator.
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
===
|
|
|
|
|
JIT
|
|
|
|
|
===
|
|
|
|
|
|
|
|
|
|
:doc:`MCJITDesignAndImplementation`
|
|
|
|
|
Describes the inner workings of MCJIT execution engine.
|
|
|
|
|
|
2021-02-24 11:04:35 +01:00
|
|
|
|
:doc:`ORCv2`
|
|
|
|
|
Describes the design and implementation of the ORC APIs, including some
|
|
|
|
|
usage examples, and a guide for users transitioning from ORCv1 to ORCv2.
|
|
|
|
|
|
2021-02-24 22:30:47 +01:00
|
|
|
|
:doc:`JITLink`
|
|
|
|
|
Describes the design and APIs for the JITLink library, ORC's new JIT
|
|
|
|
|
linker.
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`DebuggingJITedCode`
|
|
|
|
|
How to debug JITed code with GDB.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
Additional Topics
|
|
|
|
|
-----------------
|
|
|
|
|
|
2019-10-06 18:10:11 +02:00
|
|
|
|
:doc:`CommandLine`
|
|
|
|
|
Provides information on using the command line parsing library.
|
|
|
|
|
|
|
|
|
|
:doc:`ExtendingLLVM`
|
|
|
|
|
Look here to see how to add instructions and intrinsics to LLVM.
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`AddingConstrainedIntrinsics`
|
|
|
|
|
Gives the steps necessary when adding a new constrained math intrinsic
|
|
|
|
|
to LLVM.
|
|
|
|
|
|
2021-03-09 02:33:54 +01:00
|
|
|
|
:doc:`HowToBuildWindowsItaniumPrograms`
|
|
|
|
|
Notes on assembling a Windows Itanium enviroment.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`HowToCrossCompileBuiltinsOnArm`
|
|
|
|
|
Notes on cross-building and testing the compiler-rt builtins for Arm.
|
|
|
|
|
|
2019-10-07 00:49:22 +02:00
|
|
|
|
:doc:`BigEndianNEON`
|
|
|
|
|
LLVM's support for generating NEON instructions on big endian ARM targets is
|
|
|
|
|
somewhat nonintuitive. This document explains the implementation and rationale.
|
|
|
|
|
|
|
|
|
|
:doc:`CompileCudaWithLLVM`
|
|
|
|
|
LLVM support for CUDA.
|
|
|
|
|
|
2019-10-06 17:36:37 +02:00
|
|
|
|
:doc:`NVPTXUsage`
|
|
|
|
|
This document describes using the NVPTX backend to compile GPU kernels.
|
|
|
|
|
|
|
|
|
|
:doc:`AMDGPUUsage`
|
2020-04-14 06:55:43 +02:00
|
|
|
|
This document describes using the AMDGPU backend to compile GPU kernels.
|
|
|
|
|
|
2020-07-30 07:10:21 +02:00
|
|
|
|
:doc:`AMDGPUDwarfExtensionsForHeterogeneousDebugging`
|
|
|
|
|
This document describes DWARF extensions to support heterogeneous debugging
|
2020-05-16 02:13:18 +02:00
|
|
|
|
for targets such as the AMDGPU backend.
|