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

2019-10-22 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG68f5ca4e19c1: [HIP] Add option -fgpu-allow-device-init (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D69

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

2019-10-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:308 +// HIP +def warn_ignore_hip_only_option : Warning< + "'%0' is ignored since it is only supported for HIP">, tra wrote: > `warn_ig

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

2019-10-22 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. Thank you for adding the warning. One small nit about the name. LGTM otherwise. Comment at: include/clang/Basic/DiagnosticCommonKinds.td:308 +// HIP +def warn_ignore_hip_only_option : Warning< + "'%0' is ignored since it is only

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

2019-10-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 226044. yaxunl added a comment. Add warning CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69268/new/ https://reviews.llvm.org/D69268 Files: include/clang/Basic/DiagnosticCommonKinds.td include/clang/Basic/DiagnosticGroups.td include/clang/Basi

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

2019-10-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2530 Opts.GPURelocatableDeviceCode = Args.hasArg(OPT_fgpu_rdc); + Opts.GPUAllowDeviceInit = Args.hasArg(OPT_fgpu_allow_device_init); Opts.HIPUseNewLaunchA

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

2019-10-21 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Nice. I wish we could do that for CUDA. Comment at: lib/Frontend/CompilerInvocation.cpp:2530 Opts.GPURelocatableDeviceCode = Args.hasArg(OPT_fgpu_rdc); + Opts.GPUAllowDeviceIni

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

2019-10-21 Thread Yaxun Liu via Phabricator via cfe-commits
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 t