Skip to content

Commit

Permalink
Minor ReleaseNotes fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zmodem committed Mar 2, 2020
1 parent 0bf4795 commit 1939a0f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 59 deletions.
66 changes: 33 additions & 33 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -511,39 +511,39 @@ Static Analyzer
Undefined Behavior Sanitizer (UBSan)
------------------------------------

- * The ``pointer-overflow`` check was extended added to catch the cases where
a non-zero offset is applied to a null pointer, or the result of
applying the offset is a null pointer.

.. code-block:: c++

#include <cstdint> // for intptr_t

static char *getelementpointer_inbounds(char *base, unsigned long offset) {
// Potentially UB.
return base + offset;
}
char *getelementpointer_unsafe(char *base, unsigned long offset) {
// Always apply offset. UB if base is ``nullptr`` and ``offset`` is not
// zero, or if ``base`` is non-``nullptr`` and ``offset`` is
// ``-reinterpret_cast<intptr_t>(base)``.
return getelementpointer_inbounds(base, offset);
}
char *getelementpointer_safe(char *base, unsigned long offset) {
// Cast pointer to integer, perform usual arithmetic addition,
// and cast to pointer. This is legal.
char *computed =
reinterpret_cast<char *>(reinterpret_cast<intptr_t>(base) + offset);
// If either the pointer becomes non-``nullptr``, or becomes
// ``nullptr``, we must use ``computed`` result.
if (((base == nullptr) && (computed != nullptr)) ||
((base != nullptr) && (computed == nullptr)))
return computed;
// Else we can use ``getelementpointer_inbounds()``.
return getelementpointer_inbounds(base, offset);
}
* The ``pointer-overflow`` check was extended added to catch the cases where
a non-zero offset is applied to a null pointer, or the result of
applying the offset is a null pointer.

.. code-block:: c++

#include <cstdint> // for intptr_t

static char *getelementpointer_inbounds(char *base, unsigned long offset) {
// Potentially UB.
return base + offset;
}
char *getelementpointer_unsafe(char *base, unsigned long offset) {
// Always apply offset. UB if base is ``nullptr`` and ``offset`` is not
// zero, or if ``base`` is non-``nullptr`` and ``offset`` is
// ``-reinterpret_cast<intptr_t>(base)``.
return getelementpointer_inbounds(base, offset);
}
char *getelementpointer_safe(char *base, unsigned long offset) {
// Cast pointer to integer, perform usual arithmetic addition,
// and cast to pointer. This is legal.
char *computed =
reinterpret_cast<char *>(reinterpret_cast<intptr_t>(base) + offset);
// If either the pointer becomes non-``nullptr``, or becomes
// ``nullptr``, we must use ``computed`` result.
if (((base == nullptr) && (computed != nullptr)) ||
((base != nullptr) && (computed == nullptr)))
return computed;
// Else we can use ``getelementpointer_inbounds()``.
return getelementpointer_inbounds(base, offset);
}

Additional Information
Expand Down
18 changes: 9 additions & 9 deletions lld/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,31 @@ MinGW Improvements

* Allow using custom .edata sections from input object files (for use
by Wine)
(`dadc6f248868 <https://reviews.llvm.org/rGdadc6f248868>`)
(`dadc6f248868 <https://reviews.llvm.org/rGdadc6f248868>`_)

* Don't implicitly create import libraries unless requested
(`6540e55067e3 <https://reviews.llvm.org/rG6540e55067e3>`)
(`6540e55067e3 <https://reviews.llvm.org/rG6540e55067e3>`_)

* Support merging multiple resource object files
(`3d3a9b3b413d <https://reviews.llvm.org/rG3d3a9b3b413d>`)
(`3d3a9b3b413d <https://reviews.llvm.org/rG3d3a9b3b413d>`_)
and properly handle the default manifest object files that GCC can pass
(`d581dd501381 <https://reviews.llvm.org/rGd581dd501381>`)
(`d581dd501381 <https://reviews.llvm.org/rGd581dd501381>`_)

* Demangle itanium symbol names in warnings/error messages
(`a66fc1c99f3e <https://reviews.llvm.org/rGa66fc1c99f3e>`)
(`a66fc1c99f3e <https://reviews.llvm.org/rGa66fc1c99f3e>`_)

* Print source locations for undefined references and duplicate symbols,
if possible
(`1d06d48bb346 <https://reviews.llvm.org/rG1d06d48bb346>`)
(`1d06d48bb346 <https://reviews.llvm.org/rG1d06d48bb346>`_)
and
(`b38f577c015c <https://reviews.llvm.org/rGb38f577c015c>`)
(`b38f577c015c <https://reviews.llvm.org/rGb38f577c015c>`_)

