Go to file
Samuel Antao 3f465c095b [OpenMP] Reorganize code to allow specialized code generation for different devices.
Summary:
Different devices may in some cases require different code generation schemes in order to implement OpenMP. This is required not only for performance reasons, but also because it may not be possible to have the current (default) implementation working for these devices. E.g. GPU's cannot implement the same scheme a target such as powerpc or x86b would use, in the sense that it does not have the ability to fork threads, instead all the threads are always executing and need to be managed by the implementation. 

This patch proposes a reorganization of the code in the OpenMP code generation to pave the way to have specialized implementation of OpenMP support. More than a "real" patch this is more a request for comments in order to understand if what is proposed is acceptable or if there are better/easier ways to do it.

In this patch part of the common OpenMP codegen infrastructure is moved to a new file under a new namespace (CGOpenMPCommon) so it can be shared between the default implementation and the specialized one. When CGOpenMPRuntime is created, an attempt to select a specialized implementation is done.

In the patch a specialization for nvptx targets is done which currently checks if the target is an OpenMP device and trap if it is not. 

Let me know comments suggestions you may have.

Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev

Subscribers: Hahnfeld, cfe-commits, fraggamuffin, caomhin, jholewinski

Differential Revision: http://reviews.llvm.org/D16784

llvm-svn: 259977
2016-02-06 02:12:34 +00:00
clang [OpenMP] Reorganize code to allow specialized code generation for different devices. 2016-02-06 02:12:34 +00:00
clang-tools-extra Add qualifiers that are about to be necessary. NFC 2016-02-05 23:20:02 +00:00
compiler-rt [asan] add an experimental feature that prints the scariness score of the error message. To enable it use ASAN_OPTIONS=print_scariness=1 2016-02-06 00:29:44 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement modf math builtin 2016-01-27 14:52:10 +00:00
libcxx Fix the search path for CMake files 2016-02-04 23:17:20 +00:00
libcxxabi [libcxxabi] Teach cxa_demangle about Hexagon's long double size 2016-01-20 14:10:23 +00:00
libunwind Replace cmake check for printf with a check for fopen. 2015-12-10 00:47:08 +00:00
lld Set max segment protection level. 2016-02-06 00:51:16 +00:00
lldb Per Jim's suggestion, move checks that we're not mixing and matching Debuggers and Commands deeper in the bowels of LLDB 2016-02-06 01:36:07 +00:00
llgo [llgo] Force exporting __morestack from llgoi 2015-11-27 04:46:46 +00:00
llvm Relax assertion in ReplaceableMetadataImpl::replaceAllUsesWith(). 2016-02-06 01:56:55 +00:00
openmp [CMake] Introduce OPENMP_LLVM_TOOLS_DIR 2016-02-05 07:00:13 +00:00
polly Support accesses with differently sized types to the same array 2016-02-04 13:18:42 +00:00