[all-commits] [llvm/llvm-project] 503f2e: [libc++] Make sure we use the libdispatch backend ...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Jul 20 12:53:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 503f2ee4a86a740c4b4f442d95ff4e6d7f66a670
      https://github.com/llvm/llvm-project/commit/503f2ee4a86a740c4b4f442d95ff4e6d7f66a670
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-07-20 (Thu, 20 Jul 2023)

  Changed paths:
    M libcxx/cmake/caches/Apple.cmake
    M libcxx/include/__algorithm/pstl_backends/cpu_backends/libdispatch.h
    M libcxx/src/pstl/libdispatch.cpp
    M libcxx/test/libcxx/algorithms/pstl.libdispatch.chunk_partitions.pass.cpp
    M libcxx/test/libcxx/vendor/apple/system-install-properties.sh.cpp

  Log Message:
  -----------
  [libc++] Make sure we use the libdispatch backend on Apple platforms

The Apple.cmake cache wasn't set up properly, so we wouldn't enable
the libdispatch backend by default on Apple platforms. This patch
fixes the issue and adds a test.

We also need to make various drive-by fixes:
- Drop the usage of std::vector in libdispatch.h to avoid changing
  the transitive includes only on Apple platforms.
- Fix includes
- Use __construct at since construct_at is unavailable in C++17
- Get rid of the (unused) __get_memory_resource function since that
  adds a back-deployment requirement and we don't use it right now.
- Fix bugs in the chunking logic around boundary conditions.

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




More information about the All-commits mailing list