[llvm-branch-commits] [clang] b54c957 - [Docs] Release 14 notes for SPIR-V in clang.

2022-02-16 Thread Anastasia Stulova via llvm-branch-commits

Author: Anastasia Stulova
Date: 2022-02-16T11:09:32Z
New Revision: b54c95790b8a410b8eab1cbaae306cdc56a8e82a

URL: 
https://github.com/llvm/llvm-project/commit/b54c95790b8a410b8eab1cbaae306cdc56a8e82a
DIFF: 
https://github.com/llvm/llvm-project/commit/b54c95790b8a410b8eab1cbaae306cdc56a8e82a.diff

LOG: [Docs] Release 14 notes for SPIR-V in clang.

Differential Revision: https://reviews.llvm.org/D119713

Added: 


Modified: 
clang/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 899165b842b5..edabf0d974cd 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -47,6 +47,8 @@ sections with improvements to Clang's support for those 
languages.
 Major New Features
 --
 
+- Added SPIR-V triple and binary generation using external ``llvm-spirv`` tool.
+  For more details refer to :ref:`the SPIR-V support section `.
 -  ...
 
 Improvements to Clang's diagnostics
@@ -324,6 +326,17 @@ Arm and AArch64 Support in Clang
 - The ``attribute((target("branch-protection=...)))`` attributes will now also
   work for the ARM backend.
 
+SPIR-V Support in Clang
+---
+
+- Added triple/target ``spirv32`` and ``spirv64`` for 32-bit and 64-bit SPIR-V
+  respectively.
+- Added generation of binaries via external ``llvm-spirv`` tool. This can now
+  be used for HIP or OpenCL.
+- Added linking of separate object files in SPIR-V format using external
+  ``spirv-link`` tool.
+
+
 Floating Point Support in Clang
 ---
 - The default setting of FP contraction (FMA) is now -ffp-contract=on (for



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] e8712ac - [Docs][OpenCL] Release 14 notes.

2022-02-16 Thread Anastasia Stulova via llvm-branch-commits

Author: Anastasia Stulova
Date: 2022-02-16T11:29:58Z
New Revision: e8712accba1150b94168d8ace6c7dd7b9612e174

URL: 
https://github.com/llvm/llvm-project/commit/e8712accba1150b94168d8ace6c7dd7b9612e174
DIFF: 
https://github.com/llvm/llvm-project/commit/e8712accba1150b94168d8ace6c7dd7b9612e174.diff

LOG: [Docs][OpenCL] Release 14 notes.

Differential Revision: https://reviews.llvm.org/D119710

Added: 


Modified: 
clang/docs/ReleaseNotes.rst

Removed: 




diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index edabf0d974cd..869d62aebfb1 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -18,7 +18,7 @@ Written by the `LLVM Team `_
 Introduction
 
 
-This document contains the release notes for the Clang C/C++/Objective-C
+This document contains the release notes for the Clang C/C++/Objective-C/OpenCL
 frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
 describe the status of Clang in some detail, including major
 improvements from the previous release and new feature work. For the
@@ -49,6 +49,8 @@ Major New Features
 
 - Added SPIR-V triple and binary generation using external ``llvm-spirv`` tool.
   For more details refer to :ref:`the SPIR-V support section `.
+- Completed support of OpenCL C 3.0 and C++ for OpenCL 2021 at experimental
+  state.
 -  ...
 
 Improvements to Clang's diagnostics
@@ -262,10 +264,37 @@ CUDA Language Changes in Clang
 Objective-C Language Changes in Clang
 -
 
-OpenCL C Language Changes in Clang
---
+OpenCL Kernel Language Changes in Clang
+---
 
-...
+OpenCL 3.0 is completed, but remains experimental:
+
+- Added parsing support for optionality of device-side enqueue and blocks.
+- Added missing support for optionality of various builtin functions:
+
+  - ``read_write`` images, pipes, collective workgroup in the default header.
+  - ``read_write`` images, named address space atomics in internal 
``opencl-c.h``
+(enabled via ``-finclude-default-header`` frontend flag).
+
+C++ for OpenCL:
+
+- Added experimental support of C++ for OpenCL 2021 as per `the provisional
+  language documentation
+  
`_.
+  Support of all optional features is aligned with OpenCL 3.0.
+- Added ``__remove_address_space`` utility (documentation available in
+  :doc:`LanguageExtensions`).
+- Fixed address space for temporaries (to be ``__private``).
+- Disallowed static kernel functions.
+- Fixed implicit definition of ``__cpp_threadsafe_static_init`` macro.
+
+Misc changes:
+
+- Added generation of SPIR-V binaries via external ``llvm-spirv`` tool.
+  For more details refer to :ref:`the SPIR-V support section `.
+- Added new extensions for ``atomic_half`` and ``cl_ext_float_atomics``.
+- Fixed/improved support of ``vload``/``vstore``.
+- Fixed incorrect ``as_type`` support for 3-element vector types.
 
 ABI Changes in Clang
 



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] 5264342 - [Docs][OpenCL] Update OpenCL 3.0 status in docs.

2022-02-16 Thread Anastasia Stulova via llvm-branch-commits

Author: Anastasia Stulova
Date: 2022-02-16T12:08:56Z
New Revision: 5264342c242b0d0c1ad664104cb371dc9a659d59

URL: 
https://github.com/llvm/llvm-project/commit/5264342c242b0d0c1ad664104cb371dc9a659d59
DIFF: 
https://github.com/llvm/llvm-project/commit/5264342c242b0d0c1ad664104cb371dc9a659d59.diff

LOG: [Docs][OpenCL] Update OpenCL 3.0 status in docs.

Reflect the latest achievements in clang docs.

Differential Revision: https://reviews.llvm.org/D119719

Added: 


Modified: 
clang/docs/OpenCLSupport.rst
clang/docs/UsersManual.rst

Removed: 




diff  --git a/clang/docs/OpenCLSupport.rst b/clang/docs/OpenCLSupport.rst
index c1202601d48d..723e186cb66d 100644
--- a/clang/docs/OpenCLSupport.rst
+++ b/clang/docs/OpenCLSupport.rst
@@ -17,8 +17,8 @@
 OpenCL Support
 ==
 
-Clang has complete support of OpenCL C versions from 1.0 to 2.0.
-There is an ongoing work to support :ref:`OpenCL 3.0 `.
+Clang has complete support of OpenCL C versions from 1.0 to 3.0.
+Support for OpenCL 3.0 is in experimental phase (:ref:`OpenCL 3.0 
`).
 
 Clang also supports :ref:`the C++ for OpenCL kernel language 
`.
 
@@ -371,43 +371,43 @@ OpenCL C 3.0 Implementation Status
 The following table provides an overview of features in OpenCL C 3.0 and their
 implementation status.
 
-+--+-+-+--+--+
-| Category | Feature   
| Status   | Reviews
  |
-+==+=+=+==+==+
-| Command line interface   | New value for ``-cl-std`` flag
| :good:`done` | https://reviews.llvm.org/D88300
  |
-+--+-+-+--+--+
-| Predefined macros| New version macro 
| :good:`done` | https://reviews.llvm.org/D88300
  |
-+--+-+-+--+--+
-| Predefined macros| Feature macros
| :good:`done` | https://reviews.llvm.org/D95776
  |
-+--+-+-+--+--+
-| Feature optionality  | Generic address space 
| :good:`done` | https://reviews.llvm.org/D95778 
and https://reviews.llvm.org/D103401 |
-+--+-+-+--+--+
-| Feature optionality  | Builtin function overloads with generic 
address space | :good:`done` | 
https://reviews.llvm.org/D105526
 |
-+--+-+-+--+--+
-| Feature optionality  | Program scope variables in global memory  
| :good:`done` | https://reviews.llvm.org/D103191   
  |
-+--+-+-+--+--+
-| Feature optionality  | 3D image writes including builtin functions   
| :part:`worked on`| https://reviews.llvm.org/D106260 
(frontend)  |
-+--+-+--

[llvm-branch-commits] [lld] 9e1f13d - [lld] Fix RST formatting in release notes

2022-02-16 Thread via llvm-branch-commits

Author: Jez Ng
Date: 2022-02-16T08:29:11-05:00
New Revision: 9e1f13d14e1975f19fa9823347184a6007ef95c7

URL: 
https://github.com/llvm/llvm-project/commit/9e1f13d14e1975f19fa9823347184a6007ef95c7
DIFF: 
https://github.com/llvm/llvm-project/commit/9e1f13d14e1975f19fa9823347184a6007ef95c7.diff

LOG: [lld] Fix RST formatting in release notes

Added: 


Modified: 
lld/docs/ReleaseNotes.rst

Removed: 




diff  --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst
index 3601a968bd77b..d928b04d8dc04 100644
--- a/lld/docs/ReleaseNotes.rst
+++ b/lld/docs/ReleaseNotes.rst
@@ -40,7 +40,7 @@ ELF Improvements
   ``--warn-backrefs``. One may build such an archive with ``llvm-ar rcS
   [--thin]`` to save space.
   (`D117284 `_)
-  The archive index may be `entirely ignored 
`
+  The archive index may be `entirely ignored 
`_
   in a future release.
 * No longer deduplicate local symbol names at the default optimization level 
of ``-O1``.
   This results in a larger ``.strtab`` (usually less than 1%) but a faster link
@@ -133,9 +133,9 @@ Mach-O Improvements
   (`D115949 `_)
 * Thunk insertion now works more reliably.
   (`D108897 `_,
-   `D108924 `_,
-   `D109079  `_,
-   `D116705 `_)
+  `D108924 `_,
+  `D109079  `_,
+  `D116705 `_)
 * ``-ObjC`` now loads archive members before the symbol resolution phase.
   (`D108781 `_)
 * ``-oso_prefix`` is now supported.
@@ -150,13 +150,13 @@ Mach-O Improvements
   a lot of framework flags and library lookups. Large Swift-based projects
   will benefit significantly.
   (`D113073 `_,
-   `D113063 `_,
-   `D113153 `_,
-   `D113235 `_)
+  `D113063 `_,
+  `D113153 `_,
+  `D113235 `_)
 * Several memory-reduction optimizations were done to reduce LLD's RSS
   footprint.
   (`D113813 `_,
-   `D113818 `_)
+  `D113818 `_)
 * Symbol patterns from ``-[un]exported_symbols_list`` are now processed in
   parallel. (`D113820 `_)
 * ``.weak_def_can_be_hidden`` symbols can now be exported.
