[PATCH] D93525: [clang-offload-bundler] Add unbundling of archives containing bundled object files into device specific archives

2021-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! Pls make sure it passes internal CI (ePSDB) before committing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93525/new/ https://reviews.llvm.org/D93525 __

[PATCH] D102507: [HIP] Support in device code

2021-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D102507#2833594 , @ldionne wrote: > In D102507#2830688 , @yaxunl wrote: > >> In D102507#2792087 , @rsmith wrote: >> >>> @ldionne How should we g

[PATCH] D105981: [AMDGPU][OpenMP] Support linking of math libraries

2021-07-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105981/new/ https://reviews.llvm.org/D105981 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-07-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.def:201 +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_f32, "ff*1fi", "t", "gfx90a-insts") +TARGET_BUILTIN(__builtin_amdgcn_global_atomic_fadd_2f16, "hh*1hi", "t", "gfx90a-insts") +TARGET_BU

[PATCH] D106960: [OffloadArch] Library to query properties of current offload archicture

2021-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This only works on Linux. So either to make it work on both Linux and Windows, or restrict it to Linux in CMakeLists.txt, otherwise it breaks LLVM build on Windows. Comment at: llvm/lib/OffloadArch/OffloadArch.cpp:17 +#include "llvm/Support/WithColor.h

