mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
f0f6b46554
This is the first of multiple parts to make OpenMP context/trait handling reusable and generic. This patch was originally part of D71830 but with the unit tests it can be tested independently. This patch implements an almost complete handling of OpenMP contexts/traits such that we can reuse most of the logic in Flang through the OMPContext.{h,cpp} in llvm/Frontend/OpenMP. All but construct SIMD specifiers, e.g., inbranch, and the device ISA selector are define in llvm/lib/Frontend/OpenMP/OMPKinds.def. From these definitions we generate the enum classes TraitSet, TraitSelector, and TraitProperty as well as conversion and helper functions in llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}. The OpenMP context is now an explicit object (see `struct OMPContext`). This is in anticipation of construct traits that need to be tracked. The OpenMP context, as well as the VariantMatchInfo, are basically made up of a set of active or respectively required traits, e.g., 'host', and an ordered container of constructs which allows duplication. Matching and scoring is kept as generic as possible to allow easy extension in the future. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D71847
16 lines
260 B
CMake
16 lines
260 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
Analysis
|
|
Core
|
|
FrontendOpenMP
|
|
Support
|
|
Passes
|
|
TransformUtils
|
|
)
|
|
|
|
add_llvm_unittest(LLVMFrontendTests
|
|
OpenMPContextTest.cpp
|
|
OpenMPIRBuilderTest.cpp
|
|
)
|
|
|
|
target_link_libraries(LLVMFrontendTests PRIVATE LLVMTestingSupport)
|