@@ -188,11 +188,11 @@ Mach-O Improvements
 * Map file output now proceeds in parallel with output of the binary.
   (`D117069 `_)
 * The map file now contains dead-stripped symbols too.
-  (`D114737  `_)
+  (`D114737  `_)
 * Multiple TLV sections with 
diff erent alignments are now handled properly.
   (`D116263 `_)
 * ``--start-lib`` and ``--end-lib`` are now supported.
-  (`D116913  `_)
+  (`D116913  `_)
 * ``-noall_load`` is now supported.
   (`D117629 `_)
 * ``-add_empty_section`` is now supported.



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [lld] 89309e1 - [lld] One more formatting fix for the release notes

2022-02-16 Thread via llvm-branch-commits

Author: Jez Ng
Date: 2022-02-16T08:33:23-05:00
New Revision: 89309e187631e6648bc5c45846470f6fd2b2395f

URL: 
https://github.com/llvm/llvm-project/commit/89309e187631e6648bc5c45846470f6fd2b2395f
DIFF: 
https://github.com/llvm/llvm-project/commit/89309e187631e6648bc5c45846470f6fd2b2395f.diff

LOG: [lld] One more formatting fix for the release notes

Added: 


Modified: 
lld/docs/ReleaseNotes.rst

Removed: 




diff  --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst
index d928b04d8dc0..672759fdf6b3 100644
--- a/lld/docs/ReleaseNotes.rst
+++ b/lld/docs/ReleaseNotes.rst
@@ -174,7 +174,7 @@ Mach-O Improvements
   (`D115092 `_)
 * ``$ld$hide`` symbols are now supported.
   (`D115775 `_)
-* Symbols imported via `-weak_framework` are now properly marked as weak refs.
+* Symbols imported via ``-weak_framework`` are now properly marked as weak 
refs.
   (`D114397 `_)
 * ``--warn-dylib-install-name`` and ``--no-warn-dylib-install-name`` were added
   to toggle LLD-specific warnings around the use of ``-install_name``.



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] 8b10e0a - [runtimes] Deprecate FOO_SYSROOT & friends

2022-02-16 Thread Louis Dionne via llvm-branch-commits

Author: Louis Dionne
Date: 2022-02-16T09:44:33-05:00
New Revision: 8b10e0a840473b74d5d2f1343e317653d297781a

URL: 
https://github.com/llvm/llvm-project/commit/8b10e0a840473b74d5d2f1343e317653d297781a
DIFF: 
https://github.com/llvm/llvm-project/commit/8b10e0a840473b74d5d2f1343e317653d297781a.diff

LOG: [runtimes] Deprecate FOO_SYSROOT & friends

As suggested in https://reviews.llvm.org/D112155.

Differential Revision: https://reviews.llvm.org/D119836