[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.

2021-08-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4441 if (Linkage != llvm::GlobalValue::InternalLinkage && - (D->hasAttr() || D->hasAttr())) + (D->hasAttr() || D->hasAttr() || + D->getType()->isCUDADeviceBuiltinSurfa

[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.

2021-08-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM on HIP side. I am not sure whether CUDA needs this. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4441 if (Linkage != llvm::GlobalValue::InternalLinkage && - (D->hasAttr() || D->hasAttr())) + (D->hasAttr() || D->hasAttr()

[PATCH] D107668: [OpenMP]Fix PR50336: Remove temporary files in the offload bundler tool

2021-08-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This may break -save-temps since the input to clang-offload-bundler may not be temporary files when -save-temps is enabled. I think clang-offload-bundler is not the right place to decide whether a file is a temporary file. Whether a file is a temporary file should be det

[PATCH] D108247: [CUDA] Improve CUDA version detection and diagnostics.

2021-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. The change about amdgpu LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108247/new/ https://reviews.llvm.org/D108247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D106870: [OpenMP] Multi architecture compilation support

2021-08-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you document the device binary embedding scheme for multiple GPU's in clang documentation? This will help tool developers to develop tools to extract device binaries from executables or shared libraries. Also this may help interoperability with other offloading langu

[PATCH] D104904: [OpenMP][AMDGCN] Initial math headers support

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM for HIP header changes. Pls make sure it passes internal CI (ePSDB). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104904/new/ https://reviews.llvm.org/D104904 ___ cfe-commit

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D104505#2840239 , @ro wrote: > This patch broke the Solaris/sparcv9 > and Solaris/amd64 > buildbots: > > > /

[PATCH] D102507: [HIP] Support in device code

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D102507#2838981 , @tra wrote: > The key difference between C++ and CUDA/HIP, as implemented in clang, is that > `__host__` and `__device__` attributes are considered during function > overloading in CUDA and HIP, so `__host__

[PATCH] D104800: [OpenCL] Do not include default header for preprocessor output as input

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3193133add7e: [OpenCL] Do not include default header for preprocessor output as input (authored by yaxunl). Herald added a subscriber: ldrumm. Herald

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. fixed by 4921ecfc8194c11ec7c659ad1de11da6e8307361 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104505/new/ https://reviews.llvm.org/D104505 ___

[PATCH] D104946: [AMDGPU] Add builtin functions image_bvh_intersect_ray

2021-06-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: arsenm, b-sumner, rampitec. Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, nhaehnle, jvesely, kzhuravl. yaxunl requested review of this revision. Herald added a subscriber: wdng. https://reviews.llvm.org/D104946 Files: clang/incl

[PATCH] D104946: [AMDGPU] Add builtin functions image_bvh_intersect_ray

2021-06-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.def:221-224 +TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray, "V4UiUifV4fV4fV4fV4Ui", "nc", "gfx10-insts") +TARGET_BUILTIN(__builtin_amdgcn_image_b

[PATCH] D104946: [AMDGPU] Add builtin functions image_bvh_intersect_ray

2021-06-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.def:221-224 +TARGET_BUILTIN(__builtin_amdgcn_image_bvh_intersect_ray, "V4UiUifV4fV4fV4fV4Ui", "nc", "gfx10-insts") +TARGET_BUILTIN(__builtin_amdgcn_image_b

[PATCH] D104946: [AMDGPU] Add builtin functions image_bvh_intersect_ray

2021-06-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 355309. yaxunl added a comment. Add check for ISA. Add comments about argument types. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104946/new/ https://reviews.llvm.org/D104946 Files: clang/include/clang/Basic/BuiltinsAMDGPU.def clang/lib/CodeGe

[PATCH] D93525: [clang-offload-bundler] Add unbundling of archives containing bundled object files into device specific archives

2021-06-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D93525#2849815 , @saiislam wrote: > @yaxunl > this patch on its own is failing in our internal CI. I have an internal patch > (542569) to integrate it cleanly there. Fine. Thanks. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D104946: [AMDGPU] Add builtin functions image_bvh_intersect_ray

2021-06-30 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG434bd5bf5479: [AMDGPU] Add builtin functions image_bvh_intersect_ray (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D105295: [CUDA] Only allow NVIDIA offload-arch during CUDA compilation.

2021-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105295/new/ https://reviews.llvm.org/D105295 __

[PATCH] D105285: [Clang] Add test dependency on llvm-ar

2021-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105285/new/ https://reviews.llvm.org/D105285 __

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-07-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. Pls change the negative tests to positive tests as Artem suggested. Comment at: clang/test/CodeGenCUDA/host-used-device-var.cu:20 -// DEV-NEG-NOT: @v1 -__device__ int v1; tra wrote: > hliao wrote: > > BTW, as clang codegen tests,

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-07-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105135/new/ https://reviews.llvm.org/D105135 __

[PATCH] D105035: [clang] Document llvm options controlling pragma unroll

2021-07-12 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8fe058dbe49b: [clang] Document llvm options controlling pragma unroll (authored by yaxunl). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CH

[PATCH] D105981: [AMDGPU][OpenMP] Support linking of math libraries

2021-07-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:879-889 + // TODO: There are way too many flags that change this. Do we need to check + // them all? + bool DAZ = DriverArgs.hasArg(options::OPT_cl_denorms_are_zero) || + getDefaultDen

[PATCH] D105981: [AMDGPU][OpenMP] Support linking of math libraries

2021-07-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:879-889 + // TODO: There are way too many flags that change this. Do we need to check + // them all? + bool DAZ = DriverArgs.hasArg(options::OPT_cl_denorms_are_zero) || + getDefaultDen

[PATCH] D112791: [IR] Merge createReplacementInstr into ConstantExpr::getAsInstruction

2021-10-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: llvm/include/llvm/IR/Constants.h:1317 /// would make it harder to remove ConstantExprs altogether. - Instruction *getAsInstruction() const; + Instruction *getAsInstruction(Instruction *InsertBefore = nullptr) const; ---

[PATCH] D112791: [IR] Merge createReplacementInstr into ConstantExpr::getAsInstruction

2021-10-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112791/new/ https://reviews.llvm.org/D112791 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping. I have made changes so that the diagnostics about sanitizer args are only emitted once. Any further changes or concerns? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111443/new/ https://reviews.llvm.org/D111443 ___

[PATCH] D112492: [HIP] Do not use kernel handle for MSVC target

2021-11-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112492/new/ https://reviews.llvm.org/D112492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-11-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This caused regression in Thrust: /long_pathname_so_that_rpms_can_package_the_debug_info/data/driver/rocThrust/thrust/../thrust/detail/type_traits/pointer_traits.h:178:20: error: ambiguous partial specializations of 'pointer_element>' typedef typename pointer_elem

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-11-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D109496#3103963 , @mizvekov wrote: > Thanks for reporting this! > > This change in the standard was worked a long time ago, and there was some > expectation that there would be follow up work to add new partial ordering > rule

[PATCH] D109496: [clang] deprecate frelaxed-template-template-args, make it on by default

2021-11-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D109496#3103978 , @mizvekov wrote: > Feel free to revert it if this is blocking you. I don't seem to find a way to > do it via web interface, so I need more time to have access to a machine that > can do it I will revert it s

[PATCH] D112492: [HIP] Do not use kernel handle for MSVC target

2021-11-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D112492#3101090 , @tra wrote: > As phrased, the summary would likely be rather confusing for anyone other > than you and me. > >> Currently Visual Studio 2019 has a linker issue which causes linking error >> when a template ker

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @tra Any further concerns? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111443/new/ https://reviews.llvm.org/D111443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[PATCH] D112492: [CUDA][HIP] Allow comdat for kernels

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 385812. yaxunl retitled this revision from "[HIP] Do not use kernel handle for MSVC target" to "[CUDA][HIP] Allow comdat for kernels". yaxunl edited the summary of this revision. yaxunl added a comment. fix comdat instead CHANGES SINCE LAST ACTION https://

[PATCH] D113490: [NFC] Let Microsoft mangler accept GlobalDecl

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, tra. yaxunl requested review of this revision. This is a follow up of https://reviews.llvm.org/D75700 where support of GlobalDecl with Microsoft mangler is incomplete. https://reviews.llvm.org/D113490 Files: clang/lib/AST/Microso

[PATCH] D113491: [HIP] Fix device stub name for Windows

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl requested review of this revision. This is a follow up of https://reviews.llvm.org/D68578 where device stub name is changed for Itanium mangling but not Microsoft mangling. https://reviews.llvm.org/D113491 Files: clan

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl abandoned this revision. yaxunl added a comment. this is no longer needed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55067/new/ https://reviews.llvm.org/D55067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D110257: [CFE][Codegen] Make sure to maintain the contiguity of all the static allocas

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. It seems all concerns have been addressed. Shall we move ahead and land this patch? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110257/new/ https://reviews.llvm.org/D110257 _

[PATCH] D113491: [HIP] Fix device stub name for Windows

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:975-976 + llvm::SmallString<128> Buf; + mangleSourceName((llvm::Twine("__device_stub__") + II->getName()) + .toStri

[PATCH] D112492: [CUDA][HIP] Allow comdat for kernels

2021-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I think probably it is necessary to merge linkonce_odr symbols for them to work properly. Consider the following testcase: // a.cu template __global__ void foo(T x) {} void test1() { foo<<<1,1>>>(1); } // b.cu template __global__ void foo(T x)

[PATCH] D112492: [CUDA][HIP] Allow comdat for kernels

2021-11-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4290-4293 - // Do not set COMDAT attribute for CUDA/HIP stub functions to prevent - // them being "merged" by the COMDAT Folding linker optimization. - if (D.hasAttr()) -return false; ---

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @eugenis Any further changes needed? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111443/new/ https://reviews.llvm.org/D111443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D112492: [CUDA][HIP] Allow comdat for kernels

2021-11-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I did an experiment regarding the ICF issue and it seems not to affect kernel stub. #include "hip/hip_runtime.h" template void bar(T x) { } template __global__ void foo(T x) {} int main() { foo<<<1,1>>>(1); printf("%p\n", foo); printf("%p\

[PATCH] D112492: [CUDA][HIP] Allow comdat for kernels

2021-11-10 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG80072fde61d4: [CUDA][HIP] Allow comdat for kernels (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D112820: Emit hidden hostcall argument for sanitized kernels.

2021-11-10 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4b3881e9f319: Emit hidden hostcall argument for sanitized kernels (authored by yaxunl). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 386518. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by Evgenii's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111443/new/ https://reviews.llvm.org/D111443 Files: clang/include/clang/Basic/DiagnosticDriverKind

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:124 + } + return SanitizerArgs(*this, JobArgs, /*DiagnoseErrors=*/false); } eugenis wrote: > SanitizerArgs SanArgs(*this, JobArgs, !SanitizerArgsC

[PATCH] D87858: [hip] Add HIP scope atomic ops.

2021-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Hi Michael, would you like to continue working on this, or let someone from AMD to take over? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87858/new/ https://reviews.llvm.org/D87858 ___

[PATCH] D111443: [Driver] Fix ToolChain::getSanitizerArgs

2021-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG0309e50f33f6: [Driver] Fix ToolChain::getSanitizerArgs (authored by yaxunl). Herald added a project: clang.

[PATCH] D86376: [HIP] Emit kernel symbol

2021-02-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86376/new/ https://reviews.llvm.org/D86376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D97340: [HIP] Support Spack packages

2021-03-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:32 +static llvm::SmallString<0> findSPACKPackage(const Driver &D, + const llvm::SmallString<0> &Path, +

[PATCH] D97340: [HIP] Support Spack packages

2021-03-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 327243. yaxunl marked 2 inline comments as done. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97340/new/ https://reviews.llvm.org/D97340 Files: clang/include/clang/Driver/Options.td clang/lib/

[PATCH] D86376: [HIP] Emit kernel symbol

2021-03-01 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5cf2a37f1255: [HIP] Emit kernel symbol (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D86376?vs=322894&id=327268#toc Repository: rG LLVM Github

[PATCH] D97752: Fix -gz=zlib options for linker for FreeBSD too

2021-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D97752#2596277 , @emaste wrote: > I can drop the Fixes trailer (I added it as we've adopted it in FreeBSD from > Linux). That said, the referenced patch changed Gnu, AMDGPU, and HIP. My main > goal here is to get the final libr

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2021-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @rjmccall @jyknight Ping. Any further concerns? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71726/new/ https://reviews.llvm.org/D71726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D97340: [HIP] Support Spack packages

2021-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 6 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:3535-3536 HelpText<"Print the registered targets">; +def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">, + HelpText<"Print the paths

[PATCH] D97340: [HIP] Support Spack packages

2021-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 327596. yaxunl marked 5 inline comments as done. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97340/new/ https://reviews.llvm.org/D97340 Files: clang/include/clang/Driver/Options.td clang/lib/

[PATCH] D97959: [HIP] do not use -mconstructor-aliases for device

2021-03-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: tpr. yaxunl requested review of this revision. Like nvptx and some other targets, -mconstructor-aliases does not work well with amdgpu, therefore we disable it in the same approach. https://reviews.llvm.org/D

[PATCH] D97967: [HIP] do not use -munsafe-fp-atomics by default

2021-03-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: jfb. yaxunl requested review of this revision. A bug was introduced when adding -munsafe-fp-atomics. By default it should be off. https://reviews.llvm.org/D97967 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D97959: [HIP] do not use -mconstructor-aliases for device

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG258ecf5f33e7: [HIP] do not use -mconstructor-aliases for device (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D97967: [HIP] do not use -munsafe-fp-atomics by default

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5b3fc7180c8e: [HIP] do not use -munsafe-fp-atomics by default (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D92363: [HIP] Warn no --offload-arch option

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @tra I got some issue with this patch. There are cases that an expression using a host variable is compile-time constant, e.g. int x; __device__ void fun() { sizeof(x); } Do we want to allow that? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D92363: [HIP] Warn no --offload-arch option

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D92363#2607072 , @yaxunl wrote: > @tra I got some issue with this patch. There are cases that an expression > using a host variable is compile-time constant, e.g. > > int x; > __device__ void fun() { > sizeof(x); > } >

[PATCH] D91281: [CUDA][HIP] Diagnose reference of host variable

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @tra I got some issue with this patch. There are cases that an expression using a host variable is compile-time constant, e.g. int x; __device__ void fun() { sizeof(x); } Do we want to allow that? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D98068: Remove asserts for LocalInstantiationScope

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rsmith, rjmccall, tra. yaxunl requested review of this revision. A lambda in a function template may be recursively instantiated as the following example: template struct Number { static constexpr unsigned value = v; }; tem

[PATCH] D97340: [HIP] Support Spack packages

2021-03-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:163 // For candidate specified by --rocm-path we do not do strict check. +const SmallVectorImpl & tra wrote: > I'm not quite sure which pa

[PATCH] D97340: [HIP] Support Spack packages

2021-03-06 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 4 inline comments as done. Closed by commit rG34d1a5c7b18f: [HIP] Support Spack packages (authored by yaxunl). Herald added a project: clang. Changed pri

[PATCH] D91281: [CUDA][HIP] Diagnose reference of host variable

2021-03-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D91281#2607082 , @yaxunl wrote: > @tra I got some issue with this patch. There are cases that an expression > using a host variable is compile-time constant, e.g. > > int x; > __device__ void fun() { > sizeof(x); > } >

[PATCH] D98143: [HIP] Diagnose aggregate args containing half types

2021-03-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: jansvoboda11, dexonsmith, dang. yaxunl requested review of this revision. gcc and clang currently do not have a consistent ABI for half precision types. Passing aggregate args containing half precision types betw

[PATCH] D98143: [HIP] Diagnose aggregate args containing half types

2021-03-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 328979. yaxunl added a comment. fix test and clang-tidy warnings CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98143/new/ https://reviews.llvm.org/D98143 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Basic/LangOptio

[PATCH] D98193: [CUDA][HIP] Allow non-ODR use of host var in device

2021-03-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. https://reviews.llvm.org/D98193 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCUDA/device-use-host-var.cu Index: clang/test/SemaCUDA/device-use-host-var.cu ==

[PATCH] D91281: [CUDA][HIP] Diagnose reference of host variable

2021-03-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D91281#2609766 , @yaxunl wrote: > In D91281#2607082 , @yaxunl wrote: > >> @tra I got some issue with this patch. There are cases that an expression >> using a host variable is compile-tim

[PATCH] D98193: [CUDA][HIP] Allow non-ODR use of host var in device

2021-03-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-use-host-var.cu:41 *out = global_const_var; + *out = global_const_struct_var.x; tra wrote: > I do not think it should be allowed. We end up instant

[PATCH] D98193: [CUDA][HIP] Allow non-ODR use of host var in device

2021-03-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 329632. yaxunl marked an inline comment as done. yaxunl added a comment. Follow C++ about ODR-use of variables. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98193/new/ https://reviews.llvm.org/D98193 Files: clang/lib/Sema/SemaExpr.cpp clang/tes

[PATCH] D98193: [CUDA][HIP] Allow non-ODR use of host var in device

2021-03-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 329686. yaxunl added a comment. minor bug fix CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98193/new/ https://reviews.llvm.org/D98193 Files: clang/lib/Sema/SemaExpr.cpp clang/test/CodeGenCUDA/device-use-host-var.cu clang/test/SemaCUDA/device-

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGAtomic.cpp:1347-1348 break; // Avoid crashing on code with undefined behavior +if (!OrderFail) + llvm::errs() << "FOO\n"; EmitAtomicOp(*this, E, Dest, Ptr, Val1, Val2, IsWeak, Order

[PATCH] D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP

2021-11-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/Cuda.h:109 + // Generic processor model is for testing only. + return A >= CudaArch::GFX600 && A <= CudaArch::GFX1035; } can we use A < CudaArch::Generic instead? to avoid updating this line e

[PATCH] D110549: [HIPSPV][1/4] Refactor HIP tool chain

2021-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110549/new/ https://reviews.llvm.org/D110549 __

[PATCH] D110618: [HIPSPV][2/4] Add HIPSPV tool chain

2021-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. I will leave to @tra about -nohipwrapperinc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110618/new/ https://reviews.llvm.org/D110618 ___ cfe-commits mailing list cfe-commi

[PATCH] D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP

2021-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. LGTM. I will defer to @tra Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110622/new/ https://reviews.llvm.org/D110622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113925/new/ https://reviews.llvm.org/D113925 __

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D113925#3141011 , @gandhi21299 wrote: > @yaxunl thanks for the review! My Github account is locked unfortunately so I > will have to ask you to push this commit to the main branch. Thank you! Sure. Repository: rG LLVM Git

[PATCH] D113490: [NFC] Let Microsoft mangler accept GlobalDecl

2021-11-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:47 + if (auto *CD = dyn_cast(DC)) +GD = GlobalDecl(CD, Ctor_Complete); + else if (auto *DD = dyn_cast(DC)) rnk wrote: > I would prefer if yo

[PATCH] D110549: [HIPSPV][1/4] Refactor HIP tool chain

2021-11-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/HIPUtility.cpp:119-133 + // Add MC directives to embed target binaries. We ensure that each + // section and image is 16-byte aligned. This is not mandatory, but + // increases the likelihood of data to be a

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe13246a2ec3d: [HIP] Add HIP scope atomic operations (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D113925?vs=387668&id=3

[PATCH] D113490: [NFC] Let Microsoft mangler accept GlobalDecl

2021-11-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGb472bd855ed8: [NFC] Let Microsoft mangler accept GlobalDecl (authored by yaxunl). Herald added a project: cl

[PATCH] D113491: [HIP] Fix device stub name for Windows

2021-11-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG38211bbab1d9: [HIP] Fix device stub name for Windows (authored by yaxunl). Herald added a project: clang. C

[PATCH] D114502: File Reorganization changes

2021-11-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. could you please include a complete diff context in the patch? You can do that by using git diff -U Comment at: mlir/lib/ExecutionEngine/CMakeLists.txt:153 + set(CMAKE_MODULE_PATH "${HIP_PATH}/lib/cmake/hip" ${CMAKE_MODULE_PATH}) find_package(HI

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. we also need a sema test like clang/test/SemaOpenCL/atomic-ops.cl Comment at: clang/test/CodeGenCUDA/atomic-ops.cu:30-32 + val = __hip_atomic_load(ptr, __HIP_MEMORY_SCOPE_SINGLETHREAD); + __hip_atomic_store(ptr, ptr2, 5); + flag = __hip_atomic_compare

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/atomic-ops.cu:14 +// CHECK: load atomic i32, i32* {{%[0-9]+}} syncscope("singlethread-one-as") monotonic, align 4 +// CHECK: store i32 {{%[0-9]+}}, i32* %{{.*}}, align 4 +// CHECK: cmpxchg weak i32* {{%[0-9]+}}, i3

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaCUDA/atomic-ops.cu:69-74 + flag = __hip_atomic_compare_exchange_weak(ptr, 0, 0, 0, 0, __HIP_MEMORY_SCOPE_SYSTEM); // expected-warning {{null passed to a callee that requires a non-null argument}} + flag = __hip_atomic_c

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 __

[PATCH] D114812: [HIP] Add pre-defined macro `__HIPCC_RDC__`

2021-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. nvcc defines `__CUDACC_RDC__` for both host and device compilation when -rdc=true is specified (https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-identification-macro) This p

[PATCH] D114812: [HIP] Add pre-defined macro `__HIPCC_RDC__`

2021-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I am not sure whether we want to define a similar macro for cuda-clang. Maybe `__CLANG_RDC__` is better? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114812/new/ https://reviews.llvm.org/D114812 ___ cfe-commits maili

[PATCH] D114849: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU

2021-12-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenOpenCL/amdgcn-non-temporal-store.cl:9 +} \ No newline at end of file pls add newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114849/new/ https://r

[PATCH] D114849: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU

2021-12-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114849/new/ https://reviews.llvm.org/D114849 ___ cfe-commits mailing list cfe-

<    12   13   14   15   16   17   18   19   20   21   >