From 1939a0f40c991f0cc3fb70d4408dc0959db601d3 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Mon, 2 Mar 2020 14:35:05 +0100 Subject: [PATCH] Minor ReleaseNotes fixes --- clang/docs/ReleaseNotes.rst | 66 ++++++++++++++++++------------------- lld/docs/ReleaseNotes.rst | 18 +++++----- llvm/docs/ReleaseNotes.rst | 33 +++++++++---------- 3 files changed, 58 insertions(+), 59 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 86668d9f77eb9..116b47860d8b6 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -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 // 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(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(reinterpret_cast(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 // 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(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(reinterpret_cast(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 diff --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst index 8513a08e90e76..724c0097a9499 100644 --- a/lld/docs/ReleaseNotes.rst +++ b/lld/docs/ReleaseNotes.rst @@ -92,31 +92,31 @@ MinGW Improvements * Allow using custom .edata sections from input object files (for use by Wine) - (`dadc6f248868 `) + (`dadc6f248868 `_) * Don't implicitly create import libraries unless requested - (`6540e55067e3 `) + (`6540e55067e3 `_) * Support merging multiple resource object files - (`3d3a9b3b413d `) + (`3d3a9b3b413d `_) and properly handle the default manifest object files that GCC can pass - (`d581dd501381 `) + (`d581dd501381 `_) * Demangle itanium symbol names in warnings/error messages - (`a66fc1c99f3e `) + (`a66fc1c99f3e `_) * Print source locations for undefined references and duplicate symbols, if possible - (`1d06d48bb346 `) + (`1d06d48bb346 `_) and - (`b38f577c015c `) + (`b38f577c015c `_) * Look for more filename patterns when resolving ``-l`` options - (`0226c35262df `) + (`0226c35262df `_) * Don't error out on duplicate absolute symbols with the same value (which can happen for the default-null symbol for weak symbols) - (`1737cc750c46 `) + (`1737cc750c46 `_) WebAssembly Improvements diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst index 07b37fb6c1959..c55c1403dbc96 100644 --- a/llvm/docs/ReleaseNotes.rst +++ b/llvm/docs/ReleaseNotes.rst @@ -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``, @@ -77,7 +77,7 @@ Non-comprehensive list of changes in this release `D59918 `_, `LLVM-Dev talk `_). 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 @@ -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 @@ -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. @@ -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