(cherry picked from commit 641a141da1f22de319e891bdfd61e614632b39f0)

Added: 


Modified: 
libcxx/CMakeLists.txt
libcxxabi/CMakeLists.txt
libunwind/CMakeLists.txt

Removed: 




diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 6cd36ecfa7224..9c2e026f54010 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -282,6 +282,16 @@ set(LIBCXX_TARGET_TRIPLE "${LIBCXX_DEFAULT_TARGET_TRIPLE}" 
CACHE STRING "Use alt
 set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}" CACHE STRING "Use alternate sysroot.")
 set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
STRING "Use alternate GCC toolchain.")
 
+if(NOT CMAKE_SYSROOT AND LIBCXX_SYSROOT)
+  message(WARNING "LIBCXX_SYSROOT is deprecated, please use CMAKE_SYSROOT 
instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_TARGET AND LIBCXX_TARGET_TRIPLE)
+  message(WARNING "LIBCXX_TARGET_TRIPLE is deprecated, please use 
CMAKE_CXX_COMPILER_TARGET instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND LIBCXX_GCC_TOOLCHAIN)
+  message(WARNING "LIBCXX_GCC_TOOLCHAIN is deprecated, please use 
CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
+endif()
+
 # Feature options -
 option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)
 option(LIBCXX_ENABLE_RTTI "Use run time type information." ON)

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index 58c21059c6025..77fcb5d22eb67 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -131,6 +131,16 @@ set(LIBCXXABI_TARGET_TRIPLE 
"${LIBCXXABI_DEFAULT_TARGET_TRIPLE}" CACHE STRING "T
 set(LIBCXXABI_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
PATH "GCC toolchain for cross compiling.")
 set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}" CACHE PATH "Sysroot for cross 
compiling.")
 
+if(NOT CMAKE_SYSROOT AND LIBCXXABI_SYSROOT)
+  message(WARNING "LIBCXXABI_SYSROOT is deprecated, please use CMAKE_SYSROOT 
instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_TARGET AND LIBCXXABI_TARGET_TRIPLE)
+  message(WARNING "LIBCXXABI_TARGET_TRIPLE is deprecated, please use 
CMAKE_CXX_COMPILER_TARGET instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND LIBCXXABI_GCC_TOOLCHAIN)
+  message(WARNING "LIBCXXABI_GCC_TOOLCHAIN is deprecated, please use 
CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
+endif()
+
 set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
 set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
 "Version of libc++abi. This will be reflected in the name of the shared \

diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 87d51b7894459..a50aa4669304a 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -109,6 +109,16 @@ set(LIBUNWIND_TEST_LINKER_FLAGS "" CACHE STRING
 set(LIBUNWIND_TEST_COMPILER_FLAGS "" CACHE STRING
 "Additional compiler flags for test programs.")
 
+if(NOT CMAKE_SYSROOT AND LIBUNWIND_SYSROOT)
+  message(WARNING "LIBUNWIND_SYSROOT is deprecated, please use CMAKE_SYSROOT 
instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_TARGET AND LIBUNWIND_TARGET_TRIPLE)
+  message(WARNING "LIBUNWIND_TARGET_TRIPLE is deprecated, please use 
CMAKE_CXX_COMPILER_TARGET instead")
+endif()
+if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND LIBUNWIND_GCC_TOOLCHAIN)
+  message(WARNING "LIBUNWIND_GCC_TOOLCHAIN is deprecated, please use 
CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
+endif()
+
 if (LIBUNWIND_ENABLE_SHARED)
   set(LIBUNWIND_DEFAULT_TEST_CONFIG "llvm-libunwind-shared.cfg.in")
 else()



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] c561bf0 - [runtimes] Add release note for deprecation of FOO_SYSROOT & friends

2022-02-16 Thread Louis Dionne via llvm-branch-commits

Author: Louis Dionne
Date: 2022-02-16T09:47:23-05:00
New Revision: c561bf0daa95797c36163ff730f570ed15e82632

URL: 
https://github.com/llvm/llvm-project/commit/c561bf0daa95797c36163ff730f570ed15e82632
DIFF: 
https://github.com/llvm/llvm-project/commit/c561bf0daa95797c36163ff730f570ed15e82632.diff

LOG: [runtimes] Add release note for deprecation of FOO_SYSROOT & friends

Added: 


Modified: 
libcxx/docs/ReleaseNotes.rst

Removed: 




diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index a9dd06e9490d2..b7e07d17755a0 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -235,3 +235,8 @@ Build System Changes
   ``-DCMAKE_POSITION_INDEPENDENT_CODE=ON`` explicitly when configuring the 
build, or
   ``-DRUNTIMES__CMAKE_POSITION_INDEPENDENT_CODE=ON`` if using the
   bootstrapping build.
+
+- The ``{LIBCXX,LIBCXXABI,LIBUNWIND}_TARGET_TRIPLE``, 
``{LIBCXX,LIBCXXABI,LIBUNWIND}_SYSROOT`` and
+  ``{LIBCXX,LIBCXXABI,LIBUNWIND}_GCC_TOOLCHAIN`` CMake variables are 
deprecated. Instead, please use
+  the ``CMAKE_CXX_COMPILER_TARGET``, ``CMAKE_SYSROOT`` and 
``CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN``
+  variables provided by CMake.



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] 812894f - [runtimes] Move warning messages for FOO_SYSROOT & friends above their default value

2022-02-16 Thread Louis Dionne via llvm-branch-commits

Author: Louis Dionne
Date: 2022-02-16T12:00:53-05:00
New Revision: 812894f74a8ad7bc448218cdeff4789fbad376e7

URL: 
https://github.com/llvm/llvm-project/commit/812894f74a8ad7bc448218cdeff4789fbad376e7
DIFF: 
https://github.com/llvm/llvm-project/commit/812894f74a8ad7bc448218cdeff4789fbad376e7.diff

LOG: [runtimes] Move warning messages for FOO_SYSROOT & friends above their 
default value

Otherwise, the warnings always trigger.

(cherry picked from commit 2e3bb910e3f7f5cc92e7c5c8acc7e6e7328afcce)

Added: 


Modified: 
libcxx/CMakeLists.txt
libcxxabi/CMakeLists.txt
libunwind/CMakeLists.txt

Removed: 




diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 9c2e026f5401..35c2ce515dd1 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -273,15 +273,6 @@ if (LIBCXX_BUILD_32_BITS)
   message(FATAL_ERROR "LIBCXX_BUILD_32_BITS is not supported anymore when 
building the runtimes, please specify a full triple instead.")
 endif()
 
-if(CMAKE_CXX_COMPILER_TARGET)
-  set(LIBCXX_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}")
-else()
-  set(LIBCXX_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
-endif()
-set(LIBCXX_TARGET_TRIPLE "${LIBCXX_DEFAULT_TARGET_TRIPLE}" CACHE STRING "Use 
alternate target triple.")
-set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}" CACHE STRING "Use alternate sysroot.")
-set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
STRING "Use alternate GCC toolchain.")
-
 if(NOT CMAKE_SYSROOT AND LIBCXX_SYSROOT)
   message(WARNING "LIBCXX_SYSROOT is deprecated, please use CMAKE_SYSROOT 
instead")
 endif()
@@ -292,6 +283,15 @@ if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND 
LIBCXX_GCC_TOOLCHAIN)
   message(WARNING "LIBCXX_GCC_TOOLCHAIN is deprecated, please use 
CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
 endif()
 
+if(CMAKE_CXX_COMPILER_TARGET)
+  set(LIBCXX_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}")
+else()
+  set(LIBCXX_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
+endif()
+set(LIBCXX_TARGET_TRIPLE "${LIBCXX_DEFAULT_TARGET_TRIPLE}" CACHE STRING "Use 
alternate target triple.")
+set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}" CACHE STRING "Use alternate sysroot.")
+set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
STRING "Use alternate GCC toolchain.")
+
 # Feature options -
 option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)
 option(LIBCXX_ENABLE_RTTI "Use run time type information." ON)

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index 77fcb5d22eb6..8e8cdf8ad737 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -122,15 +122,6 @@ set(LIBCXXABI_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE 
STRING
 "Define suffix of library directory name (32/64)")
 option(LIBCXXABI_INSTALL_LIBRARY "Install the libc++abi library." ON)
 
-if(CMAKE_CXX_COMPILER_TARGET)
-  set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}")
-else()
-  set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
-endif()
-set(LIBCXXABI_TARGET_TRIPLE "${LIBCXXABI_DEFAULT_TARGET_TRIPLE}" CACHE STRING 
"Target triple for cross compiling.")
-set(LIBCXXABI_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
PATH "GCC toolchain for cross compiling.")
-set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}" CACHE PATH "Sysroot for cross 
compiling.")
-
 if(NOT CMAKE_SYSROOT AND LIBCXXABI_SYSROOT)
   message(WARNING "LIBCXXABI_SYSROOT is deprecated, please use CMAKE_SYSROOT 
instead")
 endif()
@@ -141,6 +132,15 @@ if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND 
LIBCXXABI_GCC_TOOLCHAIN)
   message(WARNING "LIBCXXABI_GCC_TOOLCHAIN is deprecated, please use 
CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead")
 endif()
 
+if(CMAKE_CXX_COMPILER_TARGET)
+  set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}")
+else()
+  set(LIBCXXABI_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
+endif()
+set(LIBCXXABI_TARGET_TRIPLE "${LIBCXXABI_DEFAULT_TARGET_TRIPLE}" CACHE STRING 
"Target triple for cross compiling.")
+set(LIBCXXABI_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE 
PATH "GCC toolchain for cross compiling.")
+set(LIBCXXABI_SYSROOT "${CMAKE_SYSROOT}" CACHE PATH "Sysroot for cross 
compiling.")
+
 set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
 set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
 "Version of libc++abi. This will be reflected in the name of the shared \

diff  --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index a50aa4669304..6523fb0d307d 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -87,6 +87,16 @@ option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers 
for unwinding. Requ
 option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for 
.cfi_remember_state." OFF)
 option(LIBUNWIND_INSTALL_HEADERS "Inst

[llvm-branch-commits] [llvm] 6311bae - [X86] Add test cases for fmul/fdiv with select.

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Luo, Yuanke
Date: 2022-02-16T10:51:45-08:00
New Revision: 6311bae1b42429729e0a03f84fc4dc4d5683686a

URL: 
https://github.com/llvm/llvm-project/commit/6311bae1b42429729e0a03f84fc4dc4d5683686a
DIFF: 
https://github.com/llvm/llvm-project/commit/6311bae1b42429729e0a03f84fc4dc4d5683686a.diff

LOG: [X86] Add test cases for fmul/fdiv with select.

(cherry picked from commit 24562babdf16093052230e91332f1b1f13e2c4de)

Added: 


Modified: 
llvm/test/CodeGen/X86/vector-bo-select.ll

Removed: 




diff  --git a/llvm/test/CodeGen/X86/vector-bo-select.ll 
b/llvm/test/CodeGen/X86/vector-bo-select.ll
index 93777915b1b88..63d5031e6166f 100644
--- a/llvm/test/CodeGen/X86/vector-bo-select.ll
+++ b/llvm/test/CodeGen/X86/vector-bo-select.ll
@@ -779,3 +779,285 @@ define <8 x double> @fsub_v8f64_cast_cond(i8 noundef 
zeroext %pb, <8 x double> n
   %r = fsub <8 x double> %x, %s
   ret <8 x double> %r
 }
+
+define <8 x float> @fmul_v8f32_cast_cond(i8 noundef zeroext %pb, <8 x float> 
noundef %x, <8 x float> noundef %y) {
+; AVX2-LABEL: fmul_v8f32_cast_cond:
+; AVX2:   # %bb.0:
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $5, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:movl %edi, %ecx
+; AVX2-NEXT:shrb $4, %cl
+; AVX2-NEXT:movzbl %cl, %ecx
+; AVX2-NEXT:andl $1, %ecx
+; AVX2-NEXT:negl %ecx
+; AVX2-NEXT:vmovd %ecx, %xmm2
+; AVX2-NEXT:vpinsrd $1, %eax, %xmm2, %xmm2
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $6, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vpinsrd $2, %eax, %xmm2, %xmm2
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $7, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vpinsrd $3, %eax, %xmm2, %xmm2
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vmovd %eax, %xmm3
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vpinsrd $1, %eax, %xmm3, %xmm3
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $2, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vpinsrd $2, %eax, %xmm3, %xmm3
+; AVX2-NEXT:shrb $3, %dil
+; AVX2-NEXT:movzbl %dil, %eax
+; AVX2-NEXT:andl $1, %eax
+; AVX2-NEXT:negl %eax
+; AVX2-NEXT:vpinsrd $3, %eax, %xmm3, %xmm3
+; AVX2-NEXT:vinserti128 $1, %xmm2, %ymm3, %ymm2
+; AVX2-NEXT:vbroadcastss {{.*#+}} ymm3 = 
[1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
+; AVX2-NEXT:vblendvps %ymm2, %ymm1, %ymm3, %ymm1
+; AVX2-NEXT:vmulps %ymm1, %ymm0, %ymm0
+; AVX2-NEXT:retq
+;
+; AVX512F-LABEL: fmul_v8f32_cast_cond:
+; AVX512F:   # %bb.0:
+; AVX512F-NEXT:# kill: def $ymm1 killed $ymm1 def $zmm1
+; AVX512F-NEXT:kmovw %edi, %k1
+; AVX512F-NEXT:vbroadcastss {{.*#+}} ymm2 = 
[1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
+; AVX512F-NEXT:vmovaps %zmm1, %zmm2 {%k1}
+; AVX512F-NEXT:vmulps %ymm2, %ymm0, %ymm0
+; AVX512F-NEXT:retq
+;
+; AVX512VL-LABEL: fmul_v8f32_cast_cond:
+; AVX512VL:   # %bb.0:
+; AVX512VL-NEXT:kmovw %edi, %k1
+; AVX512VL-NEXT:vbroadcastss {{.*#+}} ymm2 = 
[1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
+; AVX512VL-NEXT:vmovaps %ymm1, %ymm2 {%k1}
+; AVX512VL-NEXT:vmulps %ymm2, %ymm0, %ymm0
+; AVX512VL-NEXT:retq
+  %b = bitcast i8 %pb to <8 x i1>
+  %s = select <8 x i1> %b, <8 x float> %y, <8 x float> 
+  %r = fmul <8 x float> %x, %s
+  ret <8 x float> %r
+}
+
+define <8 x double> @fmul_v8f64_cast_cond(i8 noundef zeroext %pb, <8 x double> 
noundef %x, <8 x double> noundef %y) {
+; AVX2-LABEL: fmul_v8f64_cast_cond:
+; AVX2:   # %bb.0:
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb %al
+; AVX2-NEXT:andb $1, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:movl %edi, %ecx
+; AVX2-NEXT:andb $1, %cl
+; AVX2-NEXT:movzbl %cl, %ecx
+; AVX2-NEXT:vmovd %ecx, %xmm4
+; AVX2-NEXT:vpinsrb $2, %eax, %xmm4, %xmm4
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $2, %al
+; AVX2-NEXT:andb $1, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:vpinsrb $4, %eax, %xmm4, %xmm4
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $3, %al
+; AVX2-NEXT:andb $1, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:vpinsrb $6, %eax, %xmm4, %xmm4
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $4, %al
+; AVX2-NEXT:andb $1, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:vpinsrb $8, %eax, %xmm4, %xmm5
+; AVX2-NEXT:movl %edi, %eax
+; AVX2-NEXT:shrb $5, %al
+; AVX2-NEXT:andb $1, %al
+; AVX2-NEXT:movzbl %al, %eax
+; AVX2-NEXT:vpinsrb $10, %eax, %xmm5, %xmm5
+; AVX2-N

[llvm-branch-commits] [llvm] ecdd25c - [Debuginfod] [Symbolizer] Break debuginfod out of libLLVM.

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Daniel Thornburgh
Date: 2022-02-16T10:51:45-08:00
New Revision: ecdd25c8651145916f52bf84d094fe94db1a3686

URL: 
https://github.com/llvm/llvm-project/commit/ecdd25c8651145916f52bf84d094fe94db1a3686
DIFF: 
https://github.com/llvm/llvm-project/commit/ecdd25c8651145916f52bf84d094fe94db1a3686.diff

LOG: [Debuginfod] [Symbolizer] Break debuginfod out of libLLVM.

Debuginfod can pull in libcurl as a dependency, which isn't appropriate
for libLLVM. (See
https://gitlab.freedesktop.org/mesa/mesa/-/issues/5732).

This change breaks out debuginfod into a separate non-component library
that can be used directly in llvm-symbolizer. The tool can inject
debuginfod into the Symbolizer library via an abstract DebugInfoFetcher
interface, breaking the dependency of Symbolizer on debuinfod.

See https://github.com/llvm/llvm-project/issues/52731

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D118413

Added: 
llvm/include/llvm/DebugInfo/Symbolize/DIFetcher.h
llvm/include/llvm/Debuginfod/DIFetcher.h
llvm/lib/DebugInfo/Symbolize/DIFetcher.cpp
llvm/lib/Debuginfod/DIFetcher.cpp

Modified: 
llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
llvm/lib/Debuginfod/CMakeLists.txt
llvm/tools/llvm-debuginfod-find/CMakeLists.txt
llvm/tools/llvm-symbolizer/CMakeLists.txt
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
llvm/unittests/Debuginfod/CMakeLists.txt

Removed: 




diff  --git a/llvm/include/llvm/DebugInfo/Symbolize/DIFetcher.h 
b/llvm/include/llvm/DebugInfo/Symbolize/DIFetcher.h
new file mode 100644
index 0..c5340b5f04609
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/Symbolize/DIFetcher.h
@@ -0,0 +1,51 @@
+//===-- llvm/DebugInfo/Symbolize/DIFetcher.h *- C++ 
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+///
+/// \file
+/// This file declares a DIFetcher abstraction for obtaining debug info from an
+/// arbitrary outside source.
+///
+//===--===//
+
+#ifndef LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H
+#define LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H
+
+#include 
+#include 
+
+#include "llvm/ADT/ArrayRef.h"
+
+namespace llvm {
+namespace symbolize {
+
+/// The DIFetcher interface provides arbitrary mechanisms for obtaining debug
+/// info from an outside source.
+class DIFetcher {
+public:
+  virtual ~DIFetcher() = default;
+  virtual Optional
+  fetchBuildID(ArrayRef BuildID) const = 0;
+};
+
+/// LocalDIFetcher searches local cache directories for debug info.
+class LocalDIFetcher : public DIFetcher {
+public:
+  LocalDIFetcher(ArrayRef DebugFileDirectory)
+  : DebugFileDirectory(DebugFileDirectory){};
+  virtual ~LocalDIFetcher() = default;
+
+  Optional fetchBuildID(ArrayRef BuildID) const override;
+
+private:
+  const ArrayRef DebugFileDirectory;
+};
+
+} // end namespace symbolize
+} // end namespace llvm
+
+#endif // LLVM_DEBUGINFO_SYMBOLIZE_DIFETCHER_H

diff  --git a/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h 
b/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
index 4ec333422c4bf..30e55c5d410ae 100644
--- a/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
+++ b/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
@@ -13,6 +13,7 @@
 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H
 #define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H
 
+#include "llvm/DebugInfo/Symbolize/DIFetcher.h"
 #include "llvm/DebugInfo/Symbolize/SymbolizableModule.h"
 #include "llvm/Object/Binary.h"
 #include "llvm/Object/ELFObjectFile.h"
@@ -83,6 +84,10 @@ class LLVMSymbolizer {
   DemangleName(const std::string &Name,
const SymbolizableModule *DbiModuleDescriptor);
 
+  void addDIFetcher(std::unique_ptr Fetcher) {
+DIFetchers.push_back(std::move(Fetcher));
+  }
+
 private:
   // Bundles together object file with code/data and object file with
   // corresponding debug info. These objects can be the same.
@@ -126,6 +131,12 @@ class LLVMSymbolizer {
   const ELFObjectFileBase *Obj,
   const std::string &ArchName);
 
+  bool findDebugBinary(const std::string &OrigPath,
+   const std::string &DebuglinkName, uint32_t CRCHash,
+   std::string &Result);
+
+  bool findDebugBinary(const ArrayRef BuildID, std::string &Result);
+
   /// Returns pair of pointers to object and debug object.
   Expected getOrCreateObjectPair(const std::string &Path,
  const std::string &ArchName);
@@ -152,6 +163,8 @@ class LLVMSymb

[llvm-branch-commits] [openmp] 9bc22aa - [OpenMP][CUDA] Refine the logic to determine grid size

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Shilei Tian
Date: 2022-02-16T10:51:45-08:00
New Revision: 9bc22aa5078020bd76d5e4150d39e929c63cc355

URL: 
https://github.com/llvm/llvm-project/commit/9bc22aa5078020bd76d5e4150d39e929c63cc355
DIFF: 
https://github.com/llvm/llvm-project/commit/9bc22aa5078020bd76d5e4150d39e929c63cc355.diff

LOG: [OpenMP][CUDA] Refine the logic to determine grid size

This patch refines the logic to determine grid size as previous method
can escape the check of whether `CudaBlocksPerGrid` could be greater than the 
actual
hardware limit.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D119311

(cherry picked from commit f6685f774697c85d6a352dcea013f46a99f9fe31)

Added: 


Modified: 
openmp/libomptarget/plugins/cuda/src/rtl.cpp

Removed: 




diff  --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp 
b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
index e17593878b7c7..0ca05f0ec3a0f 100644
--- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -1170,15 +1170,17 @@ class DeviceRTLTy {
 DP("Using default number of teams %d\n", 
DeviceData[DeviceId].NumTeams);
 CudaBlocksPerGrid = DeviceData[DeviceId].NumTeams;
   }
-} else if (TeamNum > DeviceData[DeviceId].BlocksPerGrid) {
-  DP("Capping number of teams to team limit %d\n",
- DeviceData[DeviceId].BlocksPerGrid);
-  CudaBlocksPerGrid = DeviceData[DeviceId].BlocksPerGrid;
 } else {
   DP("Using requested number of teams %d\n", TeamNum);
   CudaBlocksPerGrid = TeamNum;
 }
 
+if (CudaBlocksPerGrid > DeviceData[DeviceId].BlocksPerGrid) {
+  DP("Capping number of teams to team limit %d\n",
+ DeviceData[DeviceId].BlocksPerGrid);
+  CudaBlocksPerGrid = DeviceData[DeviceId].BlocksPerGrid;
+}
+
 INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId,
  "Launching kernel %s with %d blocks and %d threads in %s mode\n",
  (getOffloadEntry(DeviceId, TgtEntryPtr))



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] b0ae807 - [SDAG] enable binop identity constant folds for fmul/fdiv

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Sanjay Patel
Date: 2022-02-16T10:51:45-08:00
New Revision: b0ae8076cf4cf4d9c14af24567a524b8c570349a

URL: 
https://github.com/llvm/llvm-project/commit/b0ae8076cf4cf4d9c14af24567a524b8c570349a
DIFF: 
https://github.com/llvm/llvm-project/commit/b0ae8076cf4cf4d9c14af24567a524b8c570349a.diff

LOG: [SDAG] enable binop identity constant folds for fmul/fdiv

The test diffs are identical to D119111.

This only affects x86 currently because no other target
has an override for the TLI hook that controls this transform.

(cherry picked from commit 905abc5b7db27fa26f49f668b47a57b462be24c9)

Added: 


Modified: 
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/vector-bo-select.ll

Removed: 




diff  --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp 
b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 6a36b7862ce95..ec297579090ef 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2134,6 +2134,9 @@ static SDValue foldSelectWithIdentityConstant(SDNode *N, 
SelectionDAG &DAG,
 return C->isZero() && C->isNegative();
   case ISD::FSUB: // X - 0.0 --> X
 return C->isZero() && !C->isNegative();
+  case ISD::FMUL: // X * 1.0 --> X
+  case ISD::FDIV: // X / 1.0 --> X
+return C->isExactlyValue(1.0);
   }
 }
 return false;

diff  --git a/llvm/test/CodeGen/X86/vector-bo-select.ll 
b/llvm/test/CodeGen/X86/vector-bo-select.ll
index 63d5031e6166f..74549f95a2625 100644
--- a/llvm/test/CodeGen/X86/vector-bo-select.ll
+++ b/llvm/test/CodeGen/X86/vector-bo-select.ll
@@ -279,9 +279,8 @@ define <4 x float> @fmul_v4f32(<4 x i1> %b, <4 x float> 
noundef %x, <4 x float>
 ; AVX512VL:   # %bb.0:
 ; AVX512VL-NEXT:vpslld $31, %xmm0, %xmm0
 ; AVX512VL-NEXT:vptestmd %xmm0, %xmm0, %k1
-; AVX512VL-NEXT:vbroadcastss {{.*#+}} xmm0 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0]
-; AVX512VL-NEXT:vmovaps %xmm2, %xmm0 {%k1}
-; AVX512VL-NEXT:vmulps %xmm0, %xmm1, %xmm0
+; AVX512VL-NEXT:vmulps %xmm2, %xmm1, %xmm1 {%k1}
+; AVX512VL-NEXT:vmovaps %xmm1, %xmm0
 ; AVX512VL-NEXT:retq
   %s = select <4 x i1> %b, <4 x float> %y, <4 x float> 
   %r = fmul <4 x float> %x, %s
@@ -314,9 +313,8 @@ define <8 x float> @fmul_v8f32_commute(<8 x i1> %b, <8 x 
float> noundef %x, <8 x
 ; AVX512VL-NEXT:vpmovsxwd %xmm0, %ymm0
 ; AVX512VL-NEXT:vpslld $31, %ymm0, %ymm0
 ; AVX512VL-NEXT:vptestmd %ymm0, %ymm0, %k1
-; AVX512VL-NEXT:vbroadcastss {{.*#+}} ymm0 = 
[1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
-; AVX512VL-NEXT:vmovaps %ymm2, %ymm0 {%k1}
-; AVX512VL-NEXT:vmulps %ymm1, %ymm0, %ymm0
+; AVX512VL-NEXT:vmulps %ymm2, %ymm1, %ymm1 {%k1}
+; AVX512VL-NEXT:vmovaps %ymm1, %ymm0
 ; AVX512VL-NEXT:retq
   %s = select <8 x i1> %b, <8 x float> %y, <8 x float> 
   %r = fmul <8 x float> %s, %x
@@ -344,8 +342,8 @@ define <16 x float> @fmul_v16f32_swap(<16 x i1> %b, <16 x 
float> noundef %x, <16
 ; AVX512-NEXT:vpmovsxbd %xmm0, %zmm0
 ; AVX512-NEXT:vpslld $31, %zmm0, %zmm0
 ; AVX512-NEXT:vptestmd %zmm0, %zmm0, %k1
-; AVX512-NEXT:vbroadcastss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm2 {%k1}
 ; AVX512-NEXT:vmulps %zmm2, %zmm1, %zmm0
+; AVX512-NEXT:vmovaps %zmm1, %zmm0 {%k1}
 ; AVX512-NEXT:retq
   %s = select <16 x i1> %b, <16 x float> , <16 x float> 
%y
   %r = fmul <16 x float> %x, %s
@@ -373,8 +371,8 @@ define <16 x float> @fmul_v16f32_commute_swap(<16 x i1> %b, 
<16 x float> noundef
 ; AVX512-NEXT:vpmovsxbd %xmm0, %zmm0
 ; AVX512-NEXT:vpslld $31, %zmm0, %zmm0
 ; AVX512-NEXT:vptestmd %zmm0, %zmm0, %k1
-; AVX512-NEXT:vbroadcastss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm2 {%k1}
-; AVX512-NEXT:vmulps %zmm1, %zmm2, %zmm0
+; AVX512-NEXT:vmulps %zmm2, %zmm1, %zmm0
+; AVX512-NEXT:vmovaps %zmm1, %zmm0 {%k1}
 ; AVX512-NEXT:retq
   %s = select <16 x i1> %b, <16 x float> , <16 x float> 
%y
   %r = fmul <16 x float> %s, %x
@@ -405,9 +403,8 @@ define <4 x float> @fdiv_v4f32(<4 x i1> %b, <4 x float> 
noundef %x, <4 x float>
 ; AVX512VL:   # %bb.0:
 ; AVX512VL-NEXT:vpslld $31, %xmm0, %xmm0
 ; AVX512VL-NEXT:vptestmd %xmm0, %xmm0, %k1
-; AVX512VL-NEXT:vbroadcastss {{.*#+}} xmm0 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0]
-; AVX512VL-NEXT:vmovaps %xmm2, %xmm0 {%k1}
-; AVX512VL-NEXT:vdivps %xmm0, %xmm1, %xmm0
+; AVX512VL-NEXT:vdivps %xmm2, %xmm1, %xmm1 {%k1}
+; AVX512VL-NEXT:vmovaps %xmm1, %xmm0
 ; AVX512VL-NEXT:retq
   %s = select <4 x i1> %b, <4 x float> %y, <4 x float> 
   %r = fdiv <4 x float> %x, %s
@@ -470,8 +467,8 @@ define <16 x float> @fdiv_v16f32_swap(<16 x i1> %b, <16 x 
float> noundef %x, <16
 ; AVX512-NEXT:vpmovsxbd %xmm0, %zmm0
 ; AVX512-NEXT:vpslld $31, %zmm0, %zmm0
 ; AVX512-NEXT:vptestmd %zmm0, %zmm0, %k1
-; AVX512-NEXT:vbroadcastss {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm2 {%k1}
 ; AVX512-NEXT:vdivps 

[llvm-branch-commits] [clang] 880717c - clang-analyzer plugins require LLVM_ENABLE_PLUGINS also

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Jameson Nash
Date: 2022-02-16T23:29:13-08:00
New Revision: 880717cc801d0814329af181afe3e084fd45ef74

URL: 
https://github.com/llvm/llvm-project/commit/880717cc801d0814329af181afe3e084fd45ef74
DIFF: 
https://github.com/llvm/llvm-project/commit/880717cc801d0814329af181afe3e084fd45ef74.diff

LOG: clang-analyzer plugins require LLVM_ENABLE_PLUGINS also

The clang-analyzer plugins are not linked to a particular tool, so they
can only be compiled if plugins are broadly supported. We could opt
instead to decide whether to link them to specifically against clang or
with undefined symbols, depending on the value of LLVM_ENABLE_PLUGINS,
but we do not currently expect there to be a use case for that rather
niche configuration.

Differential Revision: https://reviews.llvm.org/D119591

(cherry picked from commit 9d59cfc67eadbe4b4088d70f8bbc61c96568d2f1)

Added: 


Modified: 
clang/CMakeLists.txt
clang/examples/AnnotateFunctions/CMakeLists.txt
clang/examples/Attribute/CMakeLists.txt
clang/examples/CMakeLists.txt
clang/examples/CallSuperAttribute/CMakeLists.txt
clang/examples/PluginsOrder/CMakeLists.txt
clang/examples/PrintFunctionNames/CMakeLists.txt
clang/lib/Analysis/plugins/CMakeLists.txt
clang/test/CMakeLists.txt

Removed: 




diff  --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 4225c028e1794..937a8467df1d7 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -476,9 +476,14 @@ add_definitions( -D_GNU_SOURCE )
 option(CLANG_BUILD_TOOLS
   "Build the Clang tools. If OFF, just generate build targets." ON)
 
+if(LLVM_ENABLE_PLUGINS OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
+  set(HAVE_CLANG_PLUGIN_SUPPORT ON)
+else()
+  set(HAVE_CLANG_PLUGIN_SUPPORT OFF)
+endif()
 CMAKE_DEPENDENT_OPTION(CLANG_PLUGIN_SUPPORT
   "Build clang with plugin support" ON
-  "LLVM_ENABLE_PLUGINS OR LLVM_EXPORT_SYMBOLS_FOR_PLUGINS" OFF)
+  "HAVE_CLANG_PLUGIN_SUPPORT" OFF)
 
 option(CLANG_ENABLE_ARCMT "Build ARCMT." ON)
 option(CLANG_ENABLE_STATIC_ANALYZER

diff  --git a/clang/examples/AnnotateFunctions/CMakeLists.txt 
b/clang/examples/AnnotateFunctions/CMakeLists.txt
index e6541f7cc62a6..827ff79fcc410 100644
--- a/clang/examples/AnnotateFunctions/CMakeLists.txt
+++ b/clang/examples/AnnotateFunctions/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_llvm_library(AnnotateFunctions MODULE AnnotateFunctions.cpp PLUGIN_TOOL 
clang)
 
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS
 Support
   )

diff  --git a/clang/examples/Attribute/CMakeLists.txt 
b/clang/examples/Attribute/CMakeLists.txt
index 5392ac0df1703..770fa28364b77 100644
--- a/clang/examples/Attribute/CMakeLists.txt
+++ b/clang/examples/Attribute/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
 
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
   target_link_libraries(Attribute PRIVATE
 clangAST
 clangBasic

diff  --git a/clang/examples/CMakeLists.txt b/clang/examples/CMakeLists.txt
index 4a677933bb54f..8be327bcdbb9d 100644
--- a/clang/examples/CMakeLists.txt
+++ b/clang/examples/CMakeLists.txt
@@ -3,8 +3,10 @@ if(NOT CLANG_BUILD_EXAMPLES)
   set(EXCLUDE_FROM_ALL ON)
 endif()
 
-add_subdirectory(PrintFunctionNames)
-add_subdirectory(AnnotateFunctions)
-add_subdirectory(Attribute)
-add_subdirectory(CallSuperAttribute)
-add_subdirectory(PluginsOrder)
+if(CLANG_PLUGIN_SUPPORT)
+  add_subdirectory(PrintFunctionNames)
+  add_subdirectory(AnnotateFunctions)
+  add_subdirectory(Attribute)
+  add_subdirectory(CallSuperAttribute)
+  add_subdirectory(PluginsOrder)
+endif()

diff  --git a/clang/examples/CallSuperAttribute/CMakeLists.txt 
b/clang/examples/CallSuperAttribute/CMakeLists.txt
index f4284adf289e3..dc832327c775d 100644
--- a/clang/examples/CallSuperAttribute/CMakeLists.txt
+++ b/clang/examples/CallSuperAttribute/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_llvm_library(CallSuperAttr MODULE CallSuperAttrInfo.cpp PLUGIN_TOOL clang)
 
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS
 Support
   )

diff  --git a/clang/examples/PluginsOrder/CMakeLists.txt 
b/clang/examples/PluginsOrder/CMakeLists.txt
index 612587a6d2fe3..c22b0081ad686 100644
--- a/clang/examples/PluginsOrder/CMakeLists.txt
+++ b/clang/examples/PluginsOrder/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_llvm_library(PluginsOrder MODULE PluginsOrder.cpp PLUGIN_TOOL clang)
 
-if(CLANG_PLUGIN_SUPPORT AND (WIN32 OR CYGWIN))
+if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS
 Support
   )

diff  --git a/clang/examples/PrintFunctionNames/CMakeLists.txt 
b/clang/examples/PrintFunctionNames/CMakeLists.txt
index 67f1b16744eaf..28da363729f3a 100644
--- a/clang/examples/PrintFunctionNames/CMakeLists.txt
+++ b/clang/examples/PrintFunctionNames/CMakeLists.txt
@@ -11,7 +11,7 @@ endif()
 
 add_llvm_library(PrintFunctionNames MODULE PrintFunctionName

[llvm-branch-commits] [clang] 1e348e6 - [OpenCL] Guard atomic_double with cl_khr_int64_*

2022-02-16 Thread Tom Stellard via llvm-branch-commits

Author: Sven van Haastregt
Date: 2022-02-16T23:30:17-08:00
New Revision: 1e348e6042fcec068dfb56c65339a5a60033d3bd

URL: 
https://github.com/llvm/llvm-project/commit/1e348e6042fcec068dfb56c65339a5a60033d3bd
DIFF: 
https://github.com/llvm/llvm-project/commit/1e348e6042fcec068dfb56c65339a5a60033d3bd.diff

LOG: [OpenCL] Guard atomic_double with cl_khr_int64_*

It is necessary to guard atomic_double type according to
https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_C.html#_footnotedef_54.
Platform that disable cl_khr_int64_base_atomics and
cl_khr_int64_extended_atomics will have compiling errors even if
atomic_double is not used.

Patch by Haonan Yang.

Differential Revision: https://reviews.llvm.org/D119398

(cherry picked from commit 477bc8e8b9311fdac4c360b1fe7d29d0d10aac6c)

Added: 


Modified: 
clang/lib/Headers/opencl-c.h

Removed: 




diff  --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h
index 059a2ec2371bd..c7bb77716ac4b 100644
--- a/clang/lib/Headers/opencl-c.h
+++ b/clang/lib/Headers/opencl-c.h
@@ -13832,6 +13832,7 @@ float __ovld atomic_fetch_max_explicit(volatile 
atomic_float *object,
 #endif // defined(__opencl_c_ext_fp32_global_atomic_min_max) &&
\
 defined(__opencl_c_ext_fp32_local_atomic_min_max)
 
+#if defined(cl_khr_int64_base_atomics) && 
defined(cl_khr_int64_extended_atomics)
 #if defined(__opencl_c_ext_fp64_global_atomic_min_max)
 double __ovld atomic_fetch_min(volatile __global atomic_double *object,
double operand);
@@ -13882,6 +13883,8 @@ double __ovld atomic_fetch_max_explicit(volatile 
atomic_double *object,
 memory_scope scope);
 #endif // defined(__opencl_c_ext_fp64_global_atomic_min_max) &&
\
 defined(__opencl_c_ext_fp64_local_atomic_min_max)
+#endif // defined(cl_khr_int64_base_atomics) &&
\
+defined(cl_khr_int64_extended_atomics)
 
 #if defined(__opencl_c_ext_fp16_global_atomic_add)
 half __ovld atomic_fetch_add(volatile __global atomic_half *object,
@@ -13985,6 +13988,7 @@ float __ovld atomic_fetch_sub_explicit(volatile 
atomic_float *object,
 #endif // defined(__opencl_c_ext_fp32_global_atomic_add) &&
\
 defined(__opencl_c_ext_fp32_local_atomic_add)
 
+#if defined(cl_khr_int64_base_atomics) && 
defined(cl_khr_int64_extended_atomics)
 #if defined(__opencl_c_ext_fp64_global_atomic_add)
 double __ovld atomic_fetch_add(volatile __global atomic_double *object,
double operand);
@@ -14035,6 +14039,8 @@ double __ovld atomic_fetch_sub_explicit(volatile 
atomic_double *object,
 memory_scope scope);
 #endif // defined(__opencl_c_ext_fp64_global_atomic_add) &&
\
 defined(__opencl_c_ext_fp64_local_atomic_add)
+#endif // defined(cl_khr_int64_base_atomics) &&
\
+defined(cl_khr_int64_extended_atomics)
 
 #endif // cl_ext_float_atomics
 



___
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits