[PATCH] D91546: [AMDGPU] Add option -munsafe-fp-atomics

2020-11-16 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 rG3f4b5893efed: [AMDGPU] Add option -munsafe-fp-atomics (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

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

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 294790. yaxunl added a comment. revised by Matt's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88370/new/ https://reviews.llvm.org/D88370 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Targets/AMDGPU.h clang/test/Driver/a

[PATCH] D88425: Skip -fPIE for AMDGPU and HIP toolchain

2020-09-28 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 rG10eb3bf2d430: Skip -fPIE for AMDGPU and HIP toolchain (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D884

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-09-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Currently CUDA/HIP toolchain uses "unknown" as bound arch for offload action for fat binary. This causes -mcpu or -march with "unknown" added in HIPToolChain::TranslateArgs or CUDAToolChain::Trans

[PATCH] D88377: Diagnose invalid target ID for AMDGPU toolchain for assembler

2020-09-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295163. yaxunl marked an inline comment as done. yaxunl added a comment. fix bug CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88377/new/ https://reviews.llvm.org/D88377 Files: clang/lib/Driver/ToolChains/AMDGPU.cpp clang/lib/Driver/ToolChains/A

[PATCH] D88550: [HIP] Fix -fgpu-allow-device-init option

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. The option needs to be passed to both host and device compilation. https://reviews.llvm.org/D88550 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/HIP.cpp clang/t

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88370/new/ https://reviews.llvm.org/D88370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D88557: [HIP] Add option --gpu-instrument-lib=

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: dang. yaxunl requested review of this revision. Add an option `--gpu-instrument-lib=` to allow users to specify an instrument device library. This is for supporting -finstrument in device code for debugging/prof

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295297. yaxunl edited the summary of this revision. yaxunl added a comment. Add test and fix multiple -m[no-]wavefrontsize64 issue. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88370/new/ https://reviews.llvm.org/D88370 Files: clang/lib/Basic/Tar

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:394-395 + // Get the last argument of -mwavefrontsize64 or -mno-wavefrontsize64. + for (auto WaveArg : Args.filtered_reverse(options::OPT_mwavefrontsize64, +

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:394-395 + // Get the last argument of -mwavefrontsize64 or -mno-wavefrontsize64. + for (auto WaveArg : Args.filtered_reverse(options::OPT_mwavefrontsize64, +

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295312. yaxunl added a comment. simpler code for handling multiple wave64 options CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88370/new/ https://reviews.llvm.org/D88370 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Targets/AMDGPU.h

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295326. yaxunl added a comment. simplifies wavefrontsize64 target feature CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88370/new/ https://reviews.llvm.org/D88370 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Targets/AMDGPU.h clang

[PATCH] D88557: [HIP] Add option --gpu-instrument-lib=

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D88557#2303891 , @tra wrote: > Perhaps we should start thinking of shipping some of that bitcode along with > clang. > Then the instrumentation library could be linked with automatically by the > driver when `-finstrument` is

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D88524#2304173 , @tra wrote: >> Currently CUDA/HIP toolchain uses "unknown" as bound arch >> for offload action for fat binary. This causes -mcpu or -march >> with "unknown" added in HIPToolChain::TranslateArgs or >> CUDAToolChai

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295572. yaxunl added a comment. Herald added a subscriber: jholewinski. add CudaArch::UNUSED as suggested by Artem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88524/new/ https://reviews.llvm.org/D88524 Files: clang/include/clang/Basic/Cuda.h

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-var-init.cu:404 __host__ __device__ void hd_sema() { static int x = 42; } how does this work in device compilation? Is this equivalent to `static __device__ int x = 42`? Repository: rG

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Basic/Cuda.cpp:95 const char *CudaArchToString(CudaArch A) { + if (A == CudaArch::UNUSED) +return ""; tra wrote: > You could add a `{CudaArch::UNUSED, "", ""}` to t

[PATCH] D88730: [HIP] Fix default output file for -E

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. By convention the default output file for -E is "-" (stdout). This is expected by tools like ccache, which uses output of -E to determine if a file and its dependence has changed. Currently clang

[PATCH] D88734: [HIP] Align device binary

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. To facilitate faster loading of device binaries and share them among processes, HIP runtime favors their alignment be

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-var-init.cu:404 __host__ __device__ void hd_sema() { static int x = 42; } tra wrote: > yaxunl wrote: > > how does this work in device compilation? Is this equivalent to `static > > __devic

[PATCH] D88370: Emit predefined macro for wavefront size for amdgcn

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG36501b180a4f: Emit predefined macro for wavefront size for amdgcn (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D88730: [HIP] Fix default output file for -E

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Driver/hip-output-file-name.hip:13-15 +// RUN: %clang -### -E -target x86_64-linux-gnu \ +// RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s tra wrote

[PATCH] D88734: [HIP] Align device binary

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:374 +auto BI = BundlesInfo[CurWriteBundleTarget]; +OS.seek(BI.Offset); OS.write(Input.getBufferStart(), Input.getBufferSize())

[PATCH] D88734: [HIP] Align device binary

2020-10-02 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 rGdc6a0b0ec7e3: [HIP] Align device binary (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-02 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 rGcbd420c5ed85: [CUDA][HIP] Fix bound arch for offload action for fat binary (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://

[PATCH] D88377: Diagnose invalid target ID for AMDGPU toolchain for assembler

2020-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2cd75f738ec6: Diagnose invalid target ID for AMDGPU toolchain for assembler (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D88557: [HIP] Add option --gpu-instrument-lib=

2020-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64f7790e7d23: [HIP] Add option --gpu-instrument-lib= (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D88557?vs=295244&id=296087#toc Repository:

[PATCH] D88730: [HIP] Fix default output file for -E

2020-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5b551b79d3bb: [HIP] Fix default output file for -E (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D88730?vs=295799&id=296088#toc Repository: rG

[PATCH] D88550: [HIP] Fix -fgpu-allow-device-init option

2020-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe372c1d7624e: [HIP] Fix -fgpu-allow-device-init option (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D885

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:135 + Bundler, BundlerArgs, Inputs, + InputInfo(&JA, Output.c_str(; } I would suggest to use `Args.M

[PATCH] D88786: [CUDA] Don't call __cudaRegisterVariable on C++17 inline variables

2020-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This patch may break some existing HIP applications. For rdc mode, device vars are merged. Host shadow vars should also be in comdat and merged. HIP runtime just ignores the same shadow var registered with the same device var, everything should work. For nordc mode, dev

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Driver/Job.h:165 + const llvm::opt::ArgStringList &Arguments, ArrayRef Inputs, + ArrayRef Outputs); // FIXME: This really shouldn't be copyable, but is currently copied in some Is

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can we have a lit test? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88949/new/ https://reviews.llvm.org/D88949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-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/D78902/new/ https://reviews.llvm.org/D78902

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-08 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/D88949/new/ https://reviews.llvm.org/D88949

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a subscriber: hans. yaxunl added a comment. I can help you commit it to trunk. For cherrypick to release branch, we may need help of @hans Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88949/new/ https://reviews.llvm.org/D88949 _

[PATCH] D88949: DeferredDiagnosticsEmitter crashes

2020-10-08 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9225543e844: DeferredDiagnosticsEmitter crashes (authored by glevner, committed by yaxunl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88949/new/ https:

[PATCH] D76620: [SYCL] Implement __builtin_unique_stable_name.

2020-10-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. CUDA/HIP are facing similar issues, i.e. consistency of name mangling of kernels between host/device compilation of the same TU. I hope this feature to be implemented in a generic way so that it may be reusable for other offloading languages. Repository: rG LLVM Gith

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 298125. yaxunl added a comment. revised by John's comments. Extracted common part of DiagnosticEngine and PartialDiagnostics as DiagnosticStorage. Make member functions of the base class of DiagnosticBuilder and ParticalDiagnostics non-virtual. CHANGES SI

[PATCH] D89372: [OpenCL] Remove unused extensions

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. what if users rely on the predefined macros associated with the extension e.g. cl_khr_srgb_image_writes to enable/disable certain code? What's the issue with these extensions not removed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D89372: [OpenCL] Remove unused extensions

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. With this change, clang basically will have no knowledge about the removed extensions, i.e., it will not know which extension is supported in which version of OpenCL and have no way to enable/disable those extensions. There will be no way to define corresponding macros i

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-14 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/PartialDiagnostic.h:51 + : DiagID(DiagID) { +Allocator = &Allocator_; + } tra wrote: > Is there a particular reason to move field initialization

[PATCH] D89372: [OpenCL] Remove unused extensions

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D89372#2330362 , @Anastasia wrote: > In D89372#2330217 , @yaxunl wrote: > >> With this change, clang basically will have no knowledge about the removed >> extensions, i.e., it will not kn

[PATCH] D89372: [OpenCL] Remove unused extensions

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D89372#2330868 , @Anastasia wrote: >> Does the spec requires cl_* macro to be defined if an extension is enabled? > > The extension spec currently has: > > Every extension which affects the OpenCL language semantics, syntax or

[PATCH] D89372: [OpenCL] Remove unused extensions

2020-10-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/OpenCLExtensions.def:16 // // If the extensions are to be enumerated without the supported OpenCL version, // define OPENCLEXT(ext) where ext is the name of the extension. Can you add a commen

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 298368. yaxunl marked an inline comment as done. yaxunl added a comment. Rename StreamableDiagnosticBase to StreamingDiagnostic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84362/new/ https://reviews.llvm.org/D84362 Files: clang/include/clang/AS

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 4 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/Diagnostic.h:1065 +/// +class StreamableDiagnosticBase { +public: rjmccall wrote: > I think I would prefer `StreamingDiagnostic` as the class name here. r

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

2020-11-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 307206. yaxunl edited the summary of this revision. yaxunl added a comment. revised by John's comments. Added target hook and diagnostics for generic atomic operations. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71726/new/ https://reviews.llvm.or

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

2020-11-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D71726#2351069 , @rjmccall wrote: >> Yes, there are no generically available libcalls for atomic float math -- >> but that's okay -- let LLVM handle transform into a cmpxchg loop when >> required. > > I suspect Yaxun's target c

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-11-24 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb08558caa3b: [HIP] Fix regressions due to fp contract change (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable

2020-11-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added a comment. ping Comment at: clang/lib/Sema/SemaExpr.cpp:357 + if (LangOpts.CUDAIsDevice) { +auto *FD = dyn_cast_or_null(CurContext); tra wrote: > This could use a comment about why we only check `D->H

[PATCH] D91310: [AMDGPU] Add -mcode-object-version=n

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

[PATCH] D80450: [CUDA][HIP] Fix implicit HD function resolution

2020-11-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D80450#2088129 , @tra wrote: > In D80450#2087938 , @tra wrote: > >> Reproducer for the regression. >> https://gist.github.com/Artem-B/183e9cfc28c6b04c1c862c853b5d9575 >> It's not particul

[PATCH] D80450: [CUDA][HIP] Fix implicit HD function resolution

2020-11-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl reopened this revision. yaxunl added a comment. This revision is now accepted and ready to land. reopen for fixing the regression Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80450/new/ https://reviews.llvm.org/D80450 _

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 308032. yaxunl retitled this revision from "[CUDA][HIP] Fix implicit HD function resolution" to "[CUDA][HIP] Fix HD function resolution". yaxunl edited the summary of this revision. yaxunl added a comment. If -fgpu-defer-diags is off, keep original behavior.

[PATCH] D92339: Add help text for -nogpuinc

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a subscriber: dang. yaxunl requested review of this revision. https://reviews.llvm.org/D92339 Files: clang/include/clang/Driver/Options.td Index: clang/include/clang/Driver/Options.td

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D80450#2423706 , @tra wrote: > SGTM. I'll check how the patch fares on our CUDA code. Please hold on. I just found a regression due to old behavior not fully recovered in certain case. I will update the patch for fixing the reg

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/SemaCUDA/function-overload.cu:616 +// HDs have type mismatch whereas H has type match. +// In device compilation, H wins when -fgpu-defer-diag is off and two HD win +// when -fgpu-defer-

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 308515. yaxunl edited the summary of this revision. yaxunl added a comment. Herald added subscribers: dexonsmith, dang. Add -ffix-overload-resolution and fix a regression. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80450/new/ https://reviews.llvm.

[PATCH] D92339: Add help text for -nogpuinc

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG011bf4f55630: Add help text for -nogpuinc (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92339/new/ http

[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 308519. yaxunl marked an inline comment as done. yaxunl added a comment. extract lambda as a function CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91088/new/ https://reviews.llvm.org/D91088 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/Sema/Sem

[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable

2020-11-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1944 + // host variable in a device or host device lambda. + auto IsCapturingReferenceToHostVarInCUDADeviceLambda = [&](VarDecl *VD) { +if (!getLangOpts().CUDA ||

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

2020-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. This patch let clang emit a warning when no --offload-arch option is specified, which usually indicates that users forget to specify this option. https://reviews.llvm.org/D92363 Files: clang

[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable

2020-12-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1957 +// host variable in a device or host device lambda. +static bool isCapturingReferenceToHostVarInCUDADeviceLambda(Sema &S, +

[PATCH] D91088: [CUDA][HIP] Fix capturing reference to host variable

2020-12-02 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 rGcd95338ee302: [CUDA][HIP] Fix capturing reference to host variable (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.

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

2020-12-02 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 rG5c8911d0ba38: [CUDA][HIP] Diagnose reference of host variable (authored by yaxunl). Herald added a subscriber: jvesely. Herald added a project: clang. Changed prio

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added a comment. In D80450#2426507 , @tra wrote: > LGTM. > > I'd suggest adding more details on the background of this change to the > commit log (point to the comment in the `isBetterOverloadCandidate` ?) a

[PATCH] D80450: [CUDA][HIP] Fix HD function resolution

2020-12-02 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 rGacb6f80d96b7: [CUDA][HIP] Fix overloading resolution (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D80450?vs=308515&id=309044#toc Repo

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

2020-12-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping 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.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2020-12-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D92363#2426401 , @tra wrote: > While I agree that the default GPU choice is not likely to be correct, or > usable, for everyone, but the warning seems to be a half-measure. > If the default is not usable, then it should not be t

[PATCH] D92628: [HIP] Fix bug in driver about wavefront size

2020-12-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, arsenm. Herald added subscribers: kerbowa, nhaehnle, jvesely. yaxunl requested review of this revision. Herald added a subscriber: wdng. The static variable causes it only initialized once and take the same value for different GPU archs, w

[PATCH] D92628: [HIP] Fix bug in driver about wavefront size

2020-12-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0519e1ddb388: [HIP] Fix bug in driver about wavefront size (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D92720: [HIP] unbundle bundled preprocessor output

2020-12-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. There is a use case that users want to emit preprocessor output as file and compile the preprocessor output later with `-x hip-cpp-output`. Clang emits bundled preprocessor output when users comp

[PATCH] D86217: rename sram-ecc as sramecc in clang

2020-12-07 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG40ad476a3244: [clang][AMDGPU] rename sram-ecc as sramecc (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D86217?vs=286562&id=310031#toc Repository

[PATCH] D91310: [AMDGPU] Add -mcode-object-version=n

2020-12-07 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0b81d9a99257: [AMDGPU] add -mcode-object-version=n (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D91310?vs=304688&id=310037#toc Repository: rG

[PATCH] D89582: clang/AMDGPU: Apply workgroup related attributes to all functions

2020-10-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. What if a device function is called by kernels with different work group sizes, will caller's work group size override callee's work group size? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89582/new/ https://reviews.llvm.org/D89582 ___

[PATCH] D89520: Don't permit array bound constant folding in OpenCL.

2020-10-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I am OK with the changes regarding null pointer. I guess people seldom set pointer to zero address in OpenCL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89520/new/ https://reviews.llvm.org/D89520 ___

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 299044. yaxunl marked 2 inline comments as done. yaxunl added a comment. Add constructors to StreamingDiagnostic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84362/new/ https://reviews.llvm.org/D84362 Files: clang/include/clang/AST/ASTContext.h

[PATCH] D84362: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic

2020-10-19 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG7e561b62d2f2: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic (authored by yaxunl). Herald added a subscriber: dexo

[PATCH] D89752: [CUDA] Improve clang's ability to detect recent CUDA versions.

2020-10-20 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/D89752/new/ https://reviews.llvm.org/D89752

[PATCH] D89799: [clang][driver] Rename DriverOption as NoXarchOption (NFC)

2020-10-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I am not sure whether it is proper to rename it. Originally, this flag means driver option which is not supposed to be forwarded to tools. It is more like a reminder to driver developers since clang driver does not automatically forward options to tools and does not enfo

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

2020-10-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Herald added a subscriber: dexonsmith. ping 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.llvm.org/cgi-bi

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. Herald added a subscriber: tpr. yaxunl requested review of this revision. Recently HIP toolchain made a change to use clang instead of opt/llc to do compilation (https://reviews.llvm.org/D81861). The intention is to make HIP too

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90174#2354249 , @rjmccall wrote: > I have objections to the code change here. I'll leave the conceptual > question to other people interested in the HIP toolchain. Is it OK to introduce a clang codegen option e.g. -fp-contrac

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:486 + if (LangOpts.HIP) +Options.AllowFPOpFusion = llvm::FPOpFusion::Standard; + tra wrote: > I don't think it's a good idea to force this. > > Perhaps a better way to address this

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:486 + if (LangOpts.HIP) +Options.AllowFPOpFusion = llvm::FPOpFusion::Standard; + tra wrote: > yaxunl wrote: > > tra wrote: > > > I don't think it's a good idea to force this. > > >

[PATCH] D90251: [AMDGPU] Add __builtin_amdgcn_grid_size

2020-10-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I think there is value in this change. It may help simplify device library and hide some compiler details. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90251/new/ https://reviews.llvm.org/D90251 __

[PATCH] D90311: [CUDA][HIP] Fix linkage for -fgpu-rdc

2020-10-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Currently for explicit template function instantiation in CUDA/HIP device compilation clang emits instantiated kernel with external linkage and instantiated device function with internal linkage.

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:486 + if (LangOpts.HIP) +Options.AllowFPOpFusion = llvm::FPOpFusion::Standard; + rjmccall wrote: > tra wrote: > > yaxunl wrote: > > > tra wrote: > > > > yaxunl wrote: > > > > > tra w

[PATCH] D89799: [clang][driver] Rename DriverOption as NoXarchOption (NFC)

2020-10-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D89799#2359553 , @MaskRay wrote: > > The original purposes have mostly been eliminated. The remaining is now > -Xarch. OK. Then let's rename it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D90251: [AMDGPU] Add __builtin_amdgcn_grid_size

2020-10-28 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/D90251/new/ https://reviews.llvm.org/D90251

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-10-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 302099. yaxunl edited the summary of this revision. yaxunl added a comment. Herald added subscribers: dexonsmith, dang. introduce faststd as value for -ffp-contract and use it for HIP by default. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90174#2370336 , @rjmccall wrote: > I agree this is useful. However, you need to update the manual to cover > `faststd`. will update the manual. Comment at: clang/test/CodeGenCUDA/fp-contract.cu:203 + +// A

[PATCH] D90436: [Bundler] Use argv[0] as the default choice for the Executable name.

2020-11-03 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/D90436/new/ https://reviews.llvm.org/D90436

[PATCH] D90311: [CUDA][HIP] Fix linkage for -fgpu-rdc

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGabd8cd9199d1: [CUDA][HIP] Fix linkage for -fgpu-rdc (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90311/

[PATCH] D90174: [HIP] Fix regressions due to fp contract change

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 302560. yaxunl added a comment. updated manual CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new/ https://reviews.llvm.org/D90174 Files: clang/docs/LanguageExtensions.rst clang/docs/UsersManual.rst clang/include/clang/Basic/LangOptions.h

[PATCH] D99683: [HIP] Support ThinLTO

2021-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:496 dbgs() << "ignored! No qualifying callee with summary found.\n"); continue; } tejohnson wrote: > Probabl

<    9   10   11   12   13   14   15   16   17   18   >