[all-commits] [llvm/llvm-project] 68f5ca: [HIP] Add option -fgpu-allow-device-init

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Tue Oct 22 13:06:54 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 68f5ca4e19c16f12895a6f0b9fbabc1d86c4b6b0
      https://github.com/llvm/llvm-project/commit/68f5ca4e19c16f12895a6f0b9fbabc1d86c4b6b0
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2019-10-22 (Tue, 22 Oct 2019)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticCommonKinds.td
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/CGDeclCXX.cpp
    M clang/lib/Driver/ToolChains/HIP.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaCUDA.cpp
    A clang/test/CodeGenCUDA/device-init-fun.cu
    A clang/test/Frontend/warn-device-init-fun.cu

  Log Message:
  -----------
  [HIP] Add option -fgpu-allow-device-init

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.

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




More information about the All-commits mailing list