diff options
author | Paul Osmialowski <pawel.osmialowski@arm.com> | 2017-03-06 21:00:07 +0000 |
---|---|---|
committer | Paul Osmialowski <pawel.osmialowski@arm.com> | 2017-03-06 21:00:07 +0000 |
commit | 1e254c5295502526362efa1757359fdfaf92495d (patch) | |
tree | 2855372fa8a68a8aac5805eb21df73df2e6f9b87 /openmp | |
parent | fb07598bf759ae533964000f40d93c6ee9b65509 (diff) | |
download | bcm5719-llvm-1e254c5295502526362efa1757359fdfaf92495d.tar.gz bcm5719-llvm-1e254c5295502526362efa1757359fdfaf92495d.zip |
Add AArch64 support.
This adds AArch64 support to recently added part of the runtime responsible for offloading to target. This piece of code allows offloading-to-self on AArch64 machines.
Differential Revision: https://reviews.llvm.org/D30644
llvm-svn: 297070
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/libomptarget/CMakeLists.txt | 1 | ||||
-rw-r--r-- | openmp/libomptarget/README.txt | 2 | ||||
-rw-r--r-- | openmp/libomptarget/plugins/CMakeLists.txt | 1 | ||||
-rw-r--r-- | openmp/libomptarget/plugins/aarch64/CMakeLists.txt | 18 | ||||
-rw-r--r-- | openmp/libomptarget/src/omptarget.cpp | 3 | ||||
-rw-r--r-- | openmp/libomptarget/test/offloading/offloading_success.c | 1 | ||||
-rw-r--r-- | openmp/libomptarget/test/offloading/offloading_success.cpp | 1 |
7 files changed, 26 insertions, 1 deletions
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt index 4bfe4209563..0710279b730 100644 --- a/openmp/libomptarget/CMakeLists.txt +++ b/openmp/libomptarget/CMakeLists.txt @@ -51,6 +51,7 @@ include(LibomptargetUtils) include(LibomptargetGetDependencies) # This is a list of all the targets that are supported/tested right now. +set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu") set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu") set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64-ibm-linux-gnu") set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} x86_64-pc-linux-gnu") diff --git a/openmp/libomptarget/README.txt b/openmp/libomptarget/README.txt index 195c8df23e9..3007f2a6652 100644 --- a/openmp/libomptarget/README.txt +++ b/openmp/libomptarget/README.txt @@ -31,11 +31,13 @@ following host architectures: * Intel(R) 64 architecture * IBM(R) Power architecture (big endian) * IBM(R) Power architecture (little endian) +* ARM(R) AArch64 architecture (little endian) The currently supported offloading device architectures are: * Intel(R) 64 architecture (generic 64-bit plugin - mostly for testing purposes) * IBM(R) Power architecture (big endian) (generic 64-bit plugin - mostly for testing purposes) * IBM(R) Power architecture (little endian) (generic 64-bit plugin - mostly for testing purposes) +* ARM(R) AArch64 architecture (little endian) (generic 64-bit plugin - mostly for testing purposes) * CUDA(R) enabled 64-bit NVIDIA(R) GPU architectures Supported RTL Build Configurations diff --git a/openmp/libomptarget/plugins/CMakeLists.txt b/openmp/libomptarget/plugins/CMakeLists.txt index 4b20d7a5241..286c2318e79 100644 --- a/openmp/libomptarget/plugins/CMakeLists.txt +++ b/openmp/libomptarget/plugins/CMakeLists.txt @@ -61,6 +61,7 @@ else() endif() endmacro() +add_subdirectory(aarch64) add_subdirectory(cuda) add_subdirectory(ppc64) add_subdirectory(ppc64le) diff --git a/openmp/libomptarget/plugins/aarch64/CMakeLists.txt b/openmp/libomptarget/plugins/aarch64/CMakeLists.txt new file mode 100644 index 00000000000..e3a76b96536 --- /dev/null +++ b/openmp/libomptarget/plugins/aarch64/CMakeLists.txt @@ -0,0 +1,18 @@ +##===----------------------------------------------------------------------===## +# +# The LLVM Compiler Infrastructure +# +# This file is dual licensed under the MIT and the University of Illinois Open +# Source Licenses. See LICENSE.txt for details. +# +##===----------------------------------------------------------------------===## +# +# Build a plugin for an aarch64 machine if available. +# +##===----------------------------------------------------------------------===## + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + build_generic_elf64("aarch64" "aarch64" "aarch64" "aarch64-unknown-linux-gnu" "183") +else() + libomptarget_say("Not building aarch64 offloading plugin: machine not found in the system.") +endif() diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp index 5be43fe6e14..fe61ea9f782 100644 --- a/openmp/libomptarget/src/omptarget.cpp +++ b/openmp/libomptarget/src/omptarget.cpp @@ -35,7 +35,8 @@ static const char *RTLNames[] = { /* PowerPC target */ "libomptarget.rtl.ppc64.so", /* x86_64 target */ "libomptarget.rtl.x86_64.so", - /* CUDA target */ "libomptarget.rtl.cuda.so"}; + /* CUDA target */ "libomptarget.rtl.cuda.so", + /* AArch64 target */ "libomptarget.rtl.aarch64.so"}; // forward declarations struct RTLInfoTy; diff --git a/openmp/libomptarget/test/offloading/offloading_success.c b/openmp/libomptarget/test/offloading/offloading_success.c index facaf700199..697330172a9 100644 --- a/openmp/libomptarget/test/offloading/offloading_success.c +++ b/openmp/libomptarget/test/offloading/offloading_success.c @@ -1,3 +1,4 @@ +// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu diff --git a/openmp/libomptarget/test/offloading/offloading_success.cpp b/openmp/libomptarget/test/offloading/offloading_success.cpp index 62d5cf8758f..5b053026df3 100644 --- a/openmp/libomptarget/test/offloading/offloading_success.cpp +++ b/openmp/libomptarget/test/offloading/offloading_success.cpp @@ -1,3 +1,4 @@ +// RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu |