Commit Graph

22 Commits

Author SHA1 Message Date
Mikhail Dvorskiy 6069a6a504 [pstl] Initial implementation of OpenMP backend, on behalf of Christopher Nelson nadiasvertex@gmail.com
Phabricator Review:
https://reviews.llvm.org/D99836

A couple of parallel patterns still remains serial - "Parallel partial sort", and "Parallel transform scan" - there are //TODOs in the code.
2021-10-15 15:36:07 +03:00
Louis Dionne afa1afd410 [CMake] Bump CMake minimum version to 3.13.4
This upgrade should be friction-less because we've already been ensuring
that CMake >= 3.13.4 is used.

This is part of the effort discussed on llvm-dev here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html

Differential Revision: https://reviews.llvm.org/D78648
2020-07-22 14:25:07 -04:00
Louis Dionne ef14e52be4 [pstl] Do not install the __config_site.in file
The generated version of the file is already installed -- we shouldn't
install the pre-generation version of the file.
2020-07-08 14:52:03 -04:00
Louis Dionne 1b6d6e595b [pstl] Allow customizing whether per-TU insulation is provided
Like we do in libc++, PSTL needs the ability to constrain
ABI-unstable symbols to each translation unit. This is OFF by
default (like for libc++), because most people don't care about
this and there is a cost associated to enabling the option (code
bloat because templates are not deduped across TUs).

I'm using '#pragma clang attribute push' to avoid marking each
declaration with an attribute, which quickly becomes difficult
to maintain.

llvm-svn: 368684
2019-08-13 12:49:00 +00:00
Louis Dionne 5065e78173 [pstl] Rename PARALLELSTL_BACKEND to PSTL_PARALLEL_BACKEND
It makes more sense to name configuration options as PSTL_XXX.
Also, I'm naming it PSTL_PARALLEL_BACKEND because we might introduce
the ability to customize the vectorization backend, in which case
PSTL_BACKEND would become ambiguous.

llvm-svn: 368672
2019-08-13 11:50:26 +00:00
Louis Dionne bf4808439f [pstl] Add a __pstl_config_site header to record the CMake configuration
This commit adds a __pstl_config_site header that contains the value of
macros specified at CMake configuration time. It works similarly to
libc++'s __config_site header, except we always include it as a separate
file instead of concatenating it to the main configuration header.

It is necessary to thread the includes for that header into libc++'s
lit configuration, otherwise we'd be requiring an installation step
prior to running the test suite.

llvm-svn: 368284
2019-08-08 12:43:04 +00:00
Louis Dionne 762e662582 [pstl] Make sure we install all of PSTL's include/ directory
We want to install files directly in include/, not only in include/pstl.

llvm-svn: 368203
2019-08-07 20:29:04 +00:00
Louis Dionne 65a422c81c [pstl] Make the default backend be the serial backend and always provide parallel policies
Summary:
Before this change, the default backend was TBB but one could disable
anything related to TBB by removing the parallel policies. This change
uses the serial backend by default and removes the ability to disable
parallel policies, which is not useful anymore.

Reviewers: rodgert, MikeDvorskiy

Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits

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

llvm-svn: 359134
2019-04-24 20:12:36 +00:00
Louis Dionne dcf4b9aee0 [pstl] Add a serial backend for the PSTL
Summary:
The serial backend performs all tasks serially and does not require
threads. It does not have any dependencies beyond normal C++, but
it is not very efficient either.

Reviewers: rodgert, MikeDvorskiy

Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits

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

llvm-svn: 358700
2019-04-18 18:20:19 +00:00
Louis Dionne e7f2cbe45a [pstl] Remove our custom FindTBB CMake file
Summary:
The TBBConfig file installed by TBB 2019 Update 5 works properly, so we
don't need this workaround anymore.

Reviewers: rodgert, MikeDvorskiy

Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

llvm-svn: 358196
2019-04-11 17:23:18 +00:00
Louis Dionne ab38599bb1 [pstl] Setup the _PSTL_VERSION macro like _LIBCPP_VERSION, and add release notes
Reviewers: rodgert, MikeDvorskiy

Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits

Tags: #libc

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

llvm-svn: 358193
2019-04-11 17:08:55 +00:00
Louis Dionne f7433f9623 [pstl][CMake] Install CMake export files
This allows other projects to depend on PSTL using the classic CMake
find_package protocol.

llvm-svn: 358028
2019-04-09 18:35:56 +00:00
Louis Dionne 2fb3225375 [pstl][NFC] Move the ParallelSTLConfig template to the cmake/ subdirectory
llvm-svn: 358018
2019-04-09 16:48:43 +00:00
Louis Dionne 540e18ded7 [pstl] Require C++17 when linking against pstl
llvm-svn: 357609
2019-04-03 17:17:40 +00:00
Louis Dionne 3b62047b8b Restructure test suite to follow libc++ standard layout
Summary: Subsumes changes requested in https://reviews.llvm.org/D59110

Reviewers: EricWF, ldionne

Subscribers: mgorny, krytarowski, jfb, jdoerfert, libcxx-commits

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

llvm-svn: 357124
2019-03-27 21:28:24 +00:00
Louis Dionne e808befa0e [pstl][CMake] Move include() closer to its point of use
llvm-svn: 356900
2019-03-25 14:45:21 +00:00
Louis Dionne 72b8e77a49 [pstl] By default, disable the parallel policies
Since we don't have any non-trivial PSTL backend that doesn't require
TBB yet, enabling the parallel policies by default breaks people that
try to build all of LLVM without having an installation of TBB. Since
this is unacceptable, parallel policies are disabled by default.

We can re-enable it once we have a backend that does not require anything
beyond what C++ already requires. For example, we could have a simple
backend that uses std::thread by default or something along those lines,
with the understanding that vendors would use their own (more efficient)
backend.

llvm-svn: 356194
2019-03-14 19:33:58 +00:00
Louis Dionne 0f4ce2b0d7 [pstl] Properly extract the version number from pstl_config.h
Previously, we'd be performing math on `#define PSTL_VERSION NNN` instead
of just `NNN`. It seems like older CMakes didn't complain, but newer
CMakes do complain because it doesn't make sense.

llvm-svn: 355918
2019-03-12 13:48:25 +00:00
Chandler Carruth 57b08b0944 Update more file headers across all of the LLVM projects in the monorepo
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351648
2019-01-19 10:56:40 +00:00
Louis Dionne 70f1b79687 [pstl] Fix CMake configuration when parallel policies are disabled
llvm-svn: 350812
2019-01-10 11:17:26 +00:00
Louis Dionne 5e334b516b [pstl] Initial integration with LLVM's CMake
Summary:
This commit adds a check-pstl CMake target that will run the tests
we currently have for pstl. Those tests are not using LLVM lit yet,
but switching them over should be a transparent change. With this
change, we can start relying on the `check-pstl` target for workflows
and CI.

Note that this commit purposefully does not support the pre-monorepo
layout (with subprojects in projects/), since LLVM is moving towards
the monorepo layout anyway.

Reviewers: jfb

Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits, mclow.lists, rodgert

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

llvm-svn: 349919
2018-12-21 15:59:04 +00:00
JF Bastien e637637ae4 Initial PSTL commit
The initial commit of the Parallel STL upstream (under LLVM umbrella) based on
Parallel STL 20181204 open source release, which is available by
https://github.com/intel/parallelstl

Author: Mikhail Dvorskiy <mikhail.dvorskiy@intel.com>

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

llvm-svn: 349653
2018-12-19 17:45:32 +00:00