* Look for more filename patterns when resolving ``-l`` options
(`0226c35262df <https://reviews.llvm.org/rG0226c35262df>`)
(`0226c35262df <https://reviews.llvm.org/rG0226c35262df>`_)

* Don't error out on duplicate absolute symbols with the same value
(which can happen for the default-null symbol for weak symbols)
(`1737cc750c46 <https://reviews.llvm.org/rG1737cc750c46>`)
(`1737cc750c46 <https://reviews.llvm.org/rG1737cc750c46>`_)


WebAssembly Improvements
Expand Down
33 changes: 16 additions & 17 deletions llvm/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Non-comprehensive list of changes in this release
with optimizations enabled.

* ``Callbacks`` have been added to ``CommandLine Options``. These can
be used to validate of selectively enable other options.
be used to validate or selectively enable other options.

* The function attributes ``no-frame-pointer-elim`` and
``no-frame-pointer-elim-non-leaf`` have been replaced by ``frame-pointer``,
Expand All @@ -77,7 +77,7 @@ Non-comprehensive list of changes in this release
`D59918 <https://reviews.llvm.org/D59918>`_, `LLVM-Dev talk <https://youtu.be/CzWkc_JcfS0>`_).
In this release, 19 different attributes are inferred, including 12 LLVM IR
attributes and 7 "abstract" attributes, such as liveness. The Attributor is
still under heavy development and disabled by default, to enable an early run
still under heavy development and disabled by default; to enable an early run
pass ``-mllvm -attributor-disable=false`` to an invocation of clang.

* New matrix math intrinsics have been added to LLVM
Expand Down Expand Up @@ -154,33 +154,33 @@ Changes to the PowerPC Target

Optimization:

* Improved register pressure estimates in the loop vectorizer based on type
* Improved register pressure estimates in the loop vectorizer based on type

* Improved the PowerPC cost model for the vectorizer
* Improved the PowerPC cost model for the vectorizer

* Enabled vectorization of math routines on PowerPC using MASSV (Mathematical Acceleration SubSystem) library
* Enabled vectorization of math routines on PowerPC using MASSV (Mathematical Acceleration SubSystem) library

compiler-rt:
copiler-rt:

* Added/improved conversion functions from IBM long double to 128-bit integers
* Added/improved conversion functions from IBM long double to 128-bit integers

Codegen:

* Optimized memory access instructions in loops (pertaining to update-form instructions and address computation)
* Optimized memory access instructions in loops (pertaining to update-form instructions and address computation)

* Added options to disable hoisting instructions to hotter blocks based on statically or profile-based block hotness estimates
* Added options to disable hoisting instructions to hotter blocks based on statically or profile-based block hotness estimates

* Code generation improvements (particularly with floating point and vector code as well as handling condition registers)
* Code generation improvements (particularly with floating point and vector code as well as handling condition registers)

* Various infrastructural improvements, code refactoring, and bug fixes
* Various infrastructural improvements, code refactoring, and bug fixes

* Optimized handling of control flow based on multiple comparison of same values
* Optimized handling of control flow based on multiple comparison of same values

Tools:

* llvm-readobj supports displaying file header, section headers, symbol table and relocation entries for XCOFF object files
* llvm-readobj supports displaying file header, section headers, symbol table and relocation entries for XCOFF object files

* llvm-objdump supports disassembling physical sections for XCOFF object files
* llvm-objdump supports disassembling physical sections for XCOFF object files


Changes to the SystemZ Target
Expand All @@ -203,9 +203,7 @@ Changes to the SystemZ Target
Changes to the X86 Target
-------------------------

During this release ...

* Less than 128 bit vector types, v2i32, v4i16, v2i16, v8i8, v4i8, and v2i8, are
* Less-than-128-bit vector types, v2i32, v4i16, v2i16, v8i8, v4i8, and v2i8, are
now stored in the lower bits of an xmm register and the upper bits are
undefined. Previously the elements were spread apart with undefined bits in
between them.
Expand Down Expand Up @@ -287,6 +285,7 @@ New Features:
than the ABI register names.

Improvements:

* Trap and Debugtrap now lower to RISC-V-specific trap instructions.

* LLVM IR Inline assembly now supports using ABI register names and using
Expand Down

0 comments on commit 1939a0f

Please sign in to comment.