[Openmp-commits] [openmp] r297070 - Add AArch64 support.

Paul Osmialowski via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 6 13:00:07 PST 2017


Author: pawosm01
Date: Mon Mar  6 15:00:07 2017
New Revision: 297070

URL: http://llvm.org/viewvc/llvm-project?rev=297070&view=rev
Log:
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

Added:
    openmp/trunk/libomptarget/plugins/aarch64/
    openmp/trunk/libomptarget/plugins/aarch64/CMakeLists.txt
Modified:
    openmp/trunk/libomptarget/CMakeLists.txt
    openmp/trunk/libomptarget/README.txt
    openmp/trunk/libomptarget/plugins/CMakeLists.txt
    openmp/trunk/libomptarget/src/omptarget.cpp
    openmp/trunk/libomptarget/test/offloading/offloading_success.c
    openmp/trunk/libomptarget/test/offloading/offloading_success.cpp

Modified: openmp/trunk/libomptarget/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/CMakeLists.txt?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/CMakeLists.txt (original)
+++ openmp/trunk/libomptarget/CMakeLists.txt Mon Mar  6 15:00:07 2017
@@ -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")

Modified: openmp/trunk/libomptarget/README.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/README.txt?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/README.txt (original)
+++ openmp/trunk/libomptarget/README.txt Mon Mar  6 15:00:07 2017
@@ -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

Modified: openmp/trunk/libomptarget/plugins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/plugins/CMakeLists.txt?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/plugins/CMakeLists.txt (original)
+++ openmp/trunk/libomptarget/plugins/CMakeLists.txt Mon Mar  6 15:00:07 2017
@@ -61,6 +61,7 @@ else()
 endif()
 endmacro()
 
+add_subdirectory(aarch64)
 add_subdirectory(cuda)
 add_subdirectory(ppc64)
 add_subdirectory(ppc64le)

Added: openmp/trunk/libomptarget/plugins/aarch64/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/plugins/aarch64/CMakeLists.txt?rev=297070&view=auto
==============================================================================
--- openmp/trunk/libomptarget/plugins/aarch64/CMakeLists.txt (added)
+++ openmp/trunk/libomptarget/plugins/aarch64/CMakeLists.txt Mon Mar  6 15:00:07 2017
@@ -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()

Modified: openmp/trunk/libomptarget/src/omptarget.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/omptarget.cpp?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/omptarget.cpp (original)
+++ openmp/trunk/libomptarget/src/omptarget.cpp Mon Mar  6 15:00:07 2017
@@ -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;

Modified: openmp/trunk/libomptarget/test/offloading/offloading_success.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/test/offloading/offloading_success.c?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/test/offloading/offloading_success.c (original)
+++ openmp/trunk/libomptarget/test/offloading/offloading_success.c Mon Mar  6 15:00:07 2017
@@ -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

Modified: openmp/trunk/libomptarget/test/offloading/offloading_success.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/test/offloading/offloading_success.cpp?rev=297070&r1=297069&r2=297070&view=diff
==============================================================================
--- openmp/trunk/libomptarget/test/offloading/offloading_success.cpp (original)
+++ openmp/trunk/libomptarget/test/offloading/offloading_success.cpp Mon Mar  6 15:00:07 2017
@@ -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




More information about the Openmp-commits mailing list