[PATCH] D99762: [OPENMP]Fix PR49777: Clang should not try to specialize orphaned directives in device codegen.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 1 12:47:24 PDT 2021


ABataev created this revision.
ABataev added a reviewer: jdoerfert.
Herald added subscribers: guansong, yaxunl.
ABataev requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: clang.

Compiler supports generic code emission, but in some cases may
erroneously consider the function context as SPMD context or Non-SPMD
parallel context. Need to clear/restore context upon entrance/exit
to/from function to avoid incorrect codegen.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99762

Files:
  clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
  clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
  clang/test/OpenMP/declare_target_codegen_globalization.cpp
  clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
  clang/test/OpenMP/remarks_parallel_in_target_state_machine.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99762.334800.patch
Type: text/x-patch
Size: 6169 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210401/0717c388/attachment-0001.bin>


More information about the cfe-commits mailing list