[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-09 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan added a comment. Thanks for feedback. Instead of adding `__nvvm_reflect` as a clang builtin, would it be acceptable if I modified the NVVMReflect pass so that it works with addrspace casting as well? This would allow us to use `__nvvm_reflect` in openCL Repository: rG LLVM Github Mono

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-04 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:827 +BUILTIN(__nvvm_reflect, "icC*", "nc") + tra wrote: > Do we actually need this patch at all. > > `extern "C" int __nvvm_reflect(const char *);` appears to work just fine

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-03 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan marked an inline comment as not done. hdelan added a comment. In DPC++ for CUDA we use libclc as a wrapper around CUDA SDK's libdevice. Like libdevice we want to precompile libclc to bc for the CUDA backend without specializing for a particular arch, so that we can call different __nv fun

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-01 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan updated this revision to Diff 472311. hdelan added a comment. Removing redundant check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137154/new/ https://reviews.llvm.org/D137154 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/t

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-01 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan updated this revision to Diff 472310. hdelan added a comment. Removing redundant check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137154/new/ https://reviews.llvm.org/D137154 Files: llvm/lib/Target/NVPTX/NVVMReflect.cpp Index: llvm/l

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-01 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsNVVM.td:1581 def int_nvvm_reflect : - Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">; + Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem], "llvm.nvvm.reflect">, + ClangBui

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-01 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan created this revision. Herald added subscribers: mattd, gchakrabarti, asavonic, hiraditya. Herald added a project: All. hdelan requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jholewinski. Herald added projects: clang, LLVM. This patch adds __nvvm_refl

[PATCH] D116583: Change the default optimisation level of PTXAS from -O0 to -O3. This makes the optimisation levels of PTXAS and the ptxjitcompiler equal (ptxjitcompiler defaults to -O3).

2022-01-31 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan abandoned this revision. hdelan added a comment. Closing revision Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116583/new/ https://reviews.llvm.org/D116583 ___ cfe-commits mailing list cfe-commit

[PATCH] D116583: Change the default optimisation level of PTXAS from -O0 to -O3. This makes the optimisation levels of PTXAS and the ptxjitcompiler equal (ptxjitcompiler defaults to -O3).

2022-01-31 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:433 } else { -// If no -O was passed, pass -O0 to ptxas -- no opt flag should correspond -// to no optimizations, but ptxas's default is -O3. -CmdArgs.push_back("-O0"); +// If no -O

[PATCH] D116583: Change the default optimisation level of PTXAS from -O0 to -O3. This makes the optimisation levels of PTXAS and the ptxjitcompiler equal (ptxjitcompiler defaults to -O3).

2022-01-05 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:433 } else { -// If no -O was passed, pass -O0 to ptxas -- no opt flag should correspond -// to no optimizations, but ptxas's default is -O3. -CmdArgs.push_back("-O0"); +// If no -O

[PATCH] D116583: Change the default optimisation level of PTXAS from -O0 to -O3. This makes the optimisation levels of PTXAS and the ptxjitcompiler equal (ptxjitcompiler defaults to -O3).

2022-01-04 Thread Hugh Delaney via Phabricator via cfe-commits
hdelan created this revision. Herald added a subscriber: asavonic. hdelan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D116583 Files: clang/lib/Driver/ToolChains/Cuda.cpp