mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-07 10:54:01 +00:00
Doc: Links should use https
This commit is contained in:
parent
006244152d
commit
72fd1033ea
@ -119,7 +119,7 @@ Now we create the Importer and do the import:
|
|||||||
llvm::Expected<Decl *> ImportedOrErr = Importer.Import(From);
|
llvm::Expected<Decl *> ImportedOrErr = Importer.Import(From);
|
||||||
|
|
||||||
The ``Import`` call returns with ``llvm::Expected``, so, we must check for any error.
|
The ``Import`` call returns with ``llvm::Expected``, so, we must check for any error.
|
||||||
Please refer to the `error handling <http://llvm.org/docs/ProgrammersManual.html#recoverable-errors>`_ documentation for details.
|
Please refer to the `error handling <https://llvm.org/docs/ProgrammersManual.html#recoverable-errors>`_ documentation for details.
|
||||||
|
|
||||||
.. code-block:: cpp
|
.. code-block:: cpp
|
||||||
|
|
||||||
|
@ -2199,9 +2199,9 @@ lck_rw_try_lock_exclusive, lck_rw_try_lock_shared, pthread_mutex_unlock, pthread
|
|||||||
alpha.unix.SimpleStream (C)
|
alpha.unix.SimpleStream (C)
|
||||||
"""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""
|
||||||
Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fclose``
|
Check for misuses of stream APIs. Check for misuses of stream APIs: ``fopen, fclose``
|
||||||
(demo checker, the subject of the demo (`Slides <http://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf>`_ ,
|
(demo checker, the subject of the demo (`Slides <https://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf>`_ ,
|
||||||
`Video <https://youtu.be/kdxlsP5QVPw>`_) by Anna Zaks and Jordan Rose presented at the
|
`Video <https://youtu.be/kdxlsP5QVPw>`_) by Anna Zaks and Jordan Rose presented at the
|
||||||
`2012 LLVM Developers' Meeting <http://llvm.org/devmtg/2012-11/>`_).
|
`2012 LLVM Developers' Meeting <https://llvm.org/devmtg/2012-11/>`_).
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ test libc++.
|
|||||||
|
|
||||||
Please see the `Lit Command Guide`_ for more information about LIT.
|
Please see the `Lit Command Guide`_ for more information about LIT.
|
||||||
|
|
||||||
.. _LIT Command Guide: http://llvm.org/docs/CommandGuide/lit.html
|
.. _LIT Command Guide: https://llvm.org/docs/CommandGuide/lit.html
|
||||||
|
|
||||||
Setting up the Environment
|
Setting up the Environment
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -180,7 +180,7 @@ thread safety annotations.
|
|||||||
Since libc++ 4.0 this extension has been disabled by default. This macro
|
Since libc++ 4.0 this extension has been disabled by default. This macro
|
||||||
may be defined to re-enable it in order to support existing code that depends
|
may be defined to re-enable it in order to support existing code that depends
|
||||||
on the extension. New use of this extension should be discouraged.
|
on the extension. New use of this extension should be discouraged.
|
||||||
See `PR 27374 <http://llvm.org/PR27374>`_ for more information.
|
See `PR 27374 <https://llvm.org/PR27374>`_ for more information.
|
||||||
|
|
||||||
Note: The "reduced-arity-initialization" extension is still offered but only
|
Note: The "reduced-arity-initialization" extension is still offered but only
|
||||||
for explicit conversions. Example:
|
for explicit conversions. Example:
|
||||||
|
@ -161,8 +161,8 @@ Build Bots and Test Coverage
|
|||||||
Getting Involved
|
Getting Involved
|
||||||
================
|
================
|
||||||
|
|
||||||
First please review our `Developer's Policy <http://llvm.org/docs/DeveloperPolicy.html>`__
|
First please review our `Developer's Policy <https://llvm.org/docs/DeveloperPolicy.html>`__
|
||||||
and `Getting started with LLVM <http://llvm.org/docs/GettingStarted.html>`__.
|
and `Getting started with LLVM <https://llvm.org/docs/GettingStarted.html>`__.
|
||||||
|
|
||||||
**Bug Reports**
|
**Bug Reports**
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ can post a message to the `libcxx-dev mailing list`_ or on IRC.
|
|||||||
**Patches**
|
**Patches**
|
||||||
|
|
||||||
If you want to contribute a patch to libc++, the best place for that is
|
If you want to contribute a patch to libc++, the best place for that is
|
||||||
`Phabricator <http://llvm.org/docs/Phabricator.html>`_. Please add `libcxx-commits` as a subscriber.
|
`Phabricator <https://llvm.org/docs/Phabricator.html>`_. Please add `libcxx-commits` as a subscriber.
|
||||||
Also make sure you are subscribed to the `libcxx-commits mailing list <http://lists.llvm.org/mailman/listinfo/libcxx-commits>`_.
|
Also make sure you are subscribed to the `libcxx-commits mailing list <http://lists.llvm.org/mailman/listinfo/libcxx-commits>`_.
|
||||||
|
|
||||||
**Discussion and Questions**
|
**Discussion and Questions**
|
||||||
@ -185,7 +185,7 @@ Send discussions and questions to the
|
|||||||
|
|
||||||
Quick Links
|
Quick Links
|
||||||
===========
|
===========
|
||||||
* `LLVM Homepage <http://llvm.org/>`_
|
* `LLVM Homepage <https://llvm.org/>`_
|
||||||
* `libc++abi Homepage <http://libcxxabi.llvm.org/>`_
|
* `libc++abi Homepage <http://libcxxabi.llvm.org/>`_
|
||||||
* `LLVM Bugzilla <https://bugs.llvm.org/>`_
|
* `LLVM Bugzilla <https://bugs.llvm.org/>`_
|
||||||
* `libcxx-commits Mailing List`_
|
* `libcxx-commits Mailing List`_
|
||||||
|
@ -57,8 +57,8 @@ build would look like this:
|
|||||||
|
|
||||||
$ cd where-you-want-libunwind-to-live
|
$ cd where-you-want-libunwind-to-live
|
||||||
$ # Check out llvm, and libunwind
|
$ # Check out llvm, and libunwind
|
||||||
$ ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm``
|
$ ``svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm``
|
||||||
$ ``svn co http://llvm.org/svn/llvm-project/libunwind/trunk libunwind``
|
$ ``svn co https://llvm.org/svn/llvm-project/libunwind/trunk libunwind``
|
||||||
$ cd where-you-want-to-build
|
$ cd where-you-want-to-build
|
||||||
$ mkdir build && cd build
|
$ mkdir build && cd build
|
||||||
$ export CC=clang CXX=clang++
|
$ export CC=clang CXX=clang++
|
||||||
|
@ -71,8 +71,8 @@ Notes and Known Issues
|
|||||||
Getting Involved
|
Getting Involved
|
||||||
================
|
================
|
||||||
|
|
||||||
First please review our `Developer's Policy <http://llvm.org/docs/DeveloperPolicy.html>`__
|
First please review our `Developer's Policy <https://llvm.org/docs/DeveloperPolicy.html>`__
|
||||||
and `Getting started with LLVM <http://llvm.org/docs/GettingStarted.html>`__.
|
and `Getting started with LLVM <https://llvm.org/docs/GettingStarted.html>`__.
|
||||||
|
|
||||||
**Bug Reports**
|
**Bug Reports**
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ Please include "libunwind" in your subject.
|
|||||||
**Patches**
|
**Patches**
|
||||||
|
|
||||||
If you want to contribute a patch to libunwind, the best place for that is
|
If you want to contribute a patch to libunwind, the best place for that is
|
||||||
`Phabricator <http://llvm.org/docs/Phabricator.html>`_. Please include [libunwind] in the subject and
|
`Phabricator <https://llvm.org/docs/Phabricator.html>`_. Please include [libunwind] in the subject and
|
||||||
add `cfe-commits` as a subscriber. Also make sure you are subscribed to the
|
add `cfe-commits` as a subscriber. Also make sure you are subscribed to the
|
||||||
`cfe-commits mailing list <http://lists.llvm.org/mailman/listinfo/cfe-commits>`_.
|
`cfe-commits mailing list <http://lists.llvm.org/mailman/listinfo/cfe-commits>`_.
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ Please include [libunwind] in the subject.
|
|||||||
|
|
||||||
Quick Links
|
Quick Links
|
||||||
===========
|
===========
|
||||||
* `LLVM Homepage <http://llvm.org/>`_
|
* `LLVM Homepage <https://llvm.org/>`_
|
||||||
* `LLVM Bugzilla <https://bugs.llvm.org/>`_
|
* `LLVM Bugzilla <https://bugs.llvm.org/>`_
|
||||||
* `cfe-commits Mailing List`_
|
* `cfe-commits Mailing List`_
|
||||||
* `cfe-dev Mailing List`_
|
* `cfe-dev Mailing List`_
|
||||||
|
@ -59,4 +59,4 @@ Indices and tables
|
|||||||
* :ref:`genindex`
|
* :ref:`genindex`
|
||||||
* :ref:`search`
|
* :ref:`search`
|
||||||
|
|
||||||
__ http://llvm.org/docs/DeveloperPolicy.html#license
|
__ https://llvm.org/docs/DeveloperPolicy.html#license
|
||||||
|
@ -248,7 +248,7 @@ Finally, the linker replaces bitcode symbols with ELF/COFF symbols,
|
|||||||
so that they are linked as if they were in the native format from the beginning.
|
so that they are linked as if they were in the native format from the beginning.
|
||||||
|
|
||||||
The details are described in this document.
|
The details are described in this document.
|
||||||
http://llvm.org/docs/LinkTimeOptimization.html
|
https://llvm.org/docs/LinkTimeOptimization.html
|
||||||
|
|
||||||
Glossary
|
Glossary
|
||||||
--------
|
--------
|
||||||
|
@ -326,7 +326,7 @@ Testing
|
|||||||
|
|
||||||
The lld project contains a test suite which is being built up as new code is
|
The lld project contains a test suite which is being built up as new code is
|
||||||
added to lld. All new lld functionality should have a tests added to the test
|
added to lld. All new lld functionality should have a tests added to the test
|
||||||
suite. The test suite is `lit <http://llvm.org/cmds/lit.html/>`_ driven. Each
|
suite. The test suite is `lit <https://llvm.org/cmds/lit.html/>`_ driven. Each
|
||||||
test is a text file with comments telling lit how to run the test and check the
|
test is a text file with comments telling lit how to run the test and check the
|
||||||
result To facilitate testing, the lld project builds a tool called lld-core.
|
result To facilitate testing, the lld project builds a tool called lld-core.
|
||||||
This tool reads a YAML file (default from stdin), parses it into one or more
|
This tool reads a YAML file (default from stdin), parses it into one or more
|
||||||
|
@ -6,7 +6,7 @@ Development
|
|||||||
Note: this document discuss Mach-O port of LLD. For ELF and COFF,
|
Note: this document discuss Mach-O port of LLD. For ELF and COFF,
|
||||||
see :doc:`index`.
|
see :doc:`index`.
|
||||||
|
|
||||||
lld is developed as part of the `LLVM <http://llvm.org>`_ project.
|
lld is developed as part of the `LLVM <https://llvm.org>`_ project.
|
||||||
|
|
||||||
Creating a Reader
|
Creating a Reader
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -6,7 +6,7 @@ Getting Started: Building and Running lld
|
|||||||
This page gives you the shortest path to checking out and building lld. If you
|
This page gives you the shortest path to checking out and building lld. If you
|
||||||
run into problems, please file bugs in the `LLVM Bugzilla`__
|
run into problems, please file bugs in the `LLVM Bugzilla`__
|
||||||
|
|
||||||
__ http://llvm.org/bugs/
|
__ https://llvm.org/bugs/
|
||||||
|
|
||||||
Building lld
|
Building lld
|
||||||
------------
|
------------
|
||||||
@ -84,4 +84,4 @@ More Information
|
|||||||
|
|
||||||
For more information on using CMake see the `LLVM CMake guide`_.
|
For more information on using CMake see the `LLVM CMake guide`_.
|
||||||
|
|
||||||
.. _LLVM CMake guide: http://llvm.org/docs/CMake.html
|
.. _LLVM CMake guide: https://llvm.org/docs/CMake.html
|
||||||
|
@ -98,7 +98,7 @@ Build
|
|||||||
If you have already checked out LLVM using SVN, you can check out LLD
|
If you have already checked out LLVM using SVN, you can check out LLD
|
||||||
under ``tools`` directory just like you probably did for clang. For the
|
under ``tools`` directory just like you probably did for clang. For the
|
||||||
details, see `Getting Started with the LLVM System
|
details, see `Getting Started with the LLVM System
|
||||||
<http://llvm.org/docs/GettingStarted.html>`_.
|
<https://llvm.org/docs/GettingStarted.html>`_.
|
||||||
|
|
||||||
If you haven't checked out LLVM, the easiest way to build LLD is to
|
If you haven't checked out LLVM, the easiest way to build LLD is to
|
||||||
check out the entire LLVM projects/sub-projects from a git mirror and
|
check out the entire LLVM projects/sub-projects from a git mirror and
|
||||||
|
@ -9977,4 +9977,4 @@ Additional Documentation
|
|||||||
.. [SEMVER] `Semantic Versioning <https://semver.org/>`__
|
.. [SEMVER] `Semantic Versioning <https://semver.org/>`__
|
||||||
.. [OpenCL] `The OpenCL Specification Version 2.0 <http://www.khronos.org/registry/cl/specs/opencl-2.0.pdf>`__
|
.. [OpenCL] `The OpenCL Specification Version 2.0 <http://www.khronos.org/registry/cl/specs/opencl-2.0.pdf>`__
|
||||||
.. [HRF] `Heterogeneous-race-free Memory Models <http://benedictgaster.org/wp-content/uploads/2014/01/asplos269-FINAL.pdf>`__
|
.. [HRF] `Heterogeneous-race-free Memory Models <http://benedictgaster.org/wp-content/uploads/2014/01/asplos269-FINAL.pdf>`__
|
||||||
.. [CLANG-ATTR] `Attributes in Clang <http://clang.llvm.org/docs/AttributeReference.html>`__
|
.. [CLANG-ATTR] `Attributes in Clang <https://clang.llvm.org/docs/AttributeReference.html>`__
|
||||||
|
@ -19,7 +19,7 @@ indicating that two pointers always point to the same object, might point to the
|
|||||||
same object, or are known to never point to the same object.
|
same object, or are known to never point to the same object.
|
||||||
|
|
||||||
The LLVM `AliasAnalysis
|
The LLVM `AliasAnalysis
|
||||||
<http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__ class is the
|
<https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__ class is the
|
||||||
primary interface used by clients and implementations of alias analyses in the
|
primary interface used by clients and implementations of alias analyses in the
|
||||||
LLVM system. This class is the common interface between clients of alias
|
LLVM system. This class is the common interface between clients of alias
|
||||||
analysis information and the implementations providing it, and is designed to
|
analysis information and the implementations providing it, and is designed to
|
||||||
@ -36,7 +36,7 @@ points about what exactly results mean.
|
|||||||
``AliasAnalysis`` Class Overview
|
``AliasAnalysis`` Class Overview
|
||||||
================================
|
================================
|
||||||
|
|
||||||
The `AliasAnalysis <http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__
|
The `AliasAnalysis <https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__
|
||||||
class defines the interface that the various alias analysis implementations
|
class defines the interface that the various alias analysis implementations
|
||||||
should support. This class exports two important enums: ``AliasResult`` and
|
should support. This class exports two important enums: ``AliasResult`` and
|
||||||
``ModRefResult`` which represent the result of an alias query or a mod/ref
|
``ModRefResult`` which represent the result of an alias query or a mod/ref
|
||||||
@ -264,7 +264,7 @@ Interfaces which may be specified
|
|||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
All of the `AliasAnalysis
|
All of the `AliasAnalysis
|
||||||
<http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__ virtual methods
|
<https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`__ virtual methods
|
||||||
default to providing :ref:`chaining <aliasanalysis-chaining>` to another alias
|
default to providing :ref:`chaining <aliasanalysis-chaining>` to another alias
|
||||||
analysis implementation, which ends up returning conservatively correct
|
analysis implementation, which ends up returning conservatively correct
|
||||||
information (returning "May" Alias and "Mod/Ref" for alias and mod/ref queries
|
information (returning "May" Alias and "Mod/Ref" for alias and mod/ref queries
|
||||||
@ -435,7 +435,7 @@ Using the ``AliasSetTracker`` class
|
|||||||
|
|
||||||
Many transformations need information about alias **sets** that are active in
|
Many transformations need information about alias **sets** that are active in
|
||||||
some scope, rather than information about pairwise aliasing. The
|
some scope, rather than information about pairwise aliasing. The
|
||||||
`AliasSetTracker <http://llvm.org/doxygen/classllvm_1_1AliasSetTracker.html>`__
|
`AliasSetTracker <https://llvm.org/doxygen/classllvm_1_1AliasSetTracker.html>`__
|
||||||
class is used to efficiently build these Alias Sets from the pairwise alias
|
class is used to efficiently build these Alias Sets from the pairwise alias
|
||||||
analysis information provided by the ``AliasAnalysis`` interface.
|
analysis information provided by the ``AliasAnalysis`` interface.
|
||||||
|
|
||||||
|
@ -601,7 +601,7 @@ LLVM-specific variables
|
|||||||
|
|
||||||
**LLVM_BUILD_INSTRUMENTED_COVERAGE**:BOOL
|
**LLVM_BUILD_INSTRUMENTED_COVERAGE**:BOOL
|
||||||
If enabled, `source-based code coverage
|
If enabled, `source-based code coverage
|
||||||
<http://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_ instrumentation
|
<https://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_ instrumentation
|
||||||
is enabled while building llvm.
|
is enabled while building llvm.
|
||||||
|
|
||||||
**LLVM_CCACHE_BUILD**:BOOL
|
**LLVM_CCACHE_BUILD**:BOOL
|
||||||
|
@ -70,4 +70,4 @@ COMMANDS
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
@ -545,7 +545,7 @@ Otherwise, it exits with code 0.
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
|
||||||
There is a known issue with :option:`--input-target` and :option:`--target`
|
There is a known issue with :option:`--input-target` and :option:`--target`
|
||||||
causing only ``binary`` and ``ihex`` formats to have any effect. Other values
|
causing only ``binary`` and ``ihex`` formats to have any effect. Other values
|
||||||
|
@ -324,7 +324,7 @@ MACH-O ONLY OPTIONS AND COMMANDS
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
@ -195,4 +195,4 @@ Otherwise, it exits with code 0.
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
@ -127,4 +127,4 @@ Otherwise, it exits with code 0.
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
@ -190,7 +190,7 @@ Otherwise, it exits with code 0.
|
|||||||
BUGS
|
BUGS
|
||||||
----
|
----
|
||||||
|
|
||||||
To report bugs, please visit <http://llvm.org/bugs/>.
|
To report bugs, please visit <https://llvm.org/bugs/>.
|
||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
|
@ -342,7 +342,7 @@ HD functions cannot be overloaded by H or D functions with the same signature:
|
|||||||
When resolving an overloaded function, clang considers the host/device
|
When resolving an overloaded function, clang considers the host/device
|
||||||
attributes of the caller and callee. These are used as a tiebreaker during
|
attributes of the caller and callee. These are used as a tiebreaker during
|
||||||
overload resolution. See `IdentifyCUDAPreference
|
overload resolution. See `IdentifyCUDAPreference
|
||||||
<http://clang.llvm.org/doxygen/SemaCUDA_8cpp.html>`_ for the full set of rules,
|
<https://clang.llvm.org/doxygen/SemaCUDA_8cpp.html>`_ for the full set of rules,
|
||||||
but at a high level they are:
|
but at a high level they are:
|
||||||
|
|
||||||
* D functions prefer to call other Ds. HDs are given lower priority.
|
* D functions prefer to call other Ds. HDs are given lower priority.
|
||||||
@ -507,12 +507,12 @@ LLVM to make it generate good GPU code. Among these changes are:
|
|||||||
reduce redundancy within straight-line code.
|
reduce redundancy within straight-line code.
|
||||||
|
|
||||||
* `Aggressive speculative execution
|
* `Aggressive speculative execution
|
||||||
<http://llvm.org/docs/doxygen/html/SpeculativeExecution_8cpp_source.html>`_
|
<https://llvm.org/docs/doxygen/html/SpeculativeExecution_8cpp_source.html>`_
|
||||||
-- This is mainly for promoting straight-line scalar optimizations, which are
|
-- This is mainly for promoting straight-line scalar optimizations, which are
|
||||||
most effective on code along dominator paths.
|
most effective on code along dominator paths.
|
||||||
|
|
||||||
* `Memory space inference
|
* `Memory space inference
|
||||||
<http://llvm.org/doxygen/NVPTXInferAddressSpaces_8cpp_source.html>`_ --
|
<https://llvm.org/doxygen/NVPTXInferAddressSpaces_8cpp_source.html>`_ --
|
||||||
In PTX, we can operate on pointers that are in a particular "address space"
|
In PTX, we can operate on pointers that are in a particular "address space"
|
||||||
(global, shared, constant, or local), or we can operate on pointers in the
|
(global, shared, constant, or local), or we can operate on pointers in the
|
||||||
"generic" address space, which can point to anything. Operations in a
|
"generic" address space, which can point to anything. Operations in a
|
||||||
@ -521,7 +521,7 @@ LLVM to make it generate good GPU code. Among these changes are:
|
|||||||
possible.
|
possible.
|
||||||
|
|
||||||
* `Bypassing 64-bit divides
|
* `Bypassing 64-bit divides
|
||||||
<http://llvm.org/docs/doxygen/html/BypassSlowDivision_8cpp_source.html>`_ --
|
<https://llvm.org/docs/doxygen/html/BypassSlowDivision_8cpp_source.html>`_ --
|
||||||
This was an existing optimization that we enabled for the PTX backend.
|
This was an existing optimization that we enabled for the PTX backend.
|
||||||
|
|
||||||
64-bit integer divides are much slower than 32-bit ones on NVIDIA GPUs.
|
64-bit integer divides are much slower than 32-bit ones on NVIDIA GPUs.
|
||||||
@ -536,7 +536,7 @@ LLVM to make it generate good GPU code. Among these changes are:
|
|||||||
SROA, which sometimes speed up code by over 10x.
|
SROA, which sometimes speed up code by over 10x.
|
||||||
|
|
||||||
(Programmers can force unrolling and inline using clang's `loop unrolling pragmas
|
(Programmers can force unrolling and inline using clang's `loop unrolling pragmas
|
||||||
<http://clang.llvm.org/docs/AttributeReference.html#pragma-unroll-pragma-nounroll>`_
|
<https://clang.llvm.org/docs/AttributeReference.html#pragma-unroll-pragma-nounroll>`_
|
||||||
and ``__attribute__((always_inline))``.)
|
and ``__attribute__((always_inline))``.)
|
||||||
|
|
||||||
Publication
|
Publication
|
||||||
@ -558,4 +558,4 @@ Obtaining Help
|
|||||||
==============
|
==============
|
||||||
|
|
||||||
To obtain help on LLVM in general and its CUDA support, see `the LLVM
|
To obtain help on LLVM in general and its CUDA support, see `the LLVM
|
||||||
community <http://llvm.org/docs/#mailing-lists>`_.
|
community <https://llvm.org/docs/#mailing-lists>`_.
|
||||||
|
@ -72,9 +72,9 @@ What source languages are supported?
|
|||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
LLVM currently has full support for C and C++ source languages through
|
LLVM currently has full support for C and C++ source languages through
|
||||||
`Clang <http://clang.llvm.org/>`_. Many other language frontends have
|
`Clang <https://clang.llvm.org/>`_. Many other language frontends have
|
||||||
been written using LLVM, and an incomplete list is available at
|
been written using LLVM, and an incomplete list is available at
|
||||||
`projects with LLVM <http://llvm.org/ProjectsWithLLVM/>`_.
|
`projects with LLVM <https://llvm.org/ProjectsWithLLVM/>`_.
|
||||||
|
|
||||||
|
|
||||||
I'd like to write a self-hosting LLVM compiler. How should I interface with the LLVM middle-end optimizers and back-end code generators?
|
I'd like to write a self-hosting LLVM compiler. How should I interface with the LLVM middle-end optimizers and back-end code generators?
|
||||||
|
@ -16,7 +16,7 @@ files needed to process intermediate representations and converts it into
|
|||||||
object files. Tools include an assembler, disassembler, bitcode analyzer, and
|
object files. Tools include an assembler, disassembler, bitcode analyzer, and
|
||||||
bitcode optimizer. It also contains basic regression tests.
|
bitcode optimizer. It also contains basic regression tests.
|
||||||
|
|
||||||
C-like languages use the `Clang <http://clang.llvm.org/>`_ front end. This
|
C-like languages use the `Clang <https://clang.llvm.org/>`_ front end. This
|
||||||
component compiles C, C++, Objective C, and Objective C++ code into LLVM bitcode
|
component compiles C, C++, Objective C, and Objective C++ code into LLVM bitcode
|
||||||
-- and from there into object files, using LLVM.
|
-- and from there into object files, using LLVM.
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Getting the Source Code and Building LLVM
|
|||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
The LLVM Getting Started documentation may be out of date. The `Clang
|
The LLVM Getting Started documentation may be out of date. The `Clang
|
||||||
Getting Started <http://clang.llvm.org/get_started.html>`_ page might have more
|
Getting Started <https://clang.llvm.org/get_started.html>`_ page might have more
|
||||||
accurate information.
|
accurate information.
|
||||||
|
|
||||||
This is an example workflow and configuration to get and build the LLVM source:
|
This is an example workflow and configuration to get and build the LLVM source:
|
||||||
@ -522,7 +522,7 @@ you need to check the code out of SVN rather than git for some reason, you can
|
|||||||
do it like so:
|
do it like so:
|
||||||
|
|
||||||
* ``cd where-you-want-llvm-to-live``
|
* ``cd where-you-want-llvm-to-live``
|
||||||
* Read-Only: ``svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm``
|
* Read-Only: ``svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm``
|
||||||
* Read-Write: ``svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm``
|
* Read-Write: ``svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm``
|
||||||
|
|
||||||
This will create an '``llvm``' directory in the current directory and fully
|
This will create an '``llvm``' directory in the current directory and fully
|
||||||
@ -722,7 +722,7 @@ Note: There are some additional flags that need to be passed when building for
|
|||||||
iOS due to limitations in the iOS SDK.
|
iOS due to limitations in the iOS SDK.
|
||||||
|
|
||||||
Check :doc:`HowToCrossCompileLLVM` and `Clang docs on how to cross-compile in general
|
Check :doc:`HowToCrossCompileLLVM` and `Clang docs on how to cross-compile in general
|
||||||
<http://clang.llvm.org/docs/CrossCompilation.html>`_ for more information
|
<https://clang.llvm.org/docs/CrossCompilation.html>`_ for more information
|
||||||
about cross-compiling.
|
about cross-compiling.
|
||||||
|
|
||||||
The Location of LLVM Object Files
|
The Location of LLVM Object Files
|
||||||
@ -789,7 +789,7 @@ Directory Layout
|
|||||||
|
|
||||||
One useful source of information about the LLVM source base is the LLVM `doxygen
|
One useful source of information about the LLVM source base is the LLVM `doxygen
|
||||||
<http://www.doxygen.org/>`_ documentation available at
|
<http://www.doxygen.org/>`_ documentation available at
|
||||||
`<http://llvm.org/doxygen/>`_. The following is a brief introduction to code
|
`<https://llvm.org/doxygen/>`_. The following is a brief introduction to code
|
||||||
layout:
|
layout:
|
||||||
|
|
||||||
``llvm/examples``
|
``llvm/examples``
|
||||||
@ -1105,8 +1105,8 @@ things... there are many more interesting and complicated things that you can do
|
|||||||
that aren't documented here (but we'll gladly accept a patch if you want to
|
that aren't documented here (but we'll gladly accept a patch if you want to
|
||||||
write something up!). For more information about LLVM, check out:
|
write something up!). For more information about LLVM, check out:
|
||||||
|
|
||||||
* `LLVM Homepage <http://llvm.org/>`_
|
* `LLVM Homepage <https://llvm.org/>`_
|
||||||
* `LLVM Doxygen Tree <http://llvm.org/doxygen/>`_
|
* `LLVM Doxygen Tree <https://llvm.org/doxygen/>`_
|
||||||
* `Starting a Project that Uses LLVM <http://llvm.org/docs/Projects.html>`_
|
* `Starting a Project that Uses LLVM <https://llvm.org/docs/Projects.html>`_
|
||||||
|
|
||||||
.. _installing arcanist: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/
|
.. _installing arcanist: https://secure.phabricator.com/book/phabricator/article/arcanist_quick_start/
|
||||||
|
@ -18,7 +18,7 @@ to use LLVM. It contains an assembler, disassembler, bitcode analyzer and
|
|||||||
bitcode optimizer. It also contains basic regression tests that can be used to
|
bitcode optimizer. It also contains basic regression tests that can be used to
|
||||||
test the LLVM tools and the Clang front end.
|
test the LLVM tools and the Clang front end.
|
||||||
|
|
||||||
The second piece is the `Clang <http://clang.llvm.org/>`_ front end. This
|
The second piece is the `Clang <https://clang.llvm.org/>`_ front end. This
|
||||||
component compiles C, C++, Objective C, and Objective C++ code into LLVM
|
component compiles C, C++, Objective C, and Objective C++ code into LLVM
|
||||||
bitcode. Clang typically uses LLVM libraries to optimize the bitcode and emit
|
bitcode. Clang typically uses LLVM libraries to optimize the bitcode and emit
|
||||||
machine code. LLVM fully supports the COFF object file format, which is
|
machine code. LLVM fully supports the COFF object file format, which is
|
||||||
@ -233,6 +233,6 @@ things... there are many more interesting and complicated things that you can
|
|||||||
do that aren't documented here (but we'll gladly accept a patch if you want to
|
do that aren't documented here (but we'll gladly accept a patch if you want to
|
||||||
write something up!). For more information about LLVM, check out:
|
write something up!). For more information about LLVM, check out:
|
||||||
|
|
||||||
* `LLVM homepage <http://llvm.org/>`_
|
* `LLVM homepage <https://llvm.org/>`_
|
||||||
* `LLVM doxygen tree <http://llvm.org/doxygen/>`_
|
* `LLVM doxygen tree <https://llvm.org/doxygen/>`_
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ generic and non-generic). There are some exceptions to this but in general:
|
|||||||
way of getting a given operand's type (as there was no 1:1 mapping between
|
way of getting a given operand's type (as there was no 1:1 mapping between
|
||||||
instruction types and operands).
|
instruction types and operands).
|
||||||
We considered putting the type in some variant of MCInstrDesc instead:
|
We considered putting the type in some variant of MCInstrDesc instead:
|
||||||
See `PR26576 <http://llvm.org/PR26576>`_: [GlobalISel] Generic MachineInstrs
|
See `PR26576 <https://llvm.org/PR26576>`_: [GlobalISel] Generic MachineInstrs
|
||||||
need a type but this increases the memory footprint of the related objects
|
need a type but this increases the memory footprint of the related objects
|
||||||
|
|
||||||
.. _gmir-regbank:
|
.. _gmir-regbank:
|
||||||
|
@ -73,7 +73,7 @@ This differs from SelectionDAG's multiple vregs via ``GetValueVTs``.
|
|||||||
As some of the bits are undef (padding), we should consider augmenting the
|
As some of the bits are undef (padding), we should consider augmenting the
|
||||||
representation with additional metadata (in effect, caching computeKnownBits
|
representation with additional metadata (in effect, caching computeKnownBits
|
||||||
information on vregs).
|
information on vregs).
|
||||||
See `PR26161 <http://llvm.org/PR26161>`_: [GlobalISel] Value to vreg during
|
See `PR26161 <https://llvm.org/PR26161>`_: [GlobalISel] Value to vreg during
|
||||||
IR to MachineInstr translation for aggregate type
|
IR to MachineInstr translation for aggregate type
|
||||||
|
|
||||||
.. _irtranslator-constants:
|
.. _irtranslator-constants:
|
||||||
|
@ -97,4 +97,4 @@ Then it's just a matter of fetching the analysis and using it:
|
|||||||
}
|
}
|
||||||
|
|
||||||
There are many more API's beyond ``getKnownBits()``. See the `API reference
|
There are many more API's beyond ``getKnownBits()``. See the `API reference
|
||||||
<http://llvm.org/doxygen>`_ for more information
|
<https://llvm.org/doxygen>`_ for more information
|
||||||
|
@ -125,7 +125,7 @@ II. Usage of clang driver:
|
|||||||
invoking Graphviz.
|
invoking Graphviz.
|
||||||
|
|
||||||
For more information on getting Graphviz to work with clang/LLVM,
|
For more information on getting Graphviz to work with clang/LLVM,
|
||||||
see: http://llvm.org/docs/ProgrammersManual.html#ViewGraph
|
see: https://llvm.org/docs/ProgrammersManual.html#ViewGraph
|
||||||
|
|
||||||
|
|
||||||
III. Current advantages over GCC:
|
III. Current advantages over GCC:
|
||||||
|
@ -9,7 +9,7 @@ This document contains information about building LLVM and
|
|||||||
Clang on host machine, targeting another platform.
|
Clang on host machine, targeting another platform.
|
||||||
|
|
||||||
For more information on how to use Clang as a cross-compiler,
|
For more information on how to use Clang as a cross-compiler,
|
||||||
please check http://clang.llvm.org/docs/CrossCompilation.html.
|
please check https://clang.llvm.org/docs/CrossCompilation.html.
|
||||||
|
|
||||||
TODO: Add MIPS and other platforms to this document.
|
TODO: Add MIPS and other platforms to this document.
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ identification), like:
|
|||||||
|
|
||||||
If you copy that tarball to your target board, you'll be able to use
|
If you copy that tarball to your target board, you'll be able to use
|
||||||
it for running the test-suite, for example. Follow the guidelines at
|
it for running the test-suite, for example. Follow the guidelines at
|
||||||
http://llvm.org/docs/lnt/quickstart.html, unpack the tarball in the
|
https://llvm.org/docs/lnt/quickstart.html, unpack the tarball in the
|
||||||
test directory, and use options:
|
test directory, and use options:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -380,8 +380,8 @@ contract, you can tweak and optimize it as much as you want.
|
|||||||
For example, LLVM-style RTTI can work fine in the presence of
|
For example, LLVM-style RTTI can work fine in the presence of
|
||||||
multiple-inheritance by defining an appropriate ``classof``.
|
multiple-inheritance by defining an appropriate ``classof``.
|
||||||
An example of this in practice is
|
An example of this in practice is
|
||||||
`Decl <http://clang.llvm.org/doxygen/classclang_1_1Decl.html>`_ vs.
|
`Decl <https://clang.llvm.org/doxygen/classclang_1_1Decl.html>`_ vs.
|
||||||
`DeclContext <http://clang.llvm.org/doxygen/classclang_1_1DeclContext.html>`_
|
`DeclContext <https://clang.llvm.org/doxygen/classclang_1_1DeclContext.html>`_
|
||||||
inside Clang.
|
inside Clang.
|
||||||
The ``Decl`` hierarchy is done very similarly to the example setup
|
The ``Decl`` hierarchy is done very similarly to the example setup
|
||||||
demonstrated in this tutorial.
|
demonstrated in this tutorial.
|
||||||
@ -396,7 +396,7 @@ returning true for ones that are known to be ``DeclContext``'s.
|
|||||||
Touch on some of the more advanced features, like ``isa_impl`` and
|
Touch on some of the more advanced features, like ``isa_impl`` and
|
||||||
``simplify_type``. However, those two need reference documentation in
|
``simplify_type``. However, those two need reference documentation in
|
||||||
the form of doxygen comments as well. We need the doxygen so that we can
|
the form of doxygen comments as well. We need the doxygen so that we can
|
||||||
say "for full details, see http://llvm.org/doxygen/..."
|
say "for full details, see https://llvm.org/doxygen/..."
|
||||||
|
|
||||||
Rules of Thumb
|
Rules of Thumb
|
||||||
==============
|
==============
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
;
|
;
|
||||||
; For more information on the LLVMBuild system, please see:
|
; For more information on the LLVMBuild system, please see:
|
||||||
;
|
;
|
||||||
; http://llvm.org/docs/LLVMBuild.html
|
; https://llvm.org/docs/LLVMBuild.html
|
||||||
;
|
;
|
||||||
;===------------------------------------------------------------------------===;
|
;===------------------------------------------------------------------------===;
|
||||||
|
|
||||||
|
@ -1692,7 +1692,7 @@ example:
|
|||||||
functions.
|
functions.
|
||||||
``safestack``
|
``safestack``
|
||||||
This attribute indicates that
|
This attribute indicates that
|
||||||
`SafeStack <http://clang.llvm.org/docs/SafeStack.html>`_
|
`SafeStack <https://clang.llvm.org/docs/SafeStack.html>`_
|
||||||
protection is enabled for this function.
|
protection is enabled for this function.
|
||||||
|
|
||||||
If a function that has a ``safestack`` attribute is inlined into a
|
If a function that has a ``safestack`` attribute is inlined into a
|
||||||
@ -6690,7 +6690,7 @@ TypeIdInfo
|
|||||||
^^^^^^^^^^
|
^^^^^^^^^^
|
||||||
|
|
||||||
The optional ``TypeIdInfo`` field, used for
|
The optional ``TypeIdInfo`` field, used for
|
||||||
`Control Flow Integrity <http://clang.llvm.org/docs/ControlFlowIntegrity.html>`_,
|
`Control Flow Integrity <https://clang.llvm.org/docs/ControlFlowIntegrity.html>`_,
|
||||||
looks like:
|
looks like:
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
@ -6767,7 +6767,7 @@ Type ID Summary Entry
|
|||||||
|
|
||||||
Each type id summary entry corresponds to a type identifier resolution
|
Each type id summary entry corresponds to a type identifier resolution
|
||||||
which is generated during the LTO link portion of the compile when building
|
which is generated during the LTO link portion of the compile when building
|
||||||
with `Control Flow Integrity <http://clang.llvm.org/docs/ControlFlowIntegrity.html>`_,
|
with `Control Flow Integrity <https://clang.llvm.org/docs/ControlFlowIntegrity.html>`_,
|
||||||
so these are only present in a combined summary index.
|
so these are only present in a combined summary index.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -112,7 +112,7 @@ G
|
|||||||
**GEP**
|
**GEP**
|
||||||
``GetElementPtr``. An LLVM IR instruction that is used to get the address
|
``GetElementPtr``. An LLVM IR instruction that is used to get the address
|
||||||
of a subelement of an aggregate data structure. It is documented in detail
|
of a subelement of an aggregate data structure. It is documented in detail
|
||||||
`here <http://llvm.org/docs/GetElementPtr.html>`_.
|
`here <https://llvm.org/docs/GetElementPtr.html>`_.
|
||||||
|
|
||||||
**GVN**
|
**GVN**
|
||||||
Global Value Numbering. GVN is a pass that partitions values computed by a
|
Global Value Numbering. GVN is a pass that partitions values computed by a
|
||||||
|
@ -581,7 +581,7 @@ you will want to know whether the function or the corpus can be improved further
|
|||||||
One easy to use metric is, of course, code coverage.
|
One easy to use metric is, of course, code coverage.
|
||||||
|
|
||||||
We recommend to use
|
We recommend to use
|
||||||
`Clang Coverage <http://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_,
|
`Clang Coverage <https://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_,
|
||||||
to visualize and study your code coverage
|
to visualize and study your code coverage
|
||||||
(`example <https://github.com/google/fuzzer-test-suite/blob/master/tutorial/libFuzzerTutorial.md#visualizing-coverage>`_).
|
(`example <https://github.com/google/fuzzer-test-suite/blob/master/tutorial/libFuzzerTutorial.md#visualizing-coverage>`_).
|
||||||
|
|
||||||
@ -781,18 +781,18 @@ Trophies
|
|||||||
.. _pcre2: http://www.pcre.org/
|
.. _pcre2: http://www.pcre.org/
|
||||||
.. _AFL: http://lcamtuf.coredump.cx/afl/
|
.. _AFL: http://lcamtuf.coredump.cx/afl/
|
||||||
.. _Radamsa: https://github.com/aoh/radamsa
|
.. _Radamsa: https://github.com/aoh/radamsa
|
||||||
.. _SanitizerCoverage: http://clang.llvm.org/docs/SanitizerCoverage.html
|
.. _SanitizerCoverage: https://clang.llvm.org/docs/SanitizerCoverage.html
|
||||||
.. _SanitizerCoverageTraceDataFlow: http://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow
|
.. _SanitizerCoverageTraceDataFlow: https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow
|
||||||
.. _AddressSanitizer: http://clang.llvm.org/docs/AddressSanitizer.html
|
.. _AddressSanitizer: https://clang.llvm.org/docs/AddressSanitizer.html
|
||||||
.. _LeakSanitizer: http://clang.llvm.org/docs/LeakSanitizer.html
|
.. _LeakSanitizer: https://clang.llvm.org/docs/LeakSanitizer.html
|
||||||
.. _Heartbleed: http://en.wikipedia.org/wiki/Heartbleed
|
.. _Heartbleed: http://en.wikipedia.org/wiki/Heartbleed
|
||||||
.. _FuzzerInterface.h: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/fuzzer/FuzzerInterface.h
|
.. _FuzzerInterface.h: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/fuzzer/FuzzerInterface.h
|
||||||
.. _3.7.0: http://llvm.org/releases/3.7.0/docs/LibFuzzer.html
|
.. _3.7.0: https://llvm.org/releases/3.7.0/docs/LibFuzzer.html
|
||||||
.. _building Clang from trunk: http://clang.llvm.org/get_started.html
|
.. _building Clang from trunk: https://clang.llvm.org/get_started.html
|
||||||
.. _MemorySanitizer: http://clang.llvm.org/docs/MemorySanitizer.html
|
.. _MemorySanitizer: https://clang.llvm.org/docs/MemorySanitizer.html
|
||||||
.. _UndefinedBehaviorSanitizer: http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
.. _UndefinedBehaviorSanitizer: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
||||||
.. _`coverage counters`: http://clang.llvm.org/docs/SanitizerCoverage.html#coverage-counters
|
.. _`coverage counters`: https://clang.llvm.org/docs/SanitizerCoverage.html#coverage-counters
|
||||||
.. _`value profile`: #value-profile
|
.. _`value profile`: #value-profile
|
||||||
.. _`caller-callee pairs`: http://clang.llvm.org/docs/SanitizerCoverage.html#caller-callee-coverage
|
.. _`caller-callee pairs`: https://clang.llvm.org/docs/SanitizerCoverage.html#caller-callee-coverage
|
||||||
.. _BoringSSL: https://boringssl.googlesource.com/boringssl/
|
.. _BoringSSL: https://boringssl.googlesource.com/boringssl/
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ It is ensured by the LoopSimplify
|
|||||||
(:ref:`-loop-simplify <passes-loop-simplify>`) pass and is automatically
|
(:ref:`-loop-simplify <passes-loop-simplify>`) pass and is automatically
|
||||||
added by the pass managers when scheduling a LoopPass.
|
added by the pass managers when scheduling a LoopPass.
|
||||||
This pass is implemented in
|
This pass is implemented in
|
||||||
`LoopSimplify.h <http://llvm.org/doxygen/LoopSimplify_8h_source.html>`_.
|
`LoopSimplify.h <https://llvm.org/doxygen/LoopSimplify_8h_source.html>`_.
|
||||||
When it is successful, the loop has:
|
When it is successful, the loop has:
|
||||||
|
|
||||||
* A preheader.
|
* A preheader.
|
||||||
@ -178,7 +178,7 @@ Rotated Loops
|
|||||||
Loops are rotated by the LoopRotate (:ref:`loop-rotate <passes-loop-rotate>`)
|
Loops are rotated by the LoopRotate (:ref:`loop-rotate <passes-loop-rotate>`)
|
||||||
pass, which converts loops into do/while style loops and is
|
pass, which converts loops into do/while style loops and is
|
||||||
implemented in
|
implemented in
|
||||||
`LoopRotation.h <http://llvm.org/doxygen/LoopRotation_8h_source.html>`_. Example:
|
`LoopRotation.h <https://llvm.org/doxygen/LoopRotation_8h_source.html>`_. Example:
|
||||||
|
|
||||||
.. code-block:: C
|
.. code-block:: C
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ structure.
|
|||||||
|
|
||||||
### Example Subsection
|
### Example Subsection
|
||||||
|
|
||||||
Make a link [like this](http://llvm.org/). There is also a more
|
Make a link [like this](https://llvm.org/). There is also a more
|
||||||
sophisticated syntax which [can be more readable] for longer links since
|
sophisticated syntax which [can be more readable] for longer links since
|
||||||
it disrupts the flow less. You can put the `[link name]: <URL>` block
|
it disrupts the flow less. You can put the `[link name]: <URL>` block
|
||||||
pretty much anywhere later in the document.
|
pretty much anywhere later in the document.
|
||||||
|
@ -39,16 +39,16 @@ LLVM code fundamentals. In this article, we assume the reader is familiar with
|
|||||||
`Single Static Assignment
|
`Single Static Assignment
|
||||||
<http://en.wikipedia.org/wiki/Static_single_assignment_form>`_
|
<http://en.wikipedia.org/wiki/Static_single_assignment_form>`_
|
||||||
concept and has an understanding of
|
concept and has an understanding of
|
||||||
`IR structure <http://llvm.org/docs/LangRef.html#high-level-structure>`_.
|
`IR structure <https://llvm.org/docs/LangRef.html#high-level-structure>`_.
|
||||||
|
|
||||||
We will use terms such as
|
We will use terms such as
|
||||||
"`module <http://llvm.org/docs/LangRef.html#high-level-structure>`_",
|
"`module <https://llvm.org/docs/LangRef.html#high-level-structure>`_",
|
||||||
"`function <http://llvm.org/docs/ProgrammersManual.html#the-function-class>`_",
|
"`function <https://llvm.org/docs/ProgrammersManual.html#the-function-class>`_",
|
||||||
"`basic block <http://en.wikipedia.org/wiki/Basic_block>`_",
|
"`basic block <http://en.wikipedia.org/wiki/Basic_block>`_",
|
||||||
"`user <http://llvm.org/docs/ProgrammersManual.html#the-user-class>`_",
|
"`user <https://llvm.org/docs/ProgrammersManual.html#the-user-class>`_",
|
||||||
"`value <http://llvm.org/docs/ProgrammersManual.html#the-value-class>`_",
|
"`value <https://llvm.org/docs/ProgrammersManual.html#the-value-class>`_",
|
||||||
"`instruction
|
"`instruction
|
||||||
<http://llvm.org/docs/ProgrammersManual.html#the-instruction-class>`_".
|
<https://llvm.org/docs/ProgrammersManual.html#the-instruction-class>`_".
|
||||||
|
|
||||||
As a good starting point, the Kaleidoscope tutorial can be used:
|
As a good starting point, the Kaleidoscope tutorial can be used:
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ continuously growing source code that makes up the LLVM infrastructure. Note
|
|||||||
that this manual is not intended to serve as a replacement for reading the
|
that this manual is not intended to serve as a replacement for reading the
|
||||||
source code, so if you think there should be a method in one of these classes to
|
source code, so if you think there should be a method in one of these classes to
|
||||||
do something, but it's not listed, check the source. Links to the `doxygen
|
do something, but it's not listed, check the source. Links to the `doxygen
|
||||||
<http://llvm.org/doxygen/>`__ sources are provided to make this as easy as
|
<https://llvm.org/doxygen/>`__ sources are provided to make this as easy as
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
The first section of this document describes general information that is useful
|
The first section of this document describes general information that is useful
|
||||||
@ -32,7 +32,7 @@ to know when working in the LLVM infrastructure, and the second describes the
|
|||||||
Core LLVM classes. In the future this manual will be extended with information
|
Core LLVM classes. In the future this manual will be extended with information
|
||||||
describing how to use extension libraries, such as dominator information, CFG
|
describing how to use extension libraries, such as dominator information, CFG
|
||||||
traversal routines, and useful utilities like the ``InstVisitor`` (`doxygen
|
traversal routines, and useful utilities like the ``InstVisitor`` (`doxygen
|
||||||
<http://llvm.org/doxygen/InstVisitor_8h_source.html>`__) template.
|
<https://llvm.org/doxygen/InstVisitor_8h_source.html>`__) template.
|
||||||
|
|
||||||
.. _general:
|
.. _general:
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ they don't have some drawbacks (primarily stemming from the fact that
|
|||||||
``dynamic_cast<>`` only works on classes that have a v-table). Because they are
|
``dynamic_cast<>`` only works on classes that have a v-table). Because they are
|
||||||
used so often, you must know what they do and how they work. All of these
|
used so often, you must know what they do and how they work. All of these
|
||||||
templates are defined in the ``llvm/Support/Casting.h`` (`doxygen
|
templates are defined in the ``llvm/Support/Casting.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/Casting_8h_source.html>`__) file (note that you very
|
<https://llvm.org/doxygen/Casting_8h_source.html>`__) file (note that you very
|
||||||
rarely have to include this file directly).
|
rarely have to include this file directly).
|
||||||
|
|
||||||
``isa<>``:
|
``isa<>``:
|
||||||
@ -231,7 +231,7 @@ and clients can call it using any one of:
|
|||||||
Similarly, APIs which need to return a string may return a ``StringRef``
|
Similarly, APIs which need to return a string may return a ``StringRef``
|
||||||
instance, which can be used directly or converted to an ``std::string`` using
|
instance, which can be used directly or converted to an ``std::string`` using
|
||||||
the ``str`` member function. See ``llvm/ADT/StringRef.h`` (`doxygen
|
the ``str`` member function. See ``llvm/ADT/StringRef.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/StringRef_8h_source.html>`__) for more
|
<https://llvm.org/doxygen/StringRef_8h_source.html>`__) for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
You should rarely use the ``StringRef`` class directly, because it contains
|
You should rarely use the ``StringRef`` class directly, because it contains
|
||||||
@ -243,7 +243,7 @@ passed by value.
|
|||||||
The ``Twine`` class
|
The ``Twine`` class
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The ``Twine`` (`doxygen <http://llvm.org/doxygen/classllvm_1_1Twine.html>`__)
|
The ``Twine`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1Twine.html>`__)
|
||||||
class is an efficient way for APIs to accept concatenated strings. For example,
|
class is an efficient way for APIs to accept concatenated strings. For example,
|
||||||
a common LLVM paradigm is to name one instruction based on the name of another
|
a common LLVM paradigm is to name one instruction based on the name of another
|
||||||
instruction with a suffix, for example:
|
instruction with a suffix, for example:
|
||||||
@ -261,7 +261,7 @@ of strings until it is actually required, at which point it can be efficiently
|
|||||||
rendered directly into a character array. This avoids unnecessary heap
|
rendered directly into a character array. This avoids unnecessary heap
|
||||||
allocation involved in constructing the temporary results of string
|
allocation involved in constructing the temporary results of string
|
||||||
concatenation. See ``llvm/ADT/Twine.h`` (`doxygen
|
concatenation. See ``llvm/ADT/Twine.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/Twine_8h_source.html>`__) and :ref:`here <dss_twine>`
|
<https://llvm.org/doxygen/Twine_8h_source.html>`__) and :ref:`here <dss_twine>`
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
As with a ``StringRef``, ``Twine`` objects point to external memory and should
|
As with a ``StringRef``, ``Twine`` objects point to external memory and should
|
||||||
@ -1056,7 +1056,7 @@ The ``function_ref`` class template
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The ``function_ref``
|
The ``function_ref``
|
||||||
(`doxygen <http://llvm.org/doxygen/classllvm_1_1function__ref_3_01Ret_07Params_8_8_8_08_4.html>`__) class
|
(`doxygen <https://llvm.org/doxygen/classllvm_1_1function__ref_3_01Ret_07Params_8_8_8_08_4.html>`__) class
|
||||||
template represents a reference to a callable object, templated over the type
|
template represents a reference to a callable object, templated over the type
|
||||||
of the callable. This is a good choice for passing a callback to a function,
|
of the callable. This is a good choice for passing a callback to a function,
|
||||||
if you don't need to hold onto the callback after the function returns. In this
|
if you don't need to hold onto the callback after the function returns. In this
|
||||||
@ -1106,7 +1106,7 @@ you don't want them to always be noisy. A standard compromise is to comment
|
|||||||
them out, allowing you to enable them if you need them in the future.
|
them out, allowing you to enable them if you need them in the future.
|
||||||
|
|
||||||
The ``llvm/Support/Debug.h`` (`doxygen
|
The ``llvm/Support/Debug.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/Debug_8h_source.html>`__) file provides a macro named
|
<https://llvm.org/doxygen/Debug_8h_source.html>`__) file provides a macro named
|
||||||
``LLVM_DEBUG()`` that is a much nicer solution to this problem. Basically, you can
|
``LLVM_DEBUG()`` that is a much nicer solution to this problem. Basically, you can
|
||||||
put arbitrary code into the argument of the ``LLVM_DEBUG`` macro, and it is only
|
put arbitrary code into the argument of the ``LLVM_DEBUG`` macro, and it is only
|
||||||
executed if '``opt``' (or any other tool) is run with the '``-debug``' command
|
executed if '``opt``' (or any other tool) is run with the '``-debug``' command
|
||||||
@ -1203,7 +1203,7 @@ The ``Statistic`` class & ``-stats`` option
|
|||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
|
|
||||||
The ``llvm/ADT/Statistic.h`` (`doxygen
|
The ``llvm/ADT/Statistic.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/Statistic_8h_source.html>`__) file provides a class
|
<https://llvm.org/doxygen/Statistic_8h_source.html>`__) file provides a class
|
||||||
named ``Statistic`` that is used as a unified way to keep track of what the LLVM
|
named ``Statistic`` that is used as a unified way to keep track of what the LLVM
|
||||||
compiler is doing and how effective various optimizations are. It is useful to
|
compiler is doing and how effective various optimizations are. It is useful to
|
||||||
see what optimizations are contributing to making a particular program run
|
see what optimizations are contributing to making a particular program run
|
||||||
@ -1298,7 +1298,7 @@ They provide a framework for making parts of your code only execute a
|
|||||||
certain number of times.
|
certain number of times.
|
||||||
|
|
||||||
The ``llvm/Support/DebugCounter.h`` (`doxygen
|
The ``llvm/Support/DebugCounter.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/DebugCounter_8h_source.html>`__) file
|
<https://llvm.org/doxygen/DebugCounter_8h_source.html>`__) file
|
||||||
provides a class named ``DebugCounter`` that can be used to create
|
provides a class named ``DebugCounter`` that can be used to create
|
||||||
command line counter options that control execution of parts of your code.
|
command line counter options that control execution of parts of your code.
|
||||||
|
|
||||||
@ -2513,7 +2513,7 @@ If you're finding that you commonly iterate over a ``Function``'s
|
|||||||
``BasicBlock``\ s and then that ``BasicBlock``'s ``Instruction``\ s,
|
``BasicBlock``\ s and then that ``BasicBlock``'s ``Instruction``\ s,
|
||||||
``InstIterator`` should be used instead. You'll need to include
|
``InstIterator`` should be used instead. You'll need to include
|
||||||
``llvm/IR/InstIterator.h`` (`doxygen
|
``llvm/IR/InstIterator.h`` (`doxygen
|
||||||
<http://llvm.org/doxygen/InstIterator_8h.html>`__) and then instantiate
|
<https://llvm.org/doxygen/InstIterator_8h.html>`__) and then instantiate
|
||||||
``InstIterator``\ s explicitly in your code. Here's a small example that shows
|
``InstIterator``\ s explicitly in your code. Here's a small example that shows
|
||||||
how to dump all instructions in a function to the standard error stream:
|
how to dump all instructions in a function to the standard error stream:
|
||||||
|
|
||||||
@ -2664,7 +2664,7 @@ and in other situations, you may find that you want to treat ``CallInst``\ s and
|
|||||||
``InvokeInst``\ s the same way, even though their most-specific common base
|
``InvokeInst``\ s the same way, even though their most-specific common base
|
||||||
class is ``Instruction``, which includes lots of less closely-related things.
|
class is ``Instruction``, which includes lots of less closely-related things.
|
||||||
For these cases, LLVM provides a handy wrapper class called ``CallSite``
|
For these cases, LLVM provides a handy wrapper class called ``CallSite``
|
||||||
(`doxygen <http://llvm.org/doxygen/classllvm_1_1CallSite.html>`__) It is
|
(`doxygen <https://llvm.org/doxygen/classllvm_1_1CallSite.html>`__) It is
|
||||||
essentially a wrapper around an ``Instruction`` pointer, with some methods that
|
essentially a wrapper around an ``Instruction`` pointer, with some methods that
|
||||||
provide functionality common to ``CallInst``\ s and ``InvokeInst``\ s.
|
provide functionality common to ``CallInst``\ s and ``InvokeInst``\ s.
|
||||||
|
|
||||||
@ -2680,7 +2680,7 @@ Iterating over def-use & use-def chains
|
|||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Frequently, we might have an instance of the ``Value`` class (`doxygen
|
Frequently, we might have an instance of the ``Value`` class (`doxygen
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Value.html>`__) and we want to determine
|
<https://llvm.org/doxygen/classllvm_1_1Value.html>`__) and we want to determine
|
||||||
which ``User``\ s use the ``Value``. The list of all ``User``\ s of a particular
|
which ``User``\ s use the ``Value``. The list of all ``User``\ s of a particular
|
||||||
``Value`` is called a *def-use* chain. For example, let's say we have a
|
``Value`` is called a *def-use* chain. For example, let's say we have a
|
||||||
``Function*`` named ``F`` to a particular function ``foo``. Finding all of the
|
``Function*`` named ``F`` to a particular function ``foo``. Finding all of the
|
||||||
@ -2698,7 +2698,7 @@ chain of ``F``:
|
|||||||
}
|
}
|
||||||
|
|
||||||
Alternatively, it's common to have an instance of the ``User`` Class (`doxygen
|
Alternatively, it's common to have an instance of the ``User`` Class (`doxygen
|
||||||
<http://llvm.org/doxygen/classllvm_1_1User.html>`__) and need to know what
|
<https://llvm.org/doxygen/classllvm_1_1User.html>`__) and need to know what
|
||||||
``Value``\ s are used by it. The list of all ``Value``\ s used by a ``User`` is
|
``Value``\ s are used by it. The list of all ``Value``\ s used by a ``User`` is
|
||||||
known as a *use-def* chain. Instances of class ``Instruction`` are common
|
known as a *use-def* chain. Instances of class ``Instruction`` are common
|
||||||
``User`` s, so we might want to iterate over all of the values that a particular
|
``User`` s, so we might want to iterate over all of the values that a particular
|
||||||
@ -2770,7 +2770,7 @@ will create an ``AllocaInst`` instance that represents the allocation of one
|
|||||||
integer in the current stack frame, at run time. Each ``Instruction`` subclass
|
integer in the current stack frame, at run time. Each ``Instruction`` subclass
|
||||||
is likely to have varying default parameters which change the semantics of the
|
is likely to have varying default parameters which change the semantics of the
|
||||||
instruction, so refer to the `doxygen documentation for the subclass of
|
instruction, so refer to the `doxygen documentation for the subclass of
|
||||||
Instruction <http://llvm.org/doxygen/classllvm_1_1Instruction.html>`_ that
|
Instruction <https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_ that
|
||||||
you're interested in instantiating.
|
you're interested in instantiating.
|
||||||
|
|
||||||
*Naming values*
|
*Naming values*
|
||||||
@ -2928,7 +2928,7 @@ Replacing individual instructions
|
|||||||
"""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
Including "`llvm/Transforms/Utils/BasicBlockUtils.h
|
Including "`llvm/Transforms/Utils/BasicBlockUtils.h
|
||||||
<http://llvm.org/doxygen/BasicBlockUtils_8h_source.html>`_" permits use of two
|
<https://llvm.org/doxygen/BasicBlockUtils_8h_source.html>`_" permits use of two
|
||||||
very useful replace functions: ``ReplaceInstWithValue`` and
|
very useful replace functions: ``ReplaceInstWithValue`` and
|
||||||
``ReplaceInstWithInst``.
|
``ReplaceInstWithInst``.
|
||||||
|
|
||||||
@ -2974,8 +2974,8 @@ Replacing multiple uses of Users and Values
|
|||||||
|
|
||||||
You can use ``Value::replaceAllUsesWith`` and ``User::replaceUsesOfWith`` to
|
You can use ``Value::replaceAllUsesWith`` and ``User::replaceUsesOfWith`` to
|
||||||
change more than one use at a time. See the doxygen documentation for the
|
change more than one use at a time. See the doxygen documentation for the
|
||||||
`Value Class <http://llvm.org/doxygen/classllvm_1_1Value.html>`_ and `User Class
|
`Value Class <https://llvm.org/doxygen/classllvm_1_1Value.html>`_ and `User Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1User.html>`_, respectively, for more
|
<https://llvm.org/doxygen/classllvm_1_1User.html>`_, respectively, for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
.. _schanges_deletingGV:
|
.. _schanges_deletingGV:
|
||||||
@ -3103,7 +3103,7 @@ The ``ValueSymbolTable`` class
|
|||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
The ``ValueSymbolTable`` (`doxygen
|
The ``ValueSymbolTable`` (`doxygen
|
||||||
<http://llvm.org/doxygen/classllvm_1_1ValueSymbolTable.html>`__) class provides
|
<https://llvm.org/doxygen/classllvm_1_1ValueSymbolTable.html>`__) class provides
|
||||||
a symbol table that the :ref:`Function <c_Function>` and Module_ classes use for
|
a symbol table that the :ref:`Function <c_Function>` and Module_ classes use for
|
||||||
naming value definitions. The symbol table can provide a name for any Value_.
|
naming value definitions. The symbol table can provide a name for any Value_.
|
||||||
|
|
||||||
@ -3124,10 +3124,10 @@ autoinsert it into the appropriate symbol table.
|
|||||||
The ``User`` and owned ``Use`` classes' memory layout
|
The ``User`` and owned ``Use`` classes' memory layout
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
|
|
||||||
The ``User`` (`doxygen <http://llvm.org/doxygen/classllvm_1_1User.html>`__)
|
The ``User`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1User.html>`__)
|
||||||
class provides a basis for expressing the ownership of ``User`` towards other
|
class provides a basis for expressing the ownership of ``User`` towards other
|
||||||
`Value instance <http://llvm.org/doxygen/classllvm_1_1Value.html>`_\ s. The
|
`Value instance <https://llvm.org/doxygen/classllvm_1_1Value.html>`_\ s. The
|
||||||
``Use`` (`doxygen <http://llvm.org/doxygen/classllvm_1_1Use.html>`__) helper
|
``Use`` (`doxygen <https://llvm.org/doxygen/classllvm_1_1Use.html>`__) helper
|
||||||
class is employed to do the bookkeeping and to facilitate *O(1)* addition and
|
class is employed to do the bookkeeping and to facilitate *O(1)* addition and
|
||||||
removal.
|
removal.
|
||||||
|
|
||||||
@ -3414,9 +3414,9 @@ The Core LLVM Class Hierarchy Reference
|
|||||||
|
|
||||||
``#include "llvm/IR/Type.h"``
|
``#include "llvm/IR/Type.h"``
|
||||||
|
|
||||||
header source: `Type.h <http://llvm.org/doxygen/Type_8h_source.html>`_
|
header source: `Type.h <https://llvm.org/doxygen/Type_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `Type Classes <http://llvm.org/doxygen/classllvm_1_1Type.html>`_
|
doxygen info: `Type Classes <https://llvm.org/doxygen/classllvm_1_1Type.html>`_
|
||||||
|
|
||||||
The Core LLVM classes are the primary means of representing the program being
|
The Core LLVM classes are the primary means of representing the program being
|
||||||
inspected or transformed. The core LLVM classes are defined in header files in
|
inspected or transformed. The core LLVM classes are defined in header files in
|
||||||
@ -3518,9 +3518,9 @@ The ``Module`` class
|
|||||||
|
|
||||||
``#include "llvm/IR/Module.h"``
|
``#include "llvm/IR/Module.h"``
|
||||||
|
|
||||||
header source: `Module.h <http://llvm.org/doxygen/Module_8h_source.html>`_
|
header source: `Module.h <https://llvm.org/doxygen/Module_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `Module Class <http://llvm.org/doxygen/classllvm_1_1Module.html>`_
|
doxygen info: `Module Class <https://llvm.org/doxygen/classllvm_1_1Module.html>`_
|
||||||
|
|
||||||
The ``Module`` class represents the top level structure present in LLVM
|
The ``Module`` class represents the top level structure present in LLVM
|
||||||
programs. An LLVM module is effectively either a translation unit of the
|
programs. An LLVM module is effectively either a translation unit of the
|
||||||
@ -3611,9 +3611,9 @@ The ``Value`` class
|
|||||||
|
|
||||||
``#include "llvm/IR/Value.h"``
|
``#include "llvm/IR/Value.h"``
|
||||||
|
|
||||||
header source: `Value.h <http://llvm.org/doxygen/Value_8h_source.html>`_
|
header source: `Value.h <https://llvm.org/doxygen/Value_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `Value Class <http://llvm.org/doxygen/classllvm_1_1Value.html>`_
|
doxygen info: `Value Class <https://llvm.org/doxygen/classllvm_1_1Value.html>`_
|
||||||
|
|
||||||
The ``Value`` class is the most important class in the LLVM Source base. It
|
The ``Value`` class is the most important class in the LLVM Source base. It
|
||||||
represents a typed value that may be used (among other things) as an operand to
|
represents a typed value that may be used (among other things) as an operand to
|
||||||
@ -3702,9 +3702,9 @@ The ``User`` class
|
|||||||
|
|
||||||
``#include "llvm/IR/User.h"``
|
``#include "llvm/IR/User.h"``
|
||||||
|
|
||||||
header source: `User.h <http://llvm.org/doxygen/User_8h_source.html>`_
|
header source: `User.h <https://llvm.org/doxygen/User_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `User Class <http://llvm.org/doxygen/classllvm_1_1User.html>`_
|
doxygen info: `User Class <https://llvm.org/doxygen/classllvm_1_1User.html>`_
|
||||||
|
|
||||||
Superclass: Value_
|
Superclass: Value_
|
||||||
|
|
||||||
@ -3749,10 +3749,10 @@ The ``Instruction`` class
|
|||||||
``#include "llvm/IR/Instruction.h"``
|
``#include "llvm/IR/Instruction.h"``
|
||||||
|
|
||||||
header source: `Instruction.h
|
header source: `Instruction.h
|
||||||
<http://llvm.org/doxygen/Instruction_8h_source.html>`_
|
<https://llvm.org/doxygen/Instruction_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `Instruction Class
|
doxygen info: `Instruction Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Instruction.html>`_
|
<https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_
|
||||||
|
|
||||||
Superclasses: User_, Value_
|
Superclasses: User_, Value_
|
||||||
|
|
||||||
@ -3773,7 +3773,7 @@ instructions in LLVM. It describes the enum values that are used as opcodes
|
|||||||
concrete sub-classes of ``Instruction`` that implement the instruction (for
|
concrete sub-classes of ``Instruction`` that implement the instruction (for
|
||||||
example BinaryOperator_ and CmpInst_). Unfortunately, the use of macros in this
|
example BinaryOperator_ and CmpInst_). Unfortunately, the use of macros in this
|
||||||
file confuses doxygen, so these enum values don't show up correctly in the
|
file confuses doxygen, so these enum values don't show up correctly in the
|
||||||
`doxygen output <http://llvm.org/doxygen/classllvm_1_1Instruction.html>`_.
|
`doxygen output <https://llvm.org/doxygen/classllvm_1_1Instruction.html>`_.
|
||||||
|
|
||||||
.. _s_Instruction:
|
.. _s_Instruction:
|
||||||
|
|
||||||
@ -3890,10 +3890,10 @@ The ``GlobalValue`` class
|
|||||||
``#include "llvm/IR/GlobalValue.h"``
|
``#include "llvm/IR/GlobalValue.h"``
|
||||||
|
|
||||||
header source: `GlobalValue.h
|
header source: `GlobalValue.h
|
||||||
<http://llvm.org/doxygen/GlobalValue_8h_source.html>`_
|
<https://llvm.org/doxygen/GlobalValue_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `GlobalValue Class
|
doxygen info: `GlobalValue Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1GlobalValue.html>`_
|
<https://llvm.org/doxygen/classllvm_1_1GlobalValue.html>`_
|
||||||
|
|
||||||
Superclasses: Constant_, User_, Value_
|
Superclasses: Constant_, User_, Value_
|
||||||
|
|
||||||
@ -3948,10 +3948,10 @@ The ``Function`` class
|
|||||||
|
|
||||||
``#include "llvm/IR/Function.h"``
|
``#include "llvm/IR/Function.h"``
|
||||||
|
|
||||||
header source: `Function.h <http://llvm.org/doxygen/Function_8h_source.html>`_
|
header source: `Function.h <https://llvm.org/doxygen/Function_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `Function Class
|
doxygen info: `Function Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Function.html>`_
|
<https://llvm.org/doxygen/classllvm_1_1Function.html>`_
|
||||||
|
|
||||||
Superclasses: GlobalValue_, Constant_, User_, Value_
|
Superclasses: GlobalValue_, Constant_, User_, Value_
|
||||||
|
|
||||||
@ -4057,10 +4057,10 @@ The ``GlobalVariable`` class
|
|||||||
``#include "llvm/IR/GlobalVariable.h"``
|
``#include "llvm/IR/GlobalVariable.h"``
|
||||||
|
|
||||||
header source: `GlobalVariable.h
|
header source: `GlobalVariable.h
|
||||||
<http://llvm.org/doxygen/GlobalVariable_8h_source.html>`_
|
<https://llvm.org/doxygen/GlobalVariable_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `GlobalVariable Class
|
doxygen info: `GlobalVariable Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1GlobalVariable.html>`_
|
<https://llvm.org/doxygen/classllvm_1_1GlobalVariable.html>`_
|
||||||
|
|
||||||
Superclasses: GlobalValue_, Constant_, User_, Value_
|
Superclasses: GlobalValue_, Constant_, User_, Value_
|
||||||
|
|
||||||
@ -4115,10 +4115,10 @@ The ``BasicBlock`` class
|
|||||||
``#include "llvm/IR/BasicBlock.h"``
|
``#include "llvm/IR/BasicBlock.h"``
|
||||||
|
|
||||||
header source: `BasicBlock.h
|
header source: `BasicBlock.h
|
||||||
<http://llvm.org/doxygen/BasicBlock_8h_source.html>`_
|
<https://llvm.org/doxygen/BasicBlock_8h_source.html>`_
|
||||||
|
|
||||||
doxygen info: `BasicBlock Class
|
doxygen info: `BasicBlock Class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1BasicBlock.html>`_
|
<https://llvm.org/doxygen/classllvm_1_1BasicBlock.html>`_
|
||||||
|
|
||||||
Superclass: Value_
|
Superclass: Value_
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ Currently
|
|||||||
# direct SVN checkout
|
# direct SVN checkout
|
||||||
svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm
|
svn co https://user@llvm.org/svn/llvm-project/llvm/trunk llvm
|
||||||
# or using the read-only Git view, with git-svn
|
# or using the read-only Git view, with git-svn
|
||||||
git clone http://llvm.org/git/llvm.git
|
git clone https://llvm.org/git/llvm.git
|
||||||
cd llvm
|
cd llvm
|
||||||
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
|
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
|
||||||
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
||||||
@ -381,29 +381,29 @@ Currently
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm -r $REVISION
|
svn co https://llvm.org/svn/llvm-project/llvm/trunk llvm -r $REVISION
|
||||||
cd llvm/tools
|
cd llvm/tools
|
||||||
svn co http://llvm.org/svn/llvm-project/clang/trunk clang -r $REVISION
|
svn co https://llvm.org/svn/llvm-project/clang/trunk clang -r $REVISION
|
||||||
cd ../projects
|
cd ../projects
|
||||||
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx -r $REVISION
|
svn co https://llvm.org/svn/llvm-project/libcxx/trunk libcxx -r $REVISION
|
||||||
|
|
||||||
Or using git-svn::
|
Or using git-svn::
|
||||||
|
|
||||||
git clone http://llvm.org/git/llvm.git
|
git clone https://llvm.org/git/llvm.git
|
||||||
cd llvm/
|
cd llvm/
|
||||||
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
|
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
|
||||||
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
||||||
git svn rebase -l
|
git svn rebase -l
|
||||||
git checkout `git svn find-rev -B r258109`
|
git checkout `git svn find-rev -B r258109`
|
||||||
cd tools
|
cd tools
|
||||||
git clone http://llvm.org/git/clang.git
|
git clone https://llvm.org/git/clang.git
|
||||||
cd clang/
|
cd clang/
|
||||||
git svn init https://llvm.org/svn/llvm-project/clang/trunk --username=<username>
|
git svn init https://llvm.org/svn/llvm-project/clang/trunk --username=<username>
|
||||||
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
||||||
git svn rebase -l
|
git svn rebase -l
|
||||||
git checkout `git svn find-rev -B r258109`
|
git checkout `git svn find-rev -B r258109`
|
||||||
cd ../../projects/
|
cd ../../projects/
|
||||||
git clone http://llvm.org/git/libcxx.git
|
git clone https://llvm.org/git/libcxx.git
|
||||||
cd libcxx
|
cd libcxx
|
||||||
git svn init https://llvm.org/svn/llvm-project/libcxx/trunk --username=<username>
|
git svn init https://llvm.org/svn/llvm-project/libcxx/trunk --username=<username>
|
||||||
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
git config svn-remote.svn.fetch :refs/remotes/origin/master
|
||||||
|
@ -5,7 +5,7 @@ LLVM's documentation is written in reStructuredText, a lightweight
|
|||||||
plaintext markup language (file extension `.rst`). While the
|
plaintext markup language (file extension `.rst`). While the
|
||||||
reStructuredText documentation should be quite readable in source form, it
|
reStructuredText documentation should be quite readable in source form, it
|
||||||
is mostly meant to be processed by the Sphinx documentation generation
|
is mostly meant to be processed by the Sphinx documentation generation
|
||||||
system to create HTML pages which are hosted on <http://llvm.org/docs/> and
|
system to create HTML pages which are hosted on <https://llvm.org/docs/> and
|
||||||
updated after every commit. Manpage output is also supported, see below.
|
updated after every commit. Manpage output is also supported, see below.
|
||||||
|
|
||||||
If you instead would like to generate and view the HTML locally, install
|
If you instead would like to generate and view the HTML locally, install
|
||||||
@ -17,7 +17,7 @@ Sphinx <http://sphinx-doc.org/> and then do:
|
|||||||
$BROWSER <build-dir>/docs//html/index.html
|
$BROWSER <build-dir>/docs//html/index.html
|
||||||
|
|
||||||
The mapping between reStructuredText files and generated documentation is
|
The mapping between reStructuredText files and generated documentation is
|
||||||
`docs/Foo.rst` <-> `<build-dir>/docs//html/Foo.html` <-> `http://llvm.org/docs/Foo.html`.
|
`docs/Foo.rst` <-> `<build-dir>/docs//html/Foo.html` <-> `https://llvm.org/docs/Foo.html`.
|
||||||
|
|
||||||
If you are interested in writing new documentation, you will want to read
|
If you are interested in writing new documentation, you will want to read
|
||||||
`SphinxQuickstartTemplate.rst` which will get you writing documentation
|
`SphinxQuickstartTemplate.rst` which will get you writing documentation
|
||||||
@ -41,7 +41,7 @@ The correspondence between .rst files and man pages is
|
|||||||
`docs/CommandGuide/Foo.rst` <-> `<build-dir>/docs//man/Foo.1`.
|
`docs/CommandGuide/Foo.rst` <-> `<build-dir>/docs//man/Foo.1`.
|
||||||
These .rst files are also included during HTML generation so they are also
|
These .rst files are also included during HTML generation so they are also
|
||||||
viewable online (as noted above) at e.g.
|
viewable online (as noted above) at e.g.
|
||||||
`http://llvm.org/docs/CommandGuide/Foo.html`.
|
`https://llvm.org/docs/CommandGuide/Foo.html`.
|
||||||
|
|
||||||
Checking links
|
Checking links
|
||||||
==============
|
==============
|
||||||
|
@ -53,8 +53,8 @@ LLVM and API reference documentation.
|
|||||||
API Reference
|
API Reference
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
`Doxygen generated documentation <http://llvm.org/doxygen/>`_
|
`Doxygen generated documentation <https://llvm.org/doxygen/>`_
|
||||||
(`classes <http://llvm.org/doxygen/inherits.html>`_)
|
(`classes <https://llvm.org/doxygen/inherits.html>`_)
|
||||||
|
|
||||||
:doc:`HowToUseAttributes`
|
:doc:`HowToUseAttributes`
|
||||||
Answers some questions about the new Attributes infrastructure.
|
Answers some questions about the new Attributes infrastructure.
|
||||||
|
@ -115,7 +115,7 @@ Test Suite
|
|||||||
:local:
|
:local:
|
||||||
|
|
||||||
Follow the `LNT Quick Start Guide
|
Follow the `LNT Quick Start Guide
|
||||||
<http://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the
|
<https://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the
|
||||||
test-suite
|
test-suite
|
||||||
|
|
||||||
The binary location you'll have to use for testing is inside the
|
The binary location you'll have to use for testing is inside the
|
||||||
@ -160,7 +160,7 @@ candidates, on the previous release.
|
|||||||
You should:
|
You should:
|
||||||
|
|
||||||
* Download the previous release sources from
|
* Download the previous release sources from
|
||||||
http://llvm.org/releases/download.html.
|
https://llvm.org/releases/download.html.
|
||||||
|
|
||||||
* Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to
|
* Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to
|
||||||
``-final``).
|
``-final``).
|
||||||
@ -190,7 +190,7 @@ to them), and run the release test as above.
|
|||||||
You should:
|
You should:
|
||||||
|
|
||||||
* Download the current candidate sources from where the release manager points
|
* Download the current candidate sources from where the release manager points
|
||||||
you (ex. http://llvm.org/pre-releases/3.3/rc1/).
|
you (ex. https://llvm.org/pre-releases/3.3/rc1/).
|
||||||
|
|
||||||
* Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the
|
* Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the
|
||||||
test-suite the same way.
|
test-suite the same way.
|
||||||
|
@ -84,7 +84,7 @@ To create a new paragraph, simply insert a blank line.
|
|||||||
Links
|
Links
|
||||||
=====
|
=====
|
||||||
|
|
||||||
You can format a link `like this <http://llvm.org/>`_. A more `sophisticated syntax`_ allows you to place the ``.. _`link text`: <URL>`` block
|
You can format a link `like this <https://llvm.org/>`_. A more `sophisticated syntax`_ allows you to place the ``.. _`link text`: <URL>`` block
|
||||||
pretty much anywhere else in the document. This is useful when linking to especially long URLs.
|
pretty much anywhere else in the document. This is useful when linking to especially long URLs.
|
||||||
|
|
||||||
.. _`sophisticated syntax`: http://en.wikipedia.org/wiki/LLVM
|
.. _`sophisticated syntax`: http://en.wikipedia.org/wiki/LLVM
|
||||||
|
@ -28,7 +28,7 @@ hands the result off to a domain-specific `backend`_ for processing.
|
|||||||
|
|
||||||
The current major users of TableGen are :doc:`../CodeGenerator`
|
The current major users of TableGen are :doc:`../CodeGenerator`
|
||||||
and the
|
and the
|
||||||
`Clang diagnostics and attributes <http://clang.llvm.org/docs/UsersManual.html#controlling-errors-and-warnings>`_.
|
`Clang diagnostics and attributes <https://clang.llvm.org/docs/UsersManual.html#controlling-errors-and-warnings>`_.
|
||||||
|
|
||||||
Note that if you work on TableGen much, and use emacs or vim, that you can find
|
Note that if you work on TableGen much, and use emacs or vim, that you can find
|
||||||
an emacs "TableGen mode" and a vim language file in the ``llvm/utils/emacs`` and
|
an emacs "TableGen mode" and a vim language file in the ``llvm/utils/emacs`` and
|
||||||
|
@ -19,7 +19,7 @@ Quickstart
|
|||||||
% mkdir venv
|
% mkdir venv
|
||||||
% virtualenv venv
|
% virtualenv venv
|
||||||
% . venv/bin/activate
|
% . venv/bin/activate
|
||||||
% pip install svn+http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit
|
% pip install svn+https://llvm.org/svn/llvm-project/llvm/trunk/utils/lit
|
||||||
% lit --version
|
% lit --version
|
||||||
lit 0.8.0dev
|
lit 0.8.0dev
|
||||||
```
|
```
|
||||||
@ -279,7 +279,7 @@ Example usage:
|
|||||||
|
|
||||||
LNT is a set of client and server tools for continuously monitoring
|
LNT is a set of client and server tools for continuously monitoring
|
||||||
performance. You can find more information at
|
performance. You can find more information at
|
||||||
[http://llvm.org/docs/lnt](http://llvm.org/docs/lnt). The official LNT instance
|
[https://llvm.org/docs/lnt](https://llvm.org/docs/lnt). The official LNT instance
|
||||||
of the LLVM project is hosted at [http://lnt.llvm.org](http://lnt.llvm.org).
|
of the LLVM project is hosted at [http://lnt.llvm.org](http://lnt.llvm.org).
|
||||||
|
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ Cross Compilation and External Devices
|
|||||||
CMake allows to cross compile to a different target via toolchain files. More
|
CMake allows to cross compile to a different target via toolchain files. More
|
||||||
information can be found here:
|
information can be found here:
|
||||||
|
|
||||||
- [http://llvm.org/docs/lnt/tests.html#cross-compiling](http://llvm.org/docs/lnt/tests.html#cross-compiling)
|
- [https://llvm.org/docs/lnt/tests.html#cross-compiling](https://llvm.org/docs/lnt/tests.html#cross-compiling)
|
||||||
|
|
||||||
- [https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html)
|
- [https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html)
|
||||||
|
|
||||||
@ -389,7 +389,7 @@ Running the test-suite via LNT
|
|||||||
|
|
||||||
The LNT tool can run the test-suite. Use this when submitting test results to
|
The LNT tool can run the test-suite. Use this when submitting test results to
|
||||||
an LNT instance. See
|
an LNT instance. See
|
||||||
[http://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite](http://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite)
|
[https://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite](https://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite)
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
Running the test-suite via Makefiles (deprecated)
|
Running the test-suite via Makefiles (deprecated)
|
||||||
|
@ -129,7 +129,7 @@ in release mode, i.e.
|
|||||||
|
|
||||||
% cmake -DCMAKE_BUILD_TYPE="Release" -DLLVM_ENABLE_ASSERTIONS=On
|
% cmake -DCMAKE_BUILD_TYPE="Release" -DLLVM_ENABLE_ASSERTIONS=On
|
||||||
|
|
||||||
If you have `Clang <http://clang.llvm.org/>`_ checked out and built, you
|
If you have `Clang <https://clang.llvm.org/>`_ checked out and built, you
|
||||||
can run the LLVM and Clang tests simultaneously using:
|
can run the LLVM and Clang tests simultaneously using:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -29,7 +29,7 @@ or functions.
|
|||||||
An intrinsic, :ref:`llvm.type.test <type.test>`, is used to test whether a
|
An intrinsic, :ref:`llvm.type.test <type.test>`, is used to test whether a
|
||||||
given pointer is associated with a type identifier.
|
given pointer is associated with a type identifier.
|
||||||
|
|
||||||
.. _control flow integrity: http://clang.llvm.org/docs/ControlFlowIntegrity.html
|
.. _control flow integrity: https://clang.llvm.org/docs/ControlFlowIntegrity.html
|
||||||
|
|
||||||
Representing Type Information using Type Metadata
|
Representing Type Information using Type Metadata
|
||||||
=================================================
|
=================================================
|
||||||
@ -160,7 +160,7 @@ as the former will be the jump table entry if a jump table is necessary.
|
|||||||
The `GlobalLayoutBuilder`_ class is responsible for laying out the globals
|
The `GlobalLayoutBuilder`_ class is responsible for laying out the globals
|
||||||
efficiently to minimize the sizes of the underlying bitsets.
|
efficiently to minimize the sizes of the underlying bitsets.
|
||||||
|
|
||||||
.. _control flow integrity design document: http://clang.llvm.org/docs/ControlFlowIntegrityDesign.html
|
.. _control flow integrity design document: https://clang.llvm.org/docs/ControlFlowIntegrityDesign.html
|
||||||
|
|
||||||
:Example:
|
:Example:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ User Guides
|
|||||||
===========
|
===========
|
||||||
|
|
||||||
NOTE: If you are a user who is only interested in using an LLVM-based compiler,
|
NOTE: If you are a user who is only interested in using an LLVM-based compiler,
|
||||||
you should look into `Clang <http://clang.llvm.org>`_ instead. The
|
you should look into `Clang <https://clang.llvm.org>`_ instead. The
|
||||||
documentation here is intended for users who have a need to work with the
|
documentation here is intended for users who have a need to work with the
|
||||||
intermediate LLVM representation.
|
intermediate LLVM representation.
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Clang
|
|||||||
`How to build the C, C++, ObjC, and ObjC++ front end`__
|
`How to build the C, C++, ObjC, and ObjC++ front end`__
|
||||||
Instructions for building the clang front-end from source.
|
Instructions for building the clang front-end from source.
|
||||||
|
|
||||||
.. __: http://clang.llvm.org/get_started.html
|
.. __: https://clang.llvm.org/get_started.html
|
||||||
|
|
||||||
:doc:`CoverageMappingFormat`
|
:doc:`CoverageMappingFormat`
|
||||||
This describes the format and encoding used for LLVM’s code coverage mapping.
|
This describes the format and encoding used for LLVM’s code coverage mapping.
|
||||||
|
@ -80,7 +80,7 @@ specifying a vector width and interleaving count:
|
|||||||
|
|
||||||
See the Clang
|
See the Clang
|
||||||
`language extensions
|
`language extensions
|
||||||
<http://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
|
<https://clang.llvm.org/docs/LanguageExtensions.html#extensions-for-loop-hint-optimizations>`_
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
Diagnostics
|
Diagnostics
|
||||||
@ -133,7 +133,7 @@ switch statement cannot be vectorized.
|
|||||||
|
|
||||||
To ensure line and column numbers are produced include the command line options
|
To ensure line and column numbers are produced include the command line options
|
||||||
``-gline-tables-only`` and ``-gcolumn-info``. See the Clang `user manual
|
``-gline-tables-only`` and ``-gcolumn-info``. See the Clang `user manual
|
||||||
<http://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports>`_
|
<https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports>`_
|
||||||
for details
|
for details
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
@ -17,7 +17,7 @@ build the analysis results that are used by these transformations, and they
|
|||||||
are, above all, a structuring technique for compiler code.
|
are, above all, a structuring technique for compiler code.
|
||||||
|
|
||||||
All LLVM passes are subclasses of the `Pass
|
All LLVM passes are subclasses of the `Pass
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Pass.html>`_ class, which implement
|
<https://llvm.org/doxygen/classllvm_1_1Pass.html>`_ class, which implement
|
||||||
functionality by overriding virtual methods inherited from ``Pass``. Depending
|
functionality by overriding virtual methods inherited from ``Pass``. Depending
|
||||||
on how your pass works, you should inherit from the :ref:`ModulePass
|
on how your pass works, you should inherit from the :ref:`ModulePass
|
||||||
<writing-an-llvm-pass-ModulePass>` , :ref:`CallGraphSCCPass
|
<writing-an-llvm-pass-ModulePass>` , :ref:`CallGraphSCCPass
|
||||||
@ -98,8 +98,8 @@ Start out with:
|
|||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
|
||||||
Which are needed because we are writing a `Pass
|
Which are needed because we are writing a `Pass
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Pass.html>`_, we are operating on
|
<https://llvm.org/doxygen/classllvm_1_1Pass.html>`_, we are operating on
|
||||||
`Function <http://llvm.org/doxygen/classllvm_1_1Function.html>`_\ s, and we will
|
`Function <https://llvm.org/doxygen/classllvm_1_1Function.html>`_\ s, and we will
|
||||||
be doing some printing.
|
be doing some printing.
|
||||||
|
|
||||||
Next we have:
|
Next we have:
|
||||||
@ -336,7 +336,7 @@ The ``ImmutablePass`` class
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The most plain and boring type of pass is the "`ImmutablePass
|
The most plain and boring type of pass is the "`ImmutablePass
|
||||||
<http://llvm.org/doxygen/classllvm_1_1ImmutablePass.html>`_" class. This pass
|
<https://llvm.org/doxygen/classllvm_1_1ImmutablePass.html>`_" class. This pass
|
||||||
type is used for passes that do not have to be run, do not change state, and
|
type is used for passes that do not have to be run, do not change state, and
|
||||||
never need to be updated. This is not a normal type of transformation or
|
never need to be updated. This is not a normal type of transformation or
|
||||||
analysis, but can provide information about the current compiler configuration.
|
analysis, but can provide information about the current compiler configuration.
|
||||||
@ -353,7 +353,7 @@ invalidated, and are never "run".
|
|||||||
The ``ModulePass`` class
|
The ``ModulePass`` class
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
The `ModulePass <http://llvm.org/doxygen/classllvm_1_1ModulePass.html>`_ class
|
The `ModulePass <https://llvm.org/doxygen/classllvm_1_1ModulePass.html>`_ class
|
||||||
is the most general of all superclasses that you can use. Deriving from
|
is the most general of all superclasses that you can use. Deriving from
|
||||||
``ModulePass`` indicates that your pass uses the entire program as a unit,
|
``ModulePass`` indicates that your pass uses the entire program as a unit,
|
||||||
referring to function bodies in no predictable order, or adding and removing
|
referring to function bodies in no predictable order, or adding and removing
|
||||||
@ -388,7 +388,7 @@ The ``CallGraphSCCPass`` class
|
|||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
The `CallGraphSCCPass
|
The `CallGraphSCCPass
|
||||||
<http://llvm.org/doxygen/classllvm_1_1CallGraphSCCPass.html>`_ is used by
|
<https://llvm.org/doxygen/classllvm_1_1CallGraphSCCPass.html>`_ is used by
|
||||||
passes that need to traverse the program bottom-up on the call graph (callees
|
passes that need to traverse the program bottom-up on the call graph (callees
|
||||||
before callers). Deriving from ``CallGraphSCCPass`` provides some mechanics
|
before callers). Deriving from ``CallGraphSCCPass`` provides some mechanics
|
||||||
for building and traversing the ``CallGraph``, but also allows the system to
|
for building and traversing the ``CallGraph``, but also allows the system to
|
||||||
@ -460,7 +460,7 @@ The ``FunctionPass`` class
|
|||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
In contrast to ``ModulePass`` subclasses, `FunctionPass
|
In contrast to ``ModulePass`` subclasses, `FunctionPass
|
||||||
<http://llvm.org/doxygen/classllvm_1_1Pass.html>`_ subclasses do have a
|
<https://llvm.org/doxygen/classllvm_1_1Pass.html>`_ subclasses do have a
|
||||||
predictable, local behavior that can be expected by the system. All
|
predictable, local behavior that can be expected by the system. All
|
||||||
``FunctionPass`` execute on each function in the program independent of all of
|
``FunctionPass`` execute on each function in the program independent of all of
|
||||||
the other functions in the program. ``FunctionPass``\ es do not require that
|
the other functions in the program. ``FunctionPass``\ es do not require that
|
||||||
@ -498,7 +498,7 @@ being processed. The ``doInitialization`` method call is not scheduled to
|
|||||||
overlap with any other pass executions (thus it should be very fast).
|
overlap with any other pass executions (thus it should be very fast).
|
||||||
|
|
||||||
A good example of how this method should be used is the `LowerAllocations
|
A good example of how this method should be used is the `LowerAllocations
|
||||||
<http://llvm.org/doxygen/LowerAllocations_8cpp-source.html>`_ pass. This pass
|
<https://llvm.org/doxygen/LowerAllocations_8cpp-source.html>`_ pass. This pass
|
||||||
converts ``malloc`` and ``free`` instructions into platform dependent
|
converts ``malloc`` and ``free`` instructions into platform dependent
|
||||||
``malloc()`` and ``free()`` function calls. It uses the ``doInitialization``
|
``malloc()`` and ``free()`` function calls. It uses the ``doInitialization``
|
||||||
method to get a reference to the ``malloc`` and ``free`` functions that it
|
method to get a reference to the ``malloc`` and ``free`` functions that it
|
||||||
@ -761,7 +761,7 @@ The ``getAnalysisUsage`` method
|
|||||||
By implementing the ``getAnalysisUsage`` method, the required and invalidated
|
By implementing the ``getAnalysisUsage`` method, the required and invalidated
|
||||||
sets may be specified for your transformation. The implementation should fill
|
sets may be specified for your transformation. The implementation should fill
|
||||||
in the `AnalysisUsage
|
in the `AnalysisUsage
|
||||||
<http://llvm.org/doxygen/classllvm_1_1AnalysisUsage.html>`_ object with
|
<https://llvm.org/doxygen/classllvm_1_1AnalysisUsage.html>`_ object with
|
||||||
information about which passes are required and not invalidated. To do this, a
|
information about which passes are required and not invalidated. To do this, a
|
||||||
pass may call any of the following methods on the ``AnalysisUsage`` object:
|
pass may call any of the following methods on the ``AnalysisUsage`` object:
|
||||||
|
|
||||||
@ -914,14 +914,14 @@ be registered with :ref:`RegisterAnalysisGroup
|
|||||||
<writing-an-llvm-pass-RegisterAnalysisGroup>`.
|
<writing-an-llvm-pass-RegisterAnalysisGroup>`.
|
||||||
|
|
||||||
As a concrete example of an Analysis Group in action, consider the
|
As a concrete example of an Analysis Group in action, consider the
|
||||||
`AliasAnalysis <http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_
|
`AliasAnalysis <https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_
|
||||||
analysis group. The default implementation of the alias analysis interface
|
analysis group. The default implementation of the alias analysis interface
|
||||||
(the `basicaa <http://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass)
|
(the `basicaa <https://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass)
|
||||||
just does a few simple checks that don't require significant analysis to
|
just does a few simple checks that don't require significant analysis to
|
||||||
compute (such as: two different globals can never alias each other, etc).
|
compute (such as: two different globals can never alias each other, etc).
|
||||||
Passes that use the `AliasAnalysis
|
Passes that use the `AliasAnalysis
|
||||||
<http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_ interface (for
|
<https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_ interface (for
|
||||||
example the `gvn <http://llvm.org/doxygen/classllvm_1_1GVN.html>`_ pass), do not
|
example the `gvn <https://llvm.org/doxygen/classllvm_1_1GVN.html>`_ pass), do not
|
||||||
care which implementation of alias analysis is actually provided, they just use
|
care which implementation of alias analysis is actually provided, they just use
|
||||||
the designated interface.
|
the designated interface.
|
||||||
|
|
||||||
@ -963,7 +963,7 @@ implementations of the interface by using the following code:
|
|||||||
|
|
||||||
This just shows a class ``FancyAA`` that uses the ``INITIALIZE_AG_PASS`` macro
|
This just shows a class ``FancyAA`` that uses the ``INITIALIZE_AG_PASS`` macro
|
||||||
both to register and to "join" the `AliasAnalysis
|
both to register and to "join" the `AliasAnalysis
|
||||||
<http://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_ analysis group.
|
<https://llvm.org/doxygen/classllvm_1_1AliasAnalysis.html>`_ analysis group.
|
||||||
Every implementation of an analysis group should join using this macro.
|
Every implementation of an analysis group should join using this macro.
|
||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: c++
|
||||||
@ -982,13 +982,13 @@ argument to the ``INITIALIZE_AG_PASS`` template). There must be exactly one
|
|||||||
default implementation available at all times for an Analysis Group to be used.
|
default implementation available at all times for an Analysis Group to be used.
|
||||||
Only default implementation can derive from ``ImmutablePass``. Here we declare
|
Only default implementation can derive from ``ImmutablePass``. Here we declare
|
||||||
that the `BasicAliasAnalysis
|
that the `BasicAliasAnalysis
|
||||||
<http://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass is the default
|
<https://llvm.org/doxygen/structBasicAliasAnalysis.html>`_ pass is the default
|
||||||
implementation for the interface.
|
implementation for the interface.
|
||||||
|
|
||||||
Pass Statistics
|
Pass Statistics
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The `Statistic <http://llvm.org/doxygen/Statistic_8h_source.html>`_ class is
|
The `Statistic <https://llvm.org/doxygen/Statistic_8h_source.html>`_ class is
|
||||||
designed to be an easy way to expose various success metrics from passes.
|
designed to be an easy way to expose various success metrics from passes.
|
||||||
These statistics are printed at the end of a run, when the :option:`-stats`
|
These statistics are printed at the end of a run, when the :option:`-stats`
|
||||||
command line option is enabled on the command line. See the :ref:`Statistics
|
command line option is enabled on the command line. See the :ref:`Statistics
|
||||||
@ -999,8 +999,8 @@ section <Statistic>` in the Programmer's Manual for details.
|
|||||||
What PassManager does
|
What PassManager does
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
The `PassManager <http://llvm.org/doxygen/PassManager_8h_source.html>`_ `class
|
The `PassManager <https://llvm.org/doxygen/PassManager_8h_source.html>`_ `class
|
||||||
<http://llvm.org/doxygen/classllvm_1_1PassManager.html>`_ takes a list of
|
<https://llvm.org/doxygen/classllvm_1_1PassManager.html>`_ takes a list of
|
||||||
passes, ensures their :ref:`prerequisites <writing-an-llvm-pass-interaction>`
|
passes, ensures their :ref:`prerequisites <writing-an-llvm-pass-interaction>`
|
||||||
are set up correctly, and then schedules passes to run efficiently. All of the
|
are set up correctly, and then schedules passes to run efficiently. All of the
|
||||||
LLVM tools that run passes use the PassManager for execution of these passes.
|
LLVM tools that run passes use the PassManager for execution of these passes.
|
||||||
@ -1030,7 +1030,7 @@ series of passes:
|
|||||||
touching the LLVM program representation for a single function at a time,
|
touching the LLVM program representation for a single function at a time,
|
||||||
instead of traversing the entire program. It reduces the memory consumption
|
instead of traversing the entire program. It reduces the memory consumption
|
||||||
of compiler, because, for example, only one `DominatorSet
|
of compiler, because, for example, only one `DominatorSet
|
||||||
<http://llvm.org/doxygen/classllvm_1_1DominatorSet.html>`_ needs to be
|
<https://llvm.org/doxygen/classllvm_1_1DominatorSet.html>`_ needs to be
|
||||||
calculated at a time. This also makes it possible to implement some
|
calculated at a time. This also makes it possible to implement some
|
||||||
:ref:`interesting enhancements <writing-an-llvm-pass-SMP>` in the future.
|
:ref:`interesting enhancements <writing-an-llvm-pass-SMP>` in the future.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ About
|
|||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
If you are using a released version of LLVM, see `the download page
|
If you are using a released version of LLVM, see `the download page
|
||||||
<http://llvm.org/releases/>`_ to find your documentation.
|
<https://llvm.org/releases/>`_ to find your documentation.
|
||||||
|
|
||||||
The LLVM compiler infrastructure supports a wide range of projects, from
|
The LLVM compiler infrastructure supports a wide range of projects, from
|
||||||
industrial strength compilers to specialized JIT applications to small
|
industrial strength compilers to specialized JIT applications to small
|
||||||
@ -27,7 +27,7 @@ Several introductory papers and presentations.
|
|||||||
`Introduction to the LLVM Compiler`__
|
`Introduction to the LLVM Compiler`__
|
||||||
Presentation providing a users introduction to LLVM.
|
Presentation providing a users introduction to LLVM.
|
||||||
|
|
||||||
.. __: http://llvm.org/pubs/2008-10-04-ACAT-LLVM-Intro.html
|
.. __: https://llvm.org/pubs/2008-10-04-ACAT-LLVM-Intro.html
|
||||||
|
|
||||||
`Intro to LLVM`__
|
`Intro to LLVM`__
|
||||||
A chapter from the book "The Architecture of Open Source Applications" that
|
A chapter from the book "The Architecture of Open Source Applications" that
|
||||||
@ -39,12 +39,12 @@ Several introductory papers and presentations.
|
|||||||
`LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation`__
|
`LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation`__
|
||||||
Design overview.
|
Design overview.
|
||||||
|
|
||||||
.. __: http://llvm.org/pubs/2004-01-30-CGO-LLVM.html
|
.. __: https://llvm.org/pubs/2004-01-30-CGO-LLVM.html
|
||||||
|
|
||||||
`LLVM: An Infrastructure for Multi-Stage Optimization`__
|
`LLVM: An Infrastructure for Multi-Stage Optimization`__
|
||||||
More details (quite old now).
|
More details (quite old now).
|
||||||
|
|
||||||
.. __: http://llvm.org/pubs/2002-12-LattnerMSThesis.html
|
.. __: https://llvm.org/pubs/2002-12-LattnerMSThesis.html
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
=============
|
=============
|
||||||
|
@ -320,4 +320,4 @@ Here is the code:
|
|||||||
+-----------------------------+-----------------------------------------------+
|
+-----------------------------+-----------------------------------------------+
|
||||||
|
|
||||||
.. [3] See the ErrorHandling section in the LLVM Programmer's Manual
|
.. [3] See the ErrorHandling section in the LLVM Programmer's Manual
|
||||||
(http://llvm.org/docs/ProgrammersManual.html#error-handling)
|
(https://llvm.org/docs/ProgrammersManual.html#error-handling)
|
||||||
|
@ -718,7 +718,7 @@ Full Code Listing
|
|||||||
|
|
||||||
Here is the complete code listing for our running example. Because this
|
Here is the complete code listing for our running example. Because this
|
||||||
uses the LLVM libraries, we need to link them in. To do this, we use the
|
uses the LLVM libraries, we need to link them in. To do this, we use the
|
||||||
`llvm-config <http://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
`llvm-config <https://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
||||||
our makefile/command line about which options to use:
|
our makefile/command line about which options to use:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -20,7 +20,7 @@ later. LLVM 3.6 and before will not work with it. Also note that you
|
|||||||
need to use a version of this tutorial that matches your LLVM release:
|
need to use a version of this tutorial that matches your LLVM release:
|
||||||
If you are using an official LLVM release, use the version of the
|
If you are using an official LLVM release, use the version of the
|
||||||
documentation included with your release or on the `llvm.org releases
|
documentation included with your release or on the `llvm.org releases
|
||||||
page <http://llvm.org/releases/>`_.
|
page <https://llvm.org/releases/>`_.
|
||||||
|
|
||||||
Code Generation Setup
|
Code Generation Setup
|
||||||
=====================
|
=====================
|
||||||
@ -90,7 +90,7 @@ detail, we just need a single instance to pass into APIs that require it.
|
|||||||
|
|
||||||
The ``Builder`` object is a helper object that makes it easy to generate
|
The ``Builder`` object is a helper object that makes it easy to generate
|
||||||
LLVM instructions. Instances of the
|
LLVM instructions. Instances of the
|
||||||
`IRBuilder <http://llvm.org/doxygen/IRBuilder_8h-source.html>`_
|
`IRBuilder <https://llvm.org/doxygen/IRBuilder_8h-source.html>`_
|
||||||
class template keep track of the current place to insert instructions
|
class template keep track of the current place to insert instructions
|
||||||
and has methods to create new instructions.
|
and has methods to create new instructions.
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ Full Code Listing
|
|||||||
Here is the complete code listing for our running example, enhanced with
|
Here is the complete code listing for our running example, enhanced with
|
||||||
the LLVM code generator. Because this uses the LLVM libraries, we need
|
the LLVM code generator. Because this uses the LLVM libraries, we need
|
||||||
to link them in. To do this, we use the
|
to link them in. To do this, we use the
|
||||||
`llvm-config <http://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
`llvm-config <https://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
||||||
our makefile/command line about which options to use:
|
our makefile/command line about which options to use:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -98,7 +98,7 @@ LLVM Optimization Passes
|
|||||||
|
|
||||||
Due to the transition to the new PassManager infrastructure this tutorial
|
Due to the transition to the new PassManager infrastructure this tutorial
|
||||||
is based on ``llvm::legacy::FunctionPassManager`` which can be found in
|
is based on ``llvm::legacy::FunctionPassManager`` which can be found in
|
||||||
`LegacyPassManager.h <http://llvm.org/doxygen/classllvm_1_1legacy_1_1FunctionPassManager.html>`_.
|
`LegacyPassManager.h <https://llvm.org/doxygen/classllvm_1_1legacy_1_1FunctionPassManager.html>`_.
|
||||||
For the purpose of the this tutorial the above should be used until
|
For the purpose of the this tutorial the above should be used until
|
||||||
the pass manager transition is complete.
|
the pass manager transition is complete.
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ Kaleidoscope looks like this:
|
|||||||
}
|
}
|
||||||
|
|
||||||
To visualize the control flow graph, you can use a nifty feature of the
|
To visualize the control flow graph, you can use a nifty feature of the
|
||||||
LLVM '`opt <http://llvm.org/cmds/opt.html>`_' tool. If you put this LLVM
|
LLVM '`opt <https://llvm.org/cmds/opt.html>`_' tool. If you put this LLVM
|
||||||
IR into "t.ll" and run "``llvm-as < t.ll | opt -analyze -view-cfg``", `a
|
IR into "t.ll" and run "``llvm-as < t.ll | opt -analyze -view-cfg``", `a
|
||||||
window will pop up <../../ProgrammersManual.html#viewing-graphs-while-debugging-code>`_ and you'll
|
window will pop up <../../ProgrammersManual.html#viewing-graphs-while-debugging-code>`_ and you'll
|
||||||
see this graph:
|
see this graph:
|
||||||
|
@ -23,7 +23,7 @@ machine.
|
|||||||
To specify the architecture that you want to target, we use a string
|
To specify the architecture that you want to target, we use a string
|
||||||
called a "target triple". This takes the form
|
called a "target triple". This takes the form
|
||||||
``<arch><sub>-<vendor>-<sys>-<abi>`` (see the `cross compilation docs
|
``<arch><sub>-<vendor>-<sys>-<abi>`` (see the `cross compilation docs
|
||||||
<http://clang.llvm.org/docs/CrossCompilation.html#target-triple>`_).
|
<https://clang.llvm.org/docs/CrossCompilation.html#target-triple>`_).
|
||||||
|
|
||||||
As an example, we can see what clang thinks is our current target
|
As an example, we can see what clang thinks is our current target
|
||||||
triple:
|
triple:
|
||||||
|
@ -165,13 +165,13 @@ DWARF Emission Setup
|
|||||||
====================
|
====================
|
||||||
|
|
||||||
Similar to the ``IRBuilder`` class we have a
|
Similar to the ``IRBuilder`` class we have a
|
||||||
`DIBuilder <http://llvm.org/doxygen/classllvm_1_1DIBuilder.html>`_ class
|
`DIBuilder <https://llvm.org/doxygen/classllvm_1_1DIBuilder.html>`_ class
|
||||||
that helps in constructing debug metadata for an LLVM IR file. It
|
that helps in constructing debug metadata for an LLVM IR file. It
|
||||||
corresponds 1:1 similarly to ``IRBuilder`` and LLVM IR, but with nicer names.
|
corresponds 1:1 similarly to ``IRBuilder`` and LLVM IR, but with nicer names.
|
||||||
Using it does require that you be more familiar with DWARF terminology than
|
Using it does require that you be more familiar with DWARF terminology than
|
||||||
you needed to be with ``IRBuilder`` and ``Instruction`` names, but if you
|
you needed to be with ``IRBuilder`` and ``Instruction`` names, but if you
|
||||||
read through the general documentation on the
|
read through the general documentation on the
|
||||||
`Metadata Format <http://llvm.org/docs/SourceLevelDebugging.html>`_ it
|
`Metadata Format <https://llvm.org/docs/SourceLevelDebugging.html>`_ it
|
||||||
should be a little more clear. We'll be using this class to construct all
|
should be a little more clear. We'll be using this class to construct all
|
||||||
of our IR level descriptions. Construction for it takes a module so we
|
of our IR level descriptions. Construction for it takes a module so we
|
||||||
need to construct it shortly after we construct our module. We've left it
|
need to construct it shortly after we construct our module. We've left it
|
||||||
|
@ -65,7 +65,7 @@ the top-level structure that the LLVM IR uses to contain code.
|
|||||||
|
|
||||||
The ``Codegen.builder`` object is a helper object that makes it easy to
|
The ``Codegen.builder`` object is a helper object that makes it easy to
|
||||||
generate LLVM instructions. Instances of the
|
generate LLVM instructions. Instances of the
|
||||||
`IRBuilder <http://llvm.org/doxygen/IRBuilder_8h-source.html>`_
|
`IRBuilder <https://llvm.org/doxygen/IRBuilder_8h-source.html>`_
|
||||||
class keep track of the current place to insert instructions and has
|
class keep track of the current place to insert instructions and has
|
||||||
methods to create new instructions.
|
methods to create new instructions.
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ Full Code Listing
|
|||||||
Here is the complete code listing for our running example, enhanced with
|
Here is the complete code listing for our running example, enhanced with
|
||||||
the LLVM code generator. Because this uses the LLVM libraries, we need
|
the LLVM code generator. Because this uses the LLVM libraries, we need
|
||||||
to link them in. To do this, we use the
|
to link them in. To do this, we use the
|
||||||
`llvm-config <http://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
`llvm-config <https://llvm.org/cmds/llvm-config.html>`_ tool to inform
|
||||||
our makefile/command line about which options to use:
|
our makefile/command line about which options to use:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -161,7 +161,7 @@ Kaleidoscope looks like this:
|
|||||||
}
|
}
|
||||||
|
|
||||||
To visualize the control flow graph, you can use a nifty feature of the
|
To visualize the control flow graph, you can use a nifty feature of the
|
||||||
LLVM '`opt <http://llvm.org/cmds/opt.html>`_' tool. If you put this LLVM
|
LLVM '`opt <https://llvm.org/cmds/opt.html>`_' tool. If you put this LLVM
|
||||||
IR into "t.ll" and run "``llvm-as < t.ll | opt -analyze -view-cfg``", `a
|
IR into "t.ll" and run "``llvm-as < t.ll | opt -analyze -view-cfg``", `a
|
||||||
window will pop up <../ProgrammersManual.html#viewing-graphs-while-debugging-code>`_ and you'll
|
window will pop up <../ProgrammersManual.html#viewing-graphs-while-debugging-code>`_ and you'll
|
||||||
see this graph:
|
see this graph:
|
||||||
|
@ -51,5 +51,5 @@ External Tutorials
|
|||||||
Advanced Topics
|
Advanced Topics
|
||||||
===============
|
===============
|
||||||
|
|
||||||
#. `Writing an Optimization for LLVM <http://llvm.org/pubs/2004-09-22-LCPCLLVMTutorial.html>`_
|
#. `Writing an Optimization for LLVM <https://llvm.org/pubs/2004-09-22-LCPCLLVMTutorial.html>`_
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ How to Build the LLVM* OpenMP* Libraries
|
|||||||
This repository requires `CMake <http://www.cmake.org/>`_ v2.8.0 or later. LLVM
|
This repository requires `CMake <http://www.cmake.org/>`_ v2.8.0 or later. LLVM
|
||||||
and Clang need a more recent version which also applies for in-tree builds. For
|
and Clang need a more recent version which also applies for in-tree builds. For
|
||||||
more information than available in this document please see
|
more information than available in this document please see
|
||||||
`LLVM's CMake documentation <http://llvm.org/docs/CMake.html>`_ and the
|
`LLVM's CMake documentation <https://llvm.org/docs/CMake.html>`_ and the
|
||||||
`official documentation <https://cmake.org/cmake/help/v2.8.0/cmake.html>`_.
|
`official documentation <https://cmake.org/cmake/help/v2.8.0/cmake.html>`_.
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
@ -21,7 +21,7 @@ Using bugpoint to track down errors in large files
|
|||||||
|
|
||||||
- ``$ bugpoint crash.ll -polly-codegen -opt-args -polly-canonicalize -polly-process-unprofitable``
|
- ``$ bugpoint crash.ll -polly-codegen -opt-args -polly-canonicalize -polly-process-unprofitable``
|
||||||
|
|
||||||
For more documentation on bugpoint, `Visit the LLVM manual <http://llvm.org/docs/Bugpoint.html>`_
|
For more documentation on bugpoint, `Visit the LLVM manual <https://llvm.org/docs/Bugpoint.html>`_
|
||||||
|
|
||||||
|
|
||||||
Understanding which pass makes a particular change
|
Understanding which pass makes a particular change
|
||||||
|
Loading…
Reference in New Issue
Block a user