The commit includes the Clang code generation for OpenMP target
constructs based on the interface target region (TRegion) interface.
The interface was introduced in https://reviews.llvm.org/D59319 .
This target code generation is a vastly simplified clone of the NVPTX
code generation but
- there is no NVPTX (or other) target specific code, at least there should not be any. The "checkArchForUnifiedAddressing" functionality should therefore be moved to a target specific location later on.
- we provide hooks for subclasses in order to perform front-end analysis, as an alternative of LLVM based optimizations, e.g., to enable SPMD-mode. (See isKnownSPMDMode, mayNeedRuntimeSupport, and mayPerformDataSharing)
The interface is deliberately simple to be easily analyzable in the
middle end. Design decisions included:
- Hide all (complex) implementation choices in the runtime library but allow complete removal of the abstraction once the runtime is inlined.
- Provide all runtime calls with sufficient, easy encoded information.