summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/AMDGPUUsage.rst2
-rw-r--r--docs/CMakeLists.txt4
-rw-r--r--docs/LangRef.rst11
-rw-r--r--docs/ProgrammersManual.rst19
-rw-r--r--docs/README.txt15
-rw-r--r--docs/StackMaps.rst7
-rw-r--r--docs/TableGen/LangIntro.rst9
-rw-r--r--docs/doxygen.cfg.in21
8 files changed, 61 insertions, 27 deletions
diff --git a/docs/AMDGPUUsage.rst b/docs/AMDGPUUsage.rst
index 97497057fc96..81c067b317d3 100644
--- a/docs/AMDGPUUsage.rst
+++ b/docs/AMDGPUUsage.rst
@@ -83,7 +83,7 @@ handler as follows:
Usage Code Sequence Description
=============== ============= ===============================================
llvm.trap s_endpgm Causes wavefront to be terminated.
- llvm.debugtrap Nothing. Compiler warning generated that there is no trap handler installed.
+ llvm.debugtrap Nothing Compiler warning generated that there is no trap handler installed.
=============== ============= ===============================================
Assembler
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index ad2178dc5875..6dff219ae37f 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -1,8 +1,8 @@
if (DOXYGEN_FOUND)
if (LLVM_ENABLE_DOXYGEN)
- set(abs_top_srcdir ${LLVM_MAIN_SRC_DIR})
- set(abs_top_builddir ${LLVM_BINARY_DIR})
+ set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+ set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
if (HAVE_DOT)
set(DOT ${LLVM_PATH_DOT})
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index b0a31589cc4f..bf4973ca9aed 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -1535,6 +1535,17 @@ example:
``sanitize_thread``
This attribute indicates that ThreadSanitizer checks
(dynamic thread safety analysis) are enabled for this function.
+``speculatable``
+ This function attribute indicates that the function does not have any
+ effects besides calculating its result and does not have undefined behavior.
+ Note that ``speculatable`` is not enough to conclude that along any
+ particular exection path the number of calls to this function will not be
+ externally observable. This attribute is only valid on functions
+ and declarations, not on individual call sites. If a function is
+ incorrectly marked as speculatable and really does exhibit
+ undefined behavior, the undefined behavior may be observed even
+ if the call site is dead code.
+
``ssp``
This attribute indicates that the function should emit a stack
smashing protector. It is in the form of a "canary" --- a random value
diff --git a/docs/ProgrammersManual.rst b/docs/ProgrammersManual.rst
index 4fb67e1e6d5f..d115a9cf6de8 100644
--- a/docs/ProgrammersManual.rst
+++ b/docs/ProgrammersManual.rst
@@ -776,22 +776,21 @@ readability.
Using cantFail to simplify safe callsites
"""""""""""""""""""""""""""""""""""""""""
-Some functions may only fail for a subset of their inputs. For such functions
-call-sites using known-safe inputs can assume that the result will be a success
-value.
+Some functions may only fail for a subset of their inputs, so calls using known
+safe inputs can be assumed to succeed.
The cantFail functions encapsulate this by wrapping an assertion that their
argument is a success value and, in the case of Expected<T>, unwrapping the
-T value from the Expected<T> argument:
+T value:
.. code-block:: c++
- Error mayFail(int X);
- Expected<int> mayFail2(int X);
+ Error onlyFailsForSomeXValues(int X);
+ Expected<int> onlyFailsForSomeXValues2(int X);
void foo() {
- cantFail(mayFail(KnownSafeValue));
- int Y = cantFail(mayFail2(KnownSafeValue));
+ cantFail(onlyFailsForSomeXValues(KnownSafeValue));
+ int Y = cantFail(onlyFailsForSomeXValues2(KnownSafeValue));
...
}
@@ -801,8 +800,8 @@ terminate the program on an error input, cantFile simply asserts that the result
is success. In debug builds this will result in an assertion failure if an error
is encountered. In release builds the behavior of cantFail for failure values is
undefined. As such, care must be taken in the use of cantFail: clients must be
-certain that a cantFail wrapped call really can not fail under any
-circumstances.
+certain that a cantFail wrapped call really can not fail with the given
+arguments.
Use of the cantFail functions should be rare in library code, but they are
likely to be of more use in tool and unit-test code where inputs and/or
diff --git a/docs/README.txt b/docs/README.txt
index 6c6e5b90ecf2..f1c74261ce4d 100644
--- a/docs/README.txt
+++ b/docs/README.txt
@@ -51,3 +51,18 @@ running:
cd docs/
make -f Makefile.sphinx linkcheck
+
+Doxygen page Output
+==============
+
+Install doxygen <http://www.stack.nl/~dimitri/doxygen/download.html> and dot2tex <https://dot2tex.readthedocs.io/en/latest>.
+
+ cd <build-dir>
+ cmake -DLLVM_ENABLE_DOXYGEN=On <llvm-top-src-dir>
+ make doxygen-llvm # for LLVM docs
+ make doxygen-clang # for clang docs
+
+It will generate html in
+
+ <build-dir>/docs/doxygen/html # for LLVM docs
+ <build-dir>/tools/clang/docs/doxygen/html # for clang docs
diff --git a/docs/StackMaps.rst b/docs/StackMaps.rst
index a78fde16c2be..99c5e5fbe4de 100644
--- a/docs/StackMaps.rst
+++ b/docs/StackMaps.rst
@@ -319,7 +319,7 @@ format of this section follows:
.. code-block:: none
Header {
- uint8 : Stack Map Version (current version is 2)
+ uint8 : Stack Map Version (current version is 3)
uint8 : Reserved (expected to be 0)
uint16 : Reserved (expected to be 0)
}
@@ -341,10 +341,13 @@ format of this section follows:
uint16 : NumLocations
Location[NumLocations] {
uint8 : Register | Direct | Indirect | Constant | ConstantIndex
- uint8 : Reserved (location flags)
+ uint8 : Reserved (expected to be 0)
+ uint16 : Location Size
uint16 : Dwarf RegNum
+ uint16 : Reserved (expected to be 0)
int32 : Offset or SmallConstant
}
+ uint32 : Padding (only if required to align to 8 byte)
uint16 : Padding
uint16 : NumLiveOuts
LiveOuts[NumLiveOuts]
diff --git a/docs/TableGen/LangIntro.rst b/docs/TableGen/LangIntro.rst
index d8bd17d750b8..460ff9067f20 100644
--- a/docs/TableGen/LangIntro.rst
+++ b/docs/TableGen/LangIntro.rst
@@ -58,6 +58,10 @@ types are:
The 'string' type represents an ordered sequence of characters of arbitrary
length.
+``code``
+ The `code` type represents a code fragment, which can be single/multi-line
+ string literal.
+
``bits<n>``
A 'bits' type is an arbitrary, but fixed, size integer that is broken up
into individual bits. This type is useful because it can handle some bits
@@ -105,7 +109,7 @@ supported include:
hexadecimal integer value
``"foo"``
- string value
+ a single-line string value, can be assigned to ``string`` or ``code`` variable.
``[{ ... }]``
usually called a "code fragment", but is just a multiline string literal
@@ -126,7 +130,8 @@ supported include:
access to one bit of a value
``value{15-17}``
- access to multiple bits of a value
+ access to an ordered sequence of bits of a value, in particular ``value{15-17}``
+ produces an order that is the reverse of ``value{17-15}``.
``DEF``
reference to a record definition
diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in
index 451eaf4d2fcc..e3c7f479ac4e 100644
--- a/docs/doxygen.cfg.in
+++ b/docs/doxygen.cfg.in
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = @abs_top_builddir@/docs/doxygen
+OUTPUT_DIRECTORY = @abs_top_builddir@/doxygen
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -132,7 +132,7 @@ INLINE_INHERITED_MEMB = NO
# shortest path that makes the file name unique will be used
# The default value is: YES.
-FULL_PATH_NAMES = NO
+FULL_PATH_NAMES = YES
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
@@ -144,7 +144,7 @@ FULL_PATH_NAMES = NO
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-STRIP_FROM_PATH = ../..
+STRIP_FROM_PATH = @abs_top_srcdir@/..
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
@@ -153,7 +153,8 @@ STRIP_FROM_PATH = ../..
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+STRIP_FROM_INC_PATH = @abs_top_srcdir@/../include
+STRIP_FROM_INC_PATH += @abs_top_srcdir@/../lib
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
# less readable) file names. This can be useful is your file systems doesn't
@@ -513,7 +514,7 @@ SHOW_GROUPED_MEMB_INC = NO
# files with double quotes in the documentation rather than with sharp brackets.
# The default value is: NO.
-FORCE_LOCAL_INCLUDES = NO
+FORCE_LOCAL_INCLUDES = YES
# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
# documentation for inline members.
@@ -743,9 +744,9 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
-INPUT = @abs_top_srcdir@/include \
- @abs_top_srcdir@/lib \
- @abs_top_srcdir@/docs/doxygen-mainpage.dox
+INPUT = @abs_top_srcdir@/../include \
+ @abs_top_srcdir@/../lib \
+ @abs_top_srcdir@/doxygen-mainpage.dox
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -813,7 +814,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = @abs_top_srcdir@/examples
+EXAMPLE_PATH = @abs_top_srcdir@/../examples
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -833,7 +834,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH = @abs_top_srcdir@/docs/img
+IMAGE_PATH = @abs_top_srcdir@/img
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program