diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2024-04-15 10:30:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-15 10:30:00 -0400 |
commit | a3ce29f7bb5510131971ac5ccc63132dd48c8dd2 (patch) | |
tree | 0a734037667f297850f67814040fa2652062daed /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | b68ff060ab70c44fb617e34451003f34ff062d2b (diff) | |
download | llvm-a3ce29f7bb5510131971ac5ccc63132dd48c8dd2.zip llvm-a3ce29f7bb5510131971ac5ccc63132dd48c8dd2.tar.gz llvm-a3ce29f7bb5510131971ac5ccc63132dd48c8dd2.tar.bz2 |
[libc++][PSTL] Introduce cpu traits (#88134)
Currently, CPU backends in the PSTL are created by defining functions
in the __par_backend namespace. Then, the PSTL includes the CPU backend
that gets configured via CMake and gets those definitions.
This prevents CPU backends from easily co-existing and is a bit
confusing.
To solve this problem, this patch introduces the notion of __cpu_traits,
which is a cheap encapsulation of the basis operations required to
implement a CPU-based PSTL. Different backends can now define their own
tag and coexist, and the CPU-based PSTL will simply use __cpu_traits to
dispatch to the right implementation of e.g. __for_each.
Note that this patch doesn't change the actual implementation of the
backends in any way, it only modifies how that implementation is
accessed
to implement PSTL algorithms.
This patch is a step towards #88131.
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions