[libomptarget-nvptx] Align data sharing stack
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Sun, 30 Sep 2018 09:23:21 +0000 (09:23 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Sun, 30 Sep 2018 09:23:21 +0000 (09:23 +0000)
commit1bf767fb8e6066bd87560378c23185a412fb2538
treed859ed828601dd79a3abfa13ce65f7446ab24722
parent067235f227f541816af8aa777bdf1b214c22c77b
[libomptarget-nvptx] Align data sharing stack

NVPTX requires addresses of pointer locations to be 8-byte aligned
or there will be an exception during runtime.
This could happen without this patch as shown in the added test:
getId() requires 4 byte of stack and putValueInParallel() uses 16
bytes to store the addresses of the captured variables.

Differential Revision: https://reviews.llvm.org/D52655

llvm-svn: 343402
openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu
openmp/libomptarget/deviceRTLs/nvptx/test/data_sharing/alignment.c [new file with mode: 0644]