[llvm] [Offload][NFC] Remove all trailing whitespace from offload/ (PR #92578)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 10:08:05 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
@llvm/pr-subscribers-backend-amdgpu
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
Summary:
This patch cleans up the training whitespace in a bunch of tests and
CMake files.
---
Patch is 52.75 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/92578.diff
51 Files Affected:
- (modified) offload/CMakeLists.txt (+1-1)
- (modified) offload/DeviceRTL/CMakeLists.txt (+1-1)
- (modified) offload/plugins-nextgen/CMakeLists.txt (+1-1)
- (modified) offload/plugins-nextgen/amdgpu/CMakeLists.txt (+1-1)
- (modified) offload/plugins-nextgen/common/CMakeLists.txt (+1-1)
- (modified) offload/plugins-nextgen/cuda/CMakeLists.txt (+1-1)
- (modified) offload/plugins-nextgen/host/CMakeLists.txt (+5-5)
- (modified) offload/src/CMakeLists.txt (+1-1)
- (modified) offload/test/mapping/array_section_implicit_capture.c (+1-1)
- (modified) offload/test/offloading/default_thread_limit.c (+1-1)
- (modified) offload/test/offloading/fortran/basic-target-region-1D-array-section.f90 (+2-2)
- (modified) offload/test/offloading/fortran/basic-target-region-3D-array-section.f90 (+2-2)
- (modified) offload/test/offloading/fortran/double-target-call-with-declare-target.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90 (+23-23)
- (modified) offload/test/offloading/fortran/target-map-derived-type-full-1.f90 (+7-7)
- (modified) offload/test/offloading/fortran/target-map-derived-type-full-2.f90 (+10-10)
- (modified) offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90 (+6-7)
- (modified) offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90 (+10-10)
- (modified) offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90 (+12-12)
- (modified) offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90 (+8-8)
- (modified) offload/test/offloading/fortran/target-map-double-nested-dtype-double-array-bounds.f90 (+8-8)
- (modified) offload/test/offloading/fortran/target-map-double-nested-dtype-single-member.f90 (+5-5)
- (modified) offload/test/offloading/fortran/target-map-dtype-arr-bounds-member-enter-exit-update.f90 (+6-6)
- (modified) offload/test/offloading/fortran/target-map-dtype-arr-bounds-member-enter-exit.f90 (+8-8)
- (modified) offload/test/offloading/fortran/target-map-dtype-explicit-individual-array-member.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-3D-member-bounds.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-member-bounds.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-member.f90 (+2-2)
- (modified) offload/test/offloading/fortran/target-map-dtype-multi-explicit-member.f90 (+8-8)
- (modified) offload/test/offloading/fortran/target-map-enter-exit-allocatables.f90 (+5-5)
- (modified) offload/test/offloading/fortran/target-map-enter-exit-array-2.f90 (+2-2)
- (modified) offload/test/offloading/fortran/target-map-enter-exit-array-bounds.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-enter-exit-array.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-enter-exit-scalar.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-individual-dtype-member-map.f90 (+2-2)
- (modified) offload/test/offloading/fortran/target-map-large-nested-dtype-multi-member.f90 (+10-10)
- (modified) offload/test/offloading/fortran/target-map-nested-dtype-complex-member.f90 (+5-5)
- (modified) offload/test/offloading/fortran/target-map-nested-dtype-derived-member.f90 (+6-6)
- (modified) offload/test/offloading/fortran/target-map-nested-dtype-multi-member.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-nested-dtype-single-member.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-pointer-scopes-enter-exit.f90 (+23-23)
- (modified) offload/test/offloading/fortran/target-map-pointer-target-array-section-3d-bounds.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-pointer-target-scopes.f90 (+22-22)
- (modified) offload/test/offloading/fortran/target-map-two-dtype-explicit-member.f90 (+2-2)
- (modified) offload/test/offloading/fortran/target-map-two-dtype-individual-member-array-1D-bounds.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-two-dtype-mixed-implicit-explicit-capture-1.f90 (+2-2)
- (modified) offload/test/offloading/fortran/target-map-two-dtype-mixed-implicit-explicit-capture-2.f90 (+3-3)
- (modified) offload/test/offloading/fortran/target-map-two-dtype-multi-member-array-1D-bounds.f90 (+4-4)
- (modified) offload/test/offloading/fortran/target-map-two-nested-dtype-member-array-map.f90 (+3-3)
- (modified) offload/test/offloading/spmdization.c (+8-2)
- (modified) offload/test/offloading/thread_limit.c (+2-2)
``````````diff
diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt
index 31adbe45388a8..4e552e0589593 100644
--- a/offload/CMakeLists.txt
+++ b/offload/CMakeLists.txt
@@ -134,7 +134,7 @@ if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS)
message(FATAL_ERROR "Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS")
endif()
-if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
+if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
DEFINED LIBOMPTARGET_BUILD_AMDGPU_PLUGIN)
message(WARNING "Option removed, use 'LIBOMPTARGET_PLUGINS_TO_BUILD' instead")
endif()
diff --git a/offload/DeviceRTL/CMakeLists.txt b/offload/DeviceRTL/CMakeLists.txt
index ae7d54d127edd..0c9b77ded5abe 100644
--- a/offload/DeviceRTL/CMakeLists.txt
+++ b/offload/DeviceRTL/CMakeLists.txt
@@ -104,7 +104,7 @@ set(src_files
# vectorized accesses to the shared state. Generally, those are "good" but
# the optimizer pipeline (esp. Attributor) does not fully support vectorized
# instructions yet and we end up missing out on way more important constant
-# propagation. That said, we will run the vectorizer again after the runtime
+# propagation. That said, we will run the vectorizer again after the runtime
# has been linked into the user program.
set(clang_opt_flags -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512 -mllvm -vectorize-slp=false )
set(link_opt_flags -O3 -openmp-opt-disable -attributor-enable=module -vectorize-slp=false )
diff --git a/offload/plugins-nextgen/CMakeLists.txt b/offload/plugins-nextgen/CMakeLists.txt
index 5d684420c2901..d31bf557669ea 100644
--- a/offload/plugins-nextgen/CMakeLists.txt
+++ b/offload/plugins-nextgen/CMakeLists.txt
@@ -38,7 +38,7 @@ function(add_target_library target_name lib_name)
PluginCommon ${OPENMP_PTHREAD_LIB})
target_compile_definitions(${target_name} PRIVATE TARGET_NAME=${lib_name})
- target_compile_definitions(${target_name} PRIVATE
+ target_compile_definitions(${target_name} PRIVATE
DEBUG_PREFIX="TARGET ${lib_name} RTL")
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endfunction()
diff --git a/offload/plugins-nextgen/amdgpu/CMakeLists.txt b/offload/plugins-nextgen/amdgpu/CMakeLists.txt
index 4a79fa83420c8..5f72568e9a537 100644
--- a/offload/plugins-nextgen/amdgpu/CMakeLists.txt
+++ b/offload/plugins-nextgen/amdgpu/CMakeLists.txt
@@ -28,7 +28,7 @@ endif()
option(LIBOMPTARGET_FORCE_AMDGPU_TESTS "Build AMDGPU libomptarget tests" OFF)
if (LIBOMPTARGET_FOUND_AMDGPU_GPU OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
# Report to the parent scope that we are building a plugin for amdgpu
- set(LIBOMPTARGET_SYSTEM_TARGETS
+ set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} amdgcn-amd-amdhsa" PARENT_SCOPE)
list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.amdgpu")
set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
diff --git a/offload/plugins-nextgen/common/CMakeLists.txt b/offload/plugins-nextgen/common/CMakeLists.txt
index 43e08d575a4ac..284f98875170c 100644
--- a/offload/plugins-nextgen/common/CMakeLists.txt
+++ b/offload/plugins-nextgen/common/CMakeLists.txt
@@ -51,7 +51,7 @@ target_compile_definitions(PluginCommon PRIVATE
target_compile_options(PluginCommon PUBLIC ${offload_compile_flags})
target_link_options(PluginCommon PUBLIC ${offload_link_flags})
-target_include_directories(PluginCommon PUBLIC
+target_include_directories(PluginCommon PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${LIBOMPTARGET_LLVM_INCLUDE_DIRS}
${LIBOMPTARGET_BINARY_INCLUDE_DIR}
diff --git a/offload/plugins-nextgen/cuda/CMakeLists.txt b/offload/plugins-nextgen/cuda/CMakeLists.txt
index 4be33c6b69dce..51507e7537a42 100644
--- a/offload/plugins-nextgen/cuda/CMakeLists.txt
+++ b/offload/plugins-nextgen/cuda/CMakeLists.txt
@@ -25,7 +25,7 @@ endif()
option(LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF)
if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
libomptarget_say("Enable tests using CUDA plugin")
- set(LIBOMPTARGET_SYSTEM_TARGETS
+ set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.cuda")
set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)
diff --git a/offload/plugins-nextgen/host/CMakeLists.txt b/offload/plugins-nextgen/host/CMakeLists.txt
index 72b5681283fe2..d35aadc56aa80 100644
--- a/offload/plugins-nextgen/host/CMakeLists.txt
+++ b/offload/plugins-nextgen/host/CMakeLists.txt
@@ -44,23 +44,23 @@ endif()
# Define the target specific triples and ELF machine values.
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le$")
- list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
+ list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
"powerpc64le-ibm-linux-gnu" "powerpc64le-ibm-linux-gnu-LTO")
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64$")
- list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
+ list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
"powerpc64-ibm-linux-gnu" "powerpc64-ibm-linux-gnu-LTO")
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64$")
- list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
+ list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
"x86_64-pc-linux-gnu" "x86_64-pc-linux-gnu-LTO")
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64$")
- list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
+ list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
"aarch64-unknown-linux-gnu" "aarch64-unknown-linux-gnu-LTO")
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x$")
- list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
+ list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
"s390x-ibm-linux-gnu" "s390x-ibm-linux-gnu-LTO")
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
endif()
diff --git a/offload/src/CMakeLists.txt b/offload/src/CMakeLists.txt
index 590fb650c0ae8..c54bcbe7ed26f 100644
--- a/offload/src/CMakeLists.txt
+++ b/offload/src/CMakeLists.txt
@@ -38,7 +38,7 @@ add_llvm_library(omptarget
NO_INSTALL_RPATH
BUILDTREE_ONLY
)
-target_include_directories(omptarget PRIVATE
+target_include_directories(omptarget PRIVATE
${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMPTARGET_BINARY_INCLUDE_DIR}
)
diff --git a/offload/test/mapping/array_section_implicit_capture.c b/offload/test/mapping/array_section_implicit_capture.c
index 210b7e51cbdff..1042bd23bd5ef 100644
--- a/offload/test/mapping/array_section_implicit_capture.c
+++ b/offload/test/mapping/array_section_implicit_capture.c
@@ -1,4 +1,4 @@
-// RUN: %libomptarget-compile-generic
+// RUN: %libomptarget-compile-generic
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
diff --git a/offload/test/offloading/default_thread_limit.c b/offload/test/offloading/default_thread_limit.c
index 4da02bbb152e6..d9be843dfbda4 100644
--- a/offload/test/offloading/default_thread_limit.c
+++ b/offload/test/offloading/default_thread_limit.c
@@ -33,7 +33,7 @@ int main() {
optnone();
}
// DEFAULT: [[NT:(128|256)]] (MaxFlatWorkGroupSize: [[NT]]
-#pragma omp target
+#pragma omp target
#pragma omp teams distribute parallel for
for (int i = 0; i < N; ++i) {
optnone();
diff --git a/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90 b/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
index 476b77e4a549b..e0b0f2ea734e9 100644
--- a/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
+++ b/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
@@ -1,4 +1,4 @@
-! Basic offloading test of arrays with provided lower
+! Basic offloading test of arrays with provided lower
! and upper bounds as specified by OpenMP's sectioning
! REQUIRES: flang
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
@@ -20,7 +20,7 @@ program main
i = i + 1
end do
!$omp end target
-
+
print *, write_arr(:)
end program
diff --git a/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90 b/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
index 229798b57477d..1b3f86c0dbfaa 100644
--- a/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
+++ b/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
@@ -12,7 +12,7 @@ program main
implicit none
integer :: inArray(3,3,3)
integer :: outArray(3,3,3)
- integer :: i, j, k
+ integer :: i, j, k
integer :: j2 = 3, k2 = 3
do i = 1, 3
@@ -25,7 +25,7 @@ program main
end do
j = 1
-k = 1
+k = 1
!$omp target map(tofrom:inArray(1:3, 1:3, 2:2), outArray(1:3, 1:3, 1:3), j, k, j2, k2)
do while (j <= j2)
k = 1
diff --git a/offload/test/offloading/fortran/double-target-call-with-declare-target.f90 b/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
index 56c96727d4752..38cb055bfa2da 100644
--- a/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
+++ b/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
@@ -1,6 +1,6 @@
! Offloading test with two target regions mapping the same
-! declare target Fortran array and writing some values to
-! it before checking the host correctly receives the
+! declare target Fortran array and writing some values to
+! it before checking the host correctly receives the
! correct updates made on the device.
! REQUIRES: flang
! UNSUPPORTED: nvptx64-nvidia-cuda
@@ -35,7 +35,7 @@ program main
i = i + 1
end do
!$omp end target
-
+
print *, sp(:)
end program
diff --git a/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90 b/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
index bb47d3de96d2a..506976b339dfc 100644
--- a/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
+++ b/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
@@ -11,55 +11,55 @@
! RUN: %libomptarget-compile-fortran-run-and-check-generic
module test
contains
- subroutine func_arg(arg_alloc)
+ subroutine func_arg(arg_alloc)
integer, allocatable, intent (inout) :: arg_alloc(:)
-
- !$omp target map(tofrom: arg_alloc)
+
+ !$omp target map(tofrom: arg_alloc)
do index = 1, 10
arg_alloc(index) = arg_alloc(index) + index
end do
!$omp end target
-
+
print *, arg_alloc
end subroutine func_arg
-end module
-
-subroutine func
- integer, allocatable :: local_alloc(:)
+end module
+
+subroutine func
+ integer, allocatable :: local_alloc(:)
allocate(local_alloc(10))
-
- !$omp target map(tofrom: local_alloc)
+
+ !$omp target map(tofrom: local_alloc)
do index = 1, 10
local_alloc(index) = index
end do
!$omp end target
-
+
print *, local_alloc
-
+
deallocate(local_alloc)
-end subroutine func
-
-
-program main
- use test
- integer, allocatable :: map_ptr(:)
-
+end subroutine func
+
+
+program main
+ use test
+ integer, allocatable :: map_ptr(:)
+
allocate(map_ptr(10))
-
- !$omp target map(tofrom: map_ptr)
+
+ !$omp target map(tofrom: map_ptr)
do index = 1, 10
map_ptr(index) = index
end do
!$omp end target
- call func
+ call func
print *, map_ptr
call func_arg(map_ptr)
deallocate(map_ptr)
-end program
+end program
! CHECK: 1 2 3 4 5 6 7 8 9 10
! CHECK: 1 2 3 4 5 6 7 8 9 10
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-1.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
index cb03708554fed..f4e11f8b9e326 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
+++ b/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
@@ -1,5 +1,5 @@
! Offloading test checking interaction of an
-! explicit derived type mapping when mapped
+! explicit derived type mapping when mapped
! to target and assinging one derived type
! to another
! REQUIRES: flang, amdgcn-amd-amdhsa
@@ -16,22 +16,22 @@ program main
integer(4) :: ix = 0
real(4) :: rx = 0.0
complex(4) :: zx = (0,0)
- end type scalar
-
+ end type scalar
+
type(scalar) :: in
type(scalar) :: out
in%ix = 10
in%rx = 2.0
in%zx = (2, 10)
-
+
!$omp target map(from:out) map(to:in)
- out = in
+ out = in
!$omp end target
-
+
print*, in%ix
print*, in%rx
write (*,*) in%zx
-
+
print*, out%ix
print*, out%rx
write (*,*) out%zx
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-2.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-2.f90
index 0095b0fdf86a6..f97880a2023d4 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-2.f90
+++ b/offload/test/offloading/fortran/target-map-derived-type-full-2.f90
@@ -1,5 +1,5 @@
! Offloading test checking interaction of an
-! explicit derived type mapping when mapped to
+! explicit derived type mapping when mapped to
! target and assigning to individual members
! REQUIRES: flang, amdgcn-amd-amdhsa
! UNSUPPORTED: nvptx64-nvidia-cuda
@@ -16,29 +16,29 @@ program main
real(4) :: rx = 0.0
complex(4) :: zx = (0,0)
integer(4) :: array(5)
- end type scalar
-
+ end type scalar
+
type(scalar) :: out
type(scalar) :: in
-
+
in%ix = 10
in%rx = 2.0
in%zx = (2, 10)
-
+
do i = 1, 5
in%array(i) = i
- end do
-
+ end do
+
!$omp target map(from:out) map(to:in)
out%ix = in%ix
out%rx = in%rx
out%zx = in%zx
-
+
do i = 1, 5
out%array(i) = in%array(i)
- end do
+ end do
!$omp end target
-
+
print*, in%ix
print*, in%rx
print*, in%array
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90
index f57e2c70d155e..0f1d58de961ca 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90
+++ b/offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90
@@ -1,5 +1,5 @@
! Offloading test checking interaction of an
-! implicit derived type mapping when mapped
+! implicit derived type mapping when mapped
! to target and assinging one derived type
! to another
! REQUIRES: flang, amdgcn-amd-amdhsa
@@ -16,18 +16,18 @@ program main
integer(4) :: ix = 0
real(4) :: rx = 0.0
complex(4) :: zx = (0,0)
- end type scalar
-
+ end type scalar
+
type(scalar) :: in
type(scalar) :: out
in%ix = 10
in%rx = 2.0
in%zx = (2, 10)
-
+
!$omp target map(from:out)
- out = in
+ out = in
!$omp end target
-
+
print*, in%ix
print*, in%rx
write (*,*) in%zx
@@ -43,4 +43,3 @@ end program main
!CHECK: 10
!CHECK: 2.
!CHECK: (2.,10.)
-
\ No newline at end of file
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90
index 92d3454d462a7..a20b644652f82 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90
+++ b/offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90
@@ -1,5 +1,5 @@
! Offloading test checking interaction of an
-! explicit derived type mapping when mapped
+! explicit derived type mapping when mapped
! to target and assinging one derived type
! to another
! REQUIRES: flang, amdgcn-amd-amdhsa
@@ -17,29 +17,29 @@ program main
real(4) :: rx = 0.0
complex(4) :: zx = (0,0)
integer(4) :: array(5)
- end type scalar
-
+ end type scalar
+
type(scalar) :: out
type(scalar) :: in
-
+
in%ix = 10
in%rx = 2.0
in%zx = (2, 10)
-
+
do i = 1, 5
in%array(i) = i
- end do
-
+ end do
+
!$omp target
out%ix = in%ix
out%rx = in%rx
out%zx = in%zx
-
+
do i = 1, 5
out%array(i) = in%array(i)
- end do
+ end do
!$omp end target
-
+
print*, in%ix
print*, in%rx
print*, in%array
diff --git a/offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90 b/offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90
index 31774be191463..17e1cd9549f07 100644
--- a/offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90
+++ b/offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90
@@ -21,14 +21,14 @@ program main
integer(4) :: i3
integer(4) :: j3
integer(4) :: k3
- end type bottom_layer2
+ end type bottom_layer2
type :: middle_layer
real(4) :: array_i2(10)
real(4) :: i2
real(4) :: array_j2(10)
- type(bottom_layer1) :: nest
- type(bottom_layer2) :: nest2
+ type(bottom_layer1) :: nest
+ type(bottom_layer2) :: nest2
end type middle_layer
type :: top_layer
@@ -39,18 +39,18 @@ program main
integer(4) :: k
type(middle_layer) :: nested
end type top_layer
-
+
type(top_layer) :: top_dtype
type(top_layer) :: top_dtype2
top_dtype2%nested%nest%i4 = 10
top_dtype2%nested%nest%j4 = 12
top_dtype2%nested%nest%k4 = 54
-
+
top_dtype2%nested%nest2%i3 = 20
top_dtype2%nested%nest2%j3 = 40
top_dtype2%nested%nest2%k3 = 60
-
+
top_dtype2%nested%i2 = 200
do i = 1, 10
@@ -64,20 +64,20 @@ program main
!$omp map(to: top_dtype2%array_i, top_dtype2%nested%nest2%i3, top_dtype2%nested%i2) &
!$omp map(to: top_dtype2%nested%nest2%k3, top_dtype2%nested%nest2%j3)
top_dtype%nested%nest%i4 = top_dtype2%nested%nest%i4
- top_dtype%nested%nest%j4 = top_dtype2%nested%nest%j4
+ top_dtype%nested%nest%j4 = top_dtype2%nested%nest%j4
top_dtype%nested%nest%k4 = top_dtype2%nested%nest%k4
-
+
top_dtype%nested%nest2%i3 = top_dtype2%nested%nest2%i3
top_dtype%nested%nest2%j3 = top_dtype2%nested%nest2%j3
top_dtype%nested%nest2%k3 = top_dtype2%nested%nest2%k3
-
+
top_dtype%nested%i2 = top_dtype2%nested%i2
do i = 1, 10
top_dtype%array_i(i) = top_dtype2%array_i(i)
end do
!$omp end target
-
+
print *, top_dtype%nested%nest%i4
print *, top_dtype%nested%nest%j4
print *, top_dtype%nested%nest%k4
@@ -85,10 +85,10 @@ program main
print *, top_dtype%nested%nest2%i3
print *, top_dtype%nested%nest2%j3
print *, top_dtype%nested%nest2%k3
-
+
print *, top_dtype%nested%i2
- print *, top_dtype%array_i
+ print *, top_dtype%array_i
end program main
!CHECK: 10.
diff --git a/offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90 b/offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90
index cecfb9e84a59d..d327ebf8c1a92 100644
--- a/offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90
+++ b/offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90
@@ -1,6 +1,6 @@
! Offloading test checking interaction of two
-! explicit arrau member maps with bounds from
-! two nested derived types
+! explicit arrau member maps with bounds from
+! two nested derived types
! REQUIRES: flang, amdgcn-amd-amdhsa
! UNSUPPORTED: nvptx64-nvidia-cuda
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
@@ -25,20 +25,20 @@ program main
integer, allocatable :: array_j(:)
integer(4) :: k
end type top_layer
-
+
type(top_layer) :: top_dtype
type(top_layer) :: top_dtype2
!$omp target map(tofrom: top_dtype%nested%array_i2(4:8), top_dtype2%nested%array_j2(4:8))
- do i = 4, 8
+ do i = 4, 8
top_dtype%nested%array_i2(i) = i * 2
- end do
+ end do
- do i = 4, 8
+ do i = 4, 8
top_dtype2%nested%array_j2(i) = i * 2
- end do
+ end do
!$omp end target
-
+
print *, top_dtype%nested%array_i2
print *, top_dtype2%nested%array_j2
end program main
diff --git a/offload/test/offloading/fortran/target-map-double-nested-dtype-double-array-bounds.f90 b/offload/test/offloading/fortran/target-map-double-nested-dtype...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/92578
More information about the llvm-commits
mailing list