[PATCH] D39505: [OpenMP] Show error if VLAs are not supported

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 1 13:16:22 PDT 2017


Hahnfeld created this revision.
Herald added a subscriber: jholewinski.

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.


https://reviews.llvm.org/D39505

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/TargetInfo.h
  include/clang/Sema/Sema.h
  lib/Basic/TargetInfo.cpp
  lib/Basic/Targets/NVPTX.cpp
  lib/Basic/Targets/SPIR.h
  lib/Sema/SemaOpenMP.cpp
  lib/Sema/SemaType.cpp
  test/OpenMP/target_vla_messages.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39505.121172.patch
Type: text/x-patch
Size: 13395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171101/016730f9/attachment-0001.bin>


More information about the cfe-commits mailing list