summaryrefslogtreecommitdiffstats
path: root/lib/Basic/Targets/NVPTX.cpp
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-18 21:00:46 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2017-11-18 21:00:46 +0000
commit77805a3a0fab1339f0c924e46698460875d7b9d1 (patch)
treebf00cb6eec546781e6fd7074dc73d81409ae9422 /lib/Basic/Targets/NVPTX.cpp
parentc7a86303f9361ec52571dc0f4db9147ef841cef9 (diff)
[OpenMP] Show error if VLAs are not supported
Some target devices (e.g. Nvidia GPUs) don't support dynamic stack allocation and hence no VLAs. Print errors with description instead of failing in the backend or generating code that doesn't work. This patch handles explicit uses of VLAs (local variable in target or declare target region) or implicitly generated (private) VLAs for reductions on VLAs or on array sections with non-constant size. Differential Revision: https://reviews.llvm.org/D39505 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets/NVPTX.cpp')
-rw-r--r--lib/Basic/Targets/NVPTX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Basic/Targets/NVPTX.cpp b/lib/Basic/Targets/NVPTX.cpp
index 3889f09735..add3b318ae 100644
--- a/lib/Basic/Targets/NVPTX.cpp
+++ b/lib/Basic/Targets/NVPTX.cpp
@@ -41,6 +41,7 @@ NVPTXTargetInfo::NVPTXTargetInfo(const llvm::Triple &Triple,
"NVPTX only supports 32- and 64-bit modes.");
TLSSupported = false;
+ VLASupported = false;
AddrSpaceMap = &NVPTXAddrSpaceMap;
UseAddrSpaceMapMangling = true;