[PATCH] D69268: [HIP] Add option -fgpu-allow-device-init

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 10:36:51 PDT 2019


yaxunl created this revision.
yaxunl added a reviewer: tra.

Add this option to allow device side class type global variables
with non-trivial ctor/dtor. device side init/fini functions will
be emitted, which will be executed by HIP runtime when
the fat binary is loaded/unloaded.

This feature is to facilitate implementation of device side
sanitizer which requires global vars with non-trival ctors.

By default this option is disabled.


https://reviews.llvm.org/D69268

Files:
  include/clang/Basic/LangOptions.def
  include/clang/Driver/Options.td
  lib/CodeGen/CGDeclCXX.cpp
  lib/Driver/ToolChains/HIP.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Sema/SemaCUDA.cpp
  test/CodeGenCUDA/device-init-fun.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69268.225911.patch
Type: text/x-patch
Size: 4730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191021/71a3d88d/attachment-0001.bin>


More information about the cfe-commits mailing list