[PATCH] D87321: Fix -gz=zlib options for linker

2020-09-11 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rGccb4124a4172: Fix -gz=zlib options for linker (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D87321?vs=29

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2274315 , @aaron.ballman wrote: > In D84362#2271585 , @tra wrote: > >> So, the idea here is to do some sort of duck-typing and allow DiagBuilder to >> work with both `DiagnosticBu

[PATCH] D87321: Fix -gz=zlib options for linker

2020-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D87321#2274731 , @nemanjai wrote: > This broke the PPC LLD bot and the failure has been ignored for 4 days. I > believe it should be fixed with 3bc3983f229 >

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2274884 , @tra wrote: > In D84362#2274790 , @yaxunl wrote: > >> There are use patterns expecting `PartialDiagnosticInst << X << Y` to >> continue to be a `PartialDiagnostic&`, e.g.

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

2020-09-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 292319. yaxunl retitled this revision from "[NFC] Add missing functions to PartialDiagnostic" to "[NFC] Refactor DiagnosticBuilder and PartialDiagnostic". yaxunl edited the summary of this revision. yaxunl added a comment. Revised by Artem's comments. Extracte

[PATCH] D87791: [CUDA][HIP] Fix -gsplit option

2020-09-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay. yaxunl requested review of this revision. when -gsplit option is used with clang driver, clang driver will create a filename with .dwo option based on the input file name and pass it to clang -cc1. This file is used for storing th

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

2020-09-16 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGee5519d32357: [NFC] Refactor DiagnosticBuilder and PartialDiagnostic (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2277887 , @tra wrote: > Does this naming scheme the same as used for `.o` files? We may want to keep > them in sync. > > Other than that, LGTM. .o file is different story. For -f

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-17 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 rG40df06cdafc0: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions (authored by yaxunl). Herald added a project: clang. Changed prior to

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84364#2279684 , @hctim wrote: > Looks like this patch broke the MSan buildbots, PTAL (repro instructions > https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild): > > http://lab.llvm.org:8011/builders/sanitizer-x

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2279821 , @tra wrote: > In D87791#2278417 , @yaxunl wrote: > >> Therefore in either case there is no need to rename the intermediate .o >>

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D87791#2279885 , @tra wrote: > In D87791#2279864 , @yaxunl wrote: > >> It is requested by our debugger team, so it should work with amdgpu. > > Is

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

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D87858#2280429 , @jfb wrote: > Please provide documentation in this patch. opencl atomic builtins are documented as notes to `__c11_atomic builtins` part of https://clang.llvm.org/docs/LanguageExtensions.html#builtin-functions.

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84364#2279684 , @hctim wrote: > Looks like this patch broke the MSan buildbots, PTAL (repro instructions > https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild): > > http://lab.llvm.org:8011/builders/sanitizer-x

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84364#2282458 , @hctim wrote: > Not a known issue - no, but MSan doesn't play nice with uninistrumented > libraries (including things like libcxx) - and so it can be tricky to ensure > your build is properly sanitized, which i

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

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2279845 , @tra wrote: > In D84362#2279688 , @tra wrote: > >> Apparently this patch triggers compiler crashes on some of our code. I'll >> try to create a reproducer, but it would b

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

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2282965 , @tra wrote: > In D84362#2282890 , @yaxunl wrote: > >> I have a fix for the issue reported in D84364 >> . Would you like to try? Thanks. >

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

2020-09-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2283045 , @tra wrote: > In D84362#2282992 , @yaxunl wrote: > >> The fix is for the change in D84364 . It >> has no effect on the change in this rev

[PATCH] D87791: [CUDA][HIP] Fix -gsplit-dwarf option

2020-09-19 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 rGe50465ecefc9: [HIP] Fix -gsplit-dwarf option (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D87791?vs=292

[PATCH] D88115: [CUDA][HIP] Fix static device var used by host code only

2020-09-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. A static device variable may be accessed in host code through cudaMemCpyFromSymbol etc. Currently clang does not emit the static device variable if it is only referenced by host code, which causes

[PATCH] D88115: [CUDA][HIP] Fix static device var used by host code only

2020-09-23 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG301e23305d03: [CUDA][HIP] Fix static device var used by host code only (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

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

2020-09-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/static-device-var-no-rdc.cu:84 + const static __constant__ int local_static_constant = 42; + const static __device__ int local_static_device = 43; a[0] = x; what happens to a const static devic

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

2020-09-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: arsenm, b-sumner. Herald added subscribers: kerbowa, nhaehnle, jvesely. yaxunl requested review of this revision. Herald added a subscriber: wdng. https://reviews.llvm.org/D88370 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/Basic/Ta

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

2020-09-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 294534. yaxunl added a comment. fix typo 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/amdgpu-macros.cl I

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

2020-09-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1, arsenm. Herald added subscribers: kerbowa, t-tye, Anastasia, tpr, dstuttard, nhaehnle, jvesely, kzhuravl. yaxunl requested review of this revision. Herald added a subscriber: wdng. AMDGPU toolchain currently only diagnose invalid t

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

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, nhaehnle, jvesely, kzhuravl. yaxunl requested review of this revision. Herald added a subscriber: wdng. AMDGPU toolchain does not support -fPIE, therefore skip it if specified by

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

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 294728. yaxunl added a comment. update patch with full context 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/AMDGPU.h clang/li

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

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:243 - // Allow using target ID in --offload-arch. - StringRef GpuArch = translateTargetID(DriverArgs, CC1Args); + StringRef GpuArch = getGPUArch(DriverArgs)

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

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Basic/Targets/AMDGPU.h:419 + +if (llvm::find(Features, "+wavefrontsize64") != Features.end()) + WavefrontSize = 64; arsenm wrote: > Why is this not redundant wit

[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 294734. yaxunl marked an inline comment as done. yaxunl added a comment. capitalize macro 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/

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

2020-09-28 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Driver/hip-fpie-option.hip:34 + +// DEV-DAG: {{".*clang.*".* "-triple" "amdgcn-amd-amdhsa".* "-mrelocation-model" "pic" "-pic-level" "[1|2]" "-mframe-pointer=all"}} +// HOST-STATIC-DAG:

[PATCH] D60620: [HIP] Support target id by --offload-arch

2020-08-18 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7546b29e7616: [HIP] Support target id by --offload-arch (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D60620?vs=285482&id=286469#toc Repository:

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

2020-08-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: kzhuravl, arsenm. Herald added subscribers: llvm-commits, dang, kerbowa, hiraditya, nhaehnle, jvesely. Herald added a project: LLVM. yaxunl requested review of this revision. Herald added a subscriber: wdng. As backend will rename sram-ecc to

[PATCH] D86376: [HIP] Improve kernel launching latency

2020-08-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl requested review of this revision. Currently clang emits emits the following code for triple chevron kernel call for HIP: __hipPushCallConfiguration(grids, blocks, shmem, stream); kernel_stub(); whereas for each ker

[PATCH] D86376: [HIP] Improve kernel launching latency

2020-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D86376#2234259 , @tra wrote: > How much does this inlining buy you in practice? I.e. what's a typical launch > latency before/after the patch? For CUDA, config push/pop is negligible > compared to the cost of actually launching

[PATCH] D86376: [HIP] Improve kernel launching latency

2020-08-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D86376#2234547 , @tra wrote: > I'm OK with how the patch is implemented. > I'm still on the fence regarding whether it should be implemented. > > In D86376#2234458 , @yaxunl wrote: > >>

[PATCH] D86376: [HIP] Improve kernel launching latency

2020-08-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D86376#2234824 , @tra wrote: > In D86376#2234719 , @yaxunl wrote: > >>> This patch appears to be somewhere in the gray area to me. My prior >>> experience with CUDA suggests that it will

[PATCH] D86376: [HIP] Improve kernel launching latency

2020-08-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D86376#2236704 , @tra wrote: > > It's still suspiciously high. AFAICT, config/push/pull is just an std::vector > push/pop. It should not take *that* long. Few function calls should not lead > to microseconds of overhead, o

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 289814. yaxunl added a comment. Defer overload resolution diags only if there are wrong-sided candidates. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84364/new/ https://reviews.llvm.org/D84364 Files: clang/include/clang/Basic/Diagnostic.td cla

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84364#2201336 , @tra wrote: > In D84364#2176091 , @yaxunl wrote: > >> I added a `Deferrable` bit to the diagnostics which can be specified in td >> files. This can be added to individual

[PATCH] D84364: [CUDA][HIP] Defer overloading resolution diagnostics for host device functions

2020-09-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D84364#2255572 , @tra wrote: > LGTM. > > Nice! > > To sum it up -- the patch introduces `-fgpu-defer-diag` flag which allows > deferring overload resolution diagnostics, if overload set

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping. this is needed by https://reviews.llvm.org/D84364 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84362/new/ https://reviews.llvm.org/D84362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D87321: Fix -gz=zlib options for linker

2020-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay. Herald added subscribers: kerbowa, nhaehnle, jvesely. yaxunl requested review of this revision. gcc translates -gz=zlib to --compress-debug-options=zlib for both assembler and linker but clang only does this for assembler. The l

[PATCH] D87324: [HIP] Add gfx1030 and gfx1031

2020-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1. yaxunl requested review of this revision. https://reviews.llvm.org/D87324 Files: clang/lib/Basic/Cuda.cpp clang/test/Driver/hip-offload-arch.hip Index: clang/test/Driver/hip-offload-arch.hip ==

[PATCH] D87324: [HIP] Add gfx1030 and gfx1031

2020-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG041da0d828e3: [HIP] Add gfx1031 and gfx1030 (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87324/new/ ht

[PATCH] D87461: Disable sanitizer options for AMDGPU

2020-09-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, ashi1. Herald added subscribers: t-tye, tpr, dstuttard, kzhuravl. yaxunl requested review of this revision. Herald added a subscriber: wdng. Currently AMDGPU does not support sanitizer. Disable sanitizer options for now until they are sup

[PATCH] D87461: Disable sanitizer options for AMDGPU

2020-09-10 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4934127e627d: Diable sanitizer options for amdgpu (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87461/ne

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

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

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. clang-offload-bundler is not only used by clang driver to bundle/unbundle files for offloading toolchains, but also used by

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 310748. yaxunl marked an inline comment as done. yaxunl added a comment. Revised by Artem's comments: removing unnecessary output to temporary file, extract forEachBundle. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92954/new/ https://reviews.llvm

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:763 + +// Create an intermediate temporary file for reading the bundles. +TempFileHandlerRAII TempFiles; tra wrote: > Having to create a temporary file in

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 310751. yaxunl added a comment. Remove unnecessary formatting changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92954/new/ https://reviews.llvm.org/D92954 Files: clang/test/Driver/clang-offload-bundler.c clang/tools/clang-offload-bundler/Cl

[PATCH] D92277: [OpenCL] Refactor of targets OpenCL option settings

2020-12-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl requested changes to this revision. yaxunl added inline comments. This revision now requires changes to proceed. Comment at: clang/test/Misc/r600.languageOptsOpenCL.cl:26 // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple r600-unknown-unknown -Wpedantic-core-featu

[PATCH] D93068: [clang-offload-bundler] Add option -fail-on-missing-bundles

2020-12-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. There are out-of-tree tools using clang-offload-bundler to extract bundles from bundled files. When a bundle is not in the

[PATCH] D93068: [clang-offload-bundler] Add option -fail-on-missing-bundles

2020-12-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:980 + if (FailOnMissingBundles && !Worklist.empty()) { +std::string ErrMsg = "Can't find bundles for"; +std::set Sorted; -

[PATCH] D93068: [clang-offload-bundler] Add option -allow-missing-bundles

2020-12-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 311099. yaxunl marked 3 inline comments as done. yaxunl retitled this revision from "[clang-offload-bundler] Add option -fail-on-missing-bundles" to "[clang-offload-bundler] Add option -allow-missing-bundles". yaxunl edited the summary of this revision. yaxunl

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

2020-12-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-use-host-var.cu:169 + static texture ref; + __attribute__((device)) int c() { +auto &x = ref; use `__device__` will make it more readable. same as below. Repository: rG LLVM Github Mon

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:188 + + if (Error Err = Func()) +return Err; tra wrote: > Now, if we could save the triple in a `BundleInfo`

[PATCH] D92954: [clang-offload-bundler] Add option -list

2020-12-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 311187. yaxunl marked 3 inline comments as done. yaxunl added a comment. Revised by Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92954/new/ https://reviews.llvm.org/D92954 Files: clang/test/Driver/clang-offload-bundler.c clang

[PATCH] D92782: [CodeGen][AMDGPU] Fix ICE for static initializer IR generation

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

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

2020-12-11 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] D92720: [HIP] unbundle bundled preprocessor output

2020-12-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 311225. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92720/new/ https://reviews.llvm.org/D92720 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-unbundle-preproc.hip Index: clang/tes

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

2020-12-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D92720#2437621 , @tra wrote: > `-E` by default prints preprocessed output to stdout. CUDA will print > preprocessed output from all subcompilations. What does HIP do in this case? > Prin

[PATCH] D92277: [OpenCL] Refactor of targets OpenCL option settings

2020-12-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Misc/r600.languageOptsOpenCL.cl:26 // RUN: %clang_cc1 -x cl -cl-std=CL2.0 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu turks +// XFAIL: * azabaznov wrote

[PATCH] D93258: [amdgpu] Default to code object v3

2020-12-14 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. @JonChesterfield Did this patch pass ePSDB in gerrlit? Better do that before committing it to trunk since we don't know if math libs are compatible with this patch. Also you need to fix lit te

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

2020-12-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D92720#2453277 , @tra wrote: > In D92720#2448890 , @yaxunl wrote: > >> Output of `-E` for HIP combined host/device compilation is a plain text. It

[PATCH] D93258: [amdgpu] Default to code object v3

2020-12-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D93258#2453815 , @JonChesterfield wrote: > In D93258#2453724 , @thakis wrote: > >> reverted in c9ede6f3367a627baeef78f30d18078af9a4ffca >>

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

2020-12-15 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f14b80803a4: [HIP] unbundle bundled preprocessor output (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D93258: [amdgpu] Default to code object v3

2020-12-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Thanks for fixing the lit tests. Using regex is the right choice. Do we have a plan about how to merge this to amd-stg-open? Will it cause ePSDB to fail? Do you have a follow up patch to make amd-stg-open happy? Thanks. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D93068: [clang-offload-bundler] Add option -allow-missing-bundles

2020-12-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added a comment. @ABataev Is this patch OK for OpenMP? It is NFC for OpenMP toolchain but affects using clang-offload-bundler as a standalone tool. Thanks. Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:112

[PATCH] D93258: [amdgpu] Default to code object v3

2020-12-16 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/D93258/new/ https://reviews.llvm.org/D93258

[PATCH] D93068: [clang-offload-bundler] Add option -allow-missing-bundles

2020-12-16 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rGb9fb063e63c7: [clang-offload-bundler] Add option -allow-missing-bundles (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://rev

[PATCH] D92954: [clang-offload-bundler] Add option -list

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

[PATCH] D90409: [HIP] Math Headers to use type promotion

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. nvcc does not support fma(float,float,char) https://godbolt.org/z/zxbMhP clang's behavior was different from nvcc already. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90409/new/ https://reviews.llvm.org/D90409 _

[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 302662. yaxunl marked 7 inline comments as done. yaxunl added a comment. revised manual by John's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new/ https://reviews.llvm.org/D90174 Files: clang/docs/LanguageExtensions.rst clang/do

[PATCH] D90409: [HIP] Math Headers to use type promotion

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90409#2371987 , @tra wrote: > In D90409#2371969 , @yaxunl wrote: > >> nvcc does not support fma(float,float,char) > > It does, it just needs an explicit flag to match clang's treatment of

[PATCH] D90409: [HIP] Math Headers to use type promotion

2020-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90409#2372023 , @yaxunl wrote: > In D90409#2371987 , @tra wrote: > >> In D90409#2371969 , @yaxunl wrote: >> >>> nvcc does not support fma(float,fl

[PATCH] D90409: [HIP] Math Headers to use type promotion

2020-11-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90409#2372183 , @tra wrote: > In D90409#2372042 , @yaxunl wrote: > >>> Practically the behavior is the same since they all promote integer types >>> to double. This matches the C++ behav

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

2020-11-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90174#2371577 , @rjmccall wrote: > Hmm. Do we actually want this behavior of `fast` overriding pragmas? What > do other compilers do here? It might be reasonable to just treat this as a > bug. I think clang is just trying

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

2020-11-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90174#2373829 , @yaxunl wrote: > In D90174#2371577 , @rjmccall wrote: > >> Hmm. Do we actually want this behavior of `fast` overriding pragmas? What >> do other compilers do here? It

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

2020-11-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @rjmccall ping. Any further concerns for this patch? Thanks. 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://list

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

2020-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. How about fast-constrained, fast-limited, fast-restricted, or fast-restrained? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new/ https://reviews.llvm.org/D90174 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2020-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. In C++ when a reference variable is captured by copy, the lambda is supposed to make a copy of the referenced variable in the captures and refer to the copy in the lambda. Therefore, it i

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

2020-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 303905. yaxunl added a comment. remove debug code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91088/new/ https://reviews.llvm.org/D91088 Files: clang/lib/CodeGen/CGExpr.cpp clang/lib/Sema/SemaExpr.cpp clang/test/CodeGenCUDA/lambda-reference-

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

2020-11-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/lambda-reference-var.cu:61 + [=](){ +int &ref = global_device_var; +ref++; tra wrote: > Do we have current Sema tests that verify that we we would not allow > accessing host vars here? cur

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 304494. yaxunl edited the summary of this revision. yaxunl added a comment. added diagnosing referencing host variable in device functions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91088/new/ https://reviews.llvm.org/D91088 Files: clang/includ

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl requested review of this revision. This patch diagnoses invalid references of global host variables in device, global, or host device functions. https://reviews.llvm.org/D91281 Files: clang/include/clang/Basic/Diagnos

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 304566. yaxunl edited the summary of this revision. yaxunl added a comment. Separate diagnose of host variable to another patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91088/new/ https://reviews.llvm.org/D91088 Files: clang/lib/CodeGen/CGEx

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 304569. yaxunl added a comment. add comments about H->D not diagnosed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91281/new/ https://reviews.llvm.org/D91281 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaCUDA.cpp

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

2020-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/Sema/SemaExpr.cpp:357 + if (LangOpts.CUDAIsDevice) { +auto *FD = dyn_cast_or_null(CurContext); tra wrote: > This could use a comment why we only check `D->H` refer

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D90174#2389269 , @tra wrote: > In D90174#2387518 , @scanon wrote: > >> Strictly speaking, fp-contract=fast probably should have been a separate >> flag entirely (since there's no _express

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 304604. yaxunl edited the summary of this revision. yaxunl added a comment. rename faststd to fast-honor-pragmas CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90174/new/ https://reviews.llvm.org/D90174 Files: clang/docs/LanguageExtensions.rst cl

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

2020-11-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: kzhuravl. Herald added subscribers: dang, kerbowa, t-tye, tpr, dstuttard, nhaehnle, jvesely. yaxunl requested review of this revision. Herald added a subscriber: wdng. Add option -mcode-object-version=n to control code object version for AMDG

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

2020-11-11 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/D86217/new/ https://reviews.llvm.org/D86217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D91421: Fix temporary file name on Windows

2020-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. Bound arch may contain ':', which is invalid in Windows file names. This patch fixes that. https://reviews.llvm.org/D91421 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-windows-

[PATCH] D91421: Fix temporary file name on Windows

2020-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 305127. yaxunl added a comment. add end of line to test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91421/new/ https://reviews.llvm.org/D91421 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-windows-filename.hip Index: clang/test/Dr

[PATCH] D91421: Fix temporary file name on Windows

2020-11-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4645 + // therefore replace it with '%'. + std::replace(BoundArch.begin(), BoundArch.end(), ':', '%'); +#endif tra wrote: > Windows `cmd` shell uses `%` to reference environment variables. Th

[PATCH] D91421: Fix temporary file name on Windows

2020-11-15 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfb58142e00ad: Fix temporary file name on Windows (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D91421?vs=305127&id=305352#toc Repository: rG L

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

2020-11-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall, arsenm. Herald added subscribers: dang, kerbowa, jfb, t-tye, tpr, dstuttard, nhaehnle, jvesely, kzhuravl. yaxunl requested review of this revision. Herald added a subscriber: wdng. Add an option -munsafe-fp-atomics for AMDGPU ta

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

2020-11-16 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/TargetOptions.h:78 + /// \brief If enabled, allow AMDGPU unsafe floating point atomics. + bool AllowAMDGPUUnsafeFPAtomics = false; tra wrote: > I'm cu

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