[clang] [llvm] [Clang][OMPX] Add the code generation for multi-dim `thread_limit` clause (PR #102717)

2024-08-16 Thread Shilei Tian via cfe-commits
shiltian wrote: @alexey-bataev any other comment? https://github.com/llvm/llvm-project/pull/102717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OMPX] Add the code generation for multi-dim `thread_limit` clause (PR #102717)

2024-08-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/102717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-08-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/104661 Clang uses a long-time special handling of the case where 3 element vector loads and stores are performed as 4 element, and then a shufflevector is used to extract the used elements. Odd sized vector codegen

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-08-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/104661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-08-16 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#104661** https://app.graphite.dev/github/pr/llvm/llvm-project/104661?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> πŸ‘ˆ * `main` This stack of pull requests is managed by Grap

[clang] clang/AMDGPU: Emit atomicrmw from {global|flat}_atomic_fadd_v2f16 builtins (PR #96873)

2024-08-20 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/96873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][LTO] Assume closed world after linking (PR #105845)

2024-08-23 Thread Shilei Tian via cfe-commits
@@ -761,7 +761,8 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { if (EnableLowerModuleLDS) PM.addPass(AMDGPULowerModuleLDSPass(*this)); if (EnableAMDGPUAttributor && Level != OptimizationLevel::O0) - PM.addPass(AM

[clang] [llvm] [AMDGPU][LTO] Assume closed world after linking (PR #105845)

2024-08-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM with one nit https://github.com/llvm/llvm-project/pull/105845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][LTO] Assume closed world after linking (PR #105845)

2024-08-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian requested changes to this pull request. Oops, replied the wrong PR. Sorry. https://github.com/llvm/llvm-project/pull/105845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [AMDGPU][LTO] Assume closed world after linking (PR #105845)

2024-08-23 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: clang -x hip -O3 -fgpu-rdc %s -mllvm -debug-only=amdgpu-attributor -o - | FileCheck %s shiltian wrote: This should not be a clang test. You can have an opt test. https://github.com/llvm/llvm-project/pull/105845

[clang] [llvm] [AMDGPU][LTO] Assume closed world after linking (PR #105845)

2024-08-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/105845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Replace `emitXXXBuiltin` with a unified interface (PR #96313)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/96313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94576 >From f16b927ab1b582d1b53c24b846618a5bb87a52e1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 21 Jun 2024 16:58:02 -0400 Subject: [PATCH] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buff

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-23 Thread Shilei Tian via cfe-commits
shiltian wrote: ping https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.ptr.buffer.store` (PR #94576)

2024-06-25 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/94576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP][Clang][Sema] Fix crash when calling builtins with pointer arguments (PR #95957)

2024-06-25 Thread Shilei Tian via cfe-commits
shiltian wrote: you have test failure https://buildkite.com/llvm-project/github-pull-requests/builds/73905#01902d01-7814-41af-b8e6-4d7d258fd4ec and https://buildkite.com/llvm-project/github-pull-requests/builds/73905#01902d01-7817-438a-b2cc-554580bfe611. Need to get it fixed before we merge i

[clang] [LinkerWrapper][NFC] Simplify StringErrors (PR #96650)

2024-06-25 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LG and good to know we have format support :-) https://github.com/llvm/llvm-project/pull/96650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-26 Thread Shilei Tian via cfe-commits
shiltian wrote: > > don't you need more code in AST? > > Sorry, I don't quite understand the question! Could you elaborate a little > please? I was thinking maybe you need changes in AST related files, like `ASTWriter.cpp`, but that might be not needed as this is adding a new directive. http

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-26 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -ast-print %s | FileCheck %s +// expected-no-diagnostics + +extern int bar(int); + +int foo(int arg) +{ + #pragma omp assume no_openmp_routines + { +auto fn = [](int x) { return bar(x); }; +// CHECK: auto fn = [

[clang] [llvm] [OpenMP] Fix stack corruption due to argument mismatch (PR #96386)

2024-06-27 Thread Shilei Tian via cfe-commits
@@ -10343,6 +10343,23 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall( MapNamesArray, InputInfo.MappersArray.emitRawPointer(CGF)}; +// Nowait calls have header declarations that take 13 arguments. Hence, the shiltian wrote: You can m

[clang] [llvm] [OpenMP] Fix stack corruption due to argument mismatch (PR #96386)

2024-06-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Besides, don't you need to update clang tests? https://github.com/llvm/llvm-project/pull/96386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Use atomicrmw for ds fmin/fmax builtins (PR #96738)

2024-06-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/96738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Use atomicrmw for ds fmin/fmax builtins (PR #96738)

2024-06-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/96738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -34,6 +34,7 @@ inititializeRuntime(bool IsSPMD, KernelEnvironmentTy &KernelEnvironment, mapping::init(IsSPMD); state::init(IsSPMD, KernelEnvironment, KernelLaunchEnvironment); allocator::init(IsSPMD, KernelEnvironment); + __init_thread_dst(); shiltia

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -359,6 +359,10 @@ int32_t __kmpc_cancel(IdentTy *Loc, int32_t TId, int32_t CancelVal); ///{ int32_t __kmpc_shuffle_int32(int32_t val, int16_t delta, int16_t size); int64_t __kmpc_shuffle_int64(int64_t val, int16_t delta, int16_t size); + +/// Manage dynamic schedule data st

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
@@ -444,32 +444,81 @@ template struct omptarget_nvptx_LoopSupport { // KMP interface implementation (dyn loops) -// TODO: This is a stopgap. We probably want to expand the dispatch API to take

[clang] [llvm] [openmp] [OpenMP][offload] Fix dynamic schedule tracking (PR #97065)

2024-06-28 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: The code changes look good now, but I'd prefer to have a non-SPMD mode test case. https://github.com/llvm/llvm-project/pull/97065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/108786 None >From 56b15c3dc7d0b6967047c6cc79ef2145a93f8dfc Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 15 Sep 2024 21:53:50 -0400 Subject: [PATCH] [IR] Introduce `T` to `DataLayout` to represent flat addre

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#108786** https://app.graphite.dev/github/pr/llvm/llvm-project/108786?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> πŸ‘ˆ * `main` This stack of pull requests is managed by Grap

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
@@ -579,7 +579,7 @@ static StringRef computeDataLayout(const Triple &TT) { "-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-" "v32:32-v48:64-v96:" "128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-" - "G

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
@@ -66,12 +66,12 @@ NVPTXTargetInfo::NVPTXTargetInfo(const llvm::Triple &Triple, HasFloat16 = true; if (TargetPointerWidth == 32) -resetDataLayout("e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"); +resetDataLayout("e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/108786 >From 0518fe9d148b371a1a148032f3738fb2fe4fd927 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 15 Sep 2024 21:53:50 -0400 Subject: [PATCH] [IR] Introduce `T` to `DataLayout` to represent flat address spa

[clang] [lld] [llvm] [mlir] [Attributor] Use more appropriate approach to check flat address space (PR #108713)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/108713 >From 0518fe9d148b371a1a148032f3738fb2fe4fd927 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 15 Sep 2024 21:53:50 -0400 Subject: [PATCH 1/3] [IR] Introduce `T` to `DataLayout` to represent flat address

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
@@ -245,6 +246,7 @@ class DataLayout { unsigned getDefaultGlobalsAddressSpace() const { return DefaultGlobalsAddrSpace; } + unsigned getFlatAddressSpace() const { return FlatAddressSpace; } shiltian wrote: It is optional from a target's perspective, b

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
shiltian wrote: I updated the PR description. Hopefully it can make the motivation of this patch more clear. I think the central question is, why it can't be just address space 0. I don't have a clear answer to that. @arsenm first introduced this concept to LLVM at least 8 years ago. I agree t

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
@@ -245,6 +246,7 @@ class DataLayout { unsigned getDefaultGlobalsAddressSpace() const { return DefaultGlobalsAddrSpace; } + unsigned getFlatAddressSpace() const { return FlatAddressSpace; } shiltian wrote: @arsenm made a point in https://github.com/l

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Shilei Tian via cfe-commits
shiltian wrote: > Just to clarify, does this mean any two non-flat address space pointers > _cannot_ alias? If I read it correctly, it is equivalent to ask, whether an AS X pointer can alias an AS Y pointer, assuming neither X nor Y is the flat address space. I think that is orthogonal to thi

[clang] clang/AMDGPU: Stop emitting amdgpu-unsafe-fp-atomics attribute (PR #111579)

2024-10-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Not sure if you still want to keep it for backward compatibility. https://github.com/llvm/llvm-project/pull/111579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] clang/AMDGPU: Stop emitting amdgpu-unsafe-fp-atomics attribute (PR #111579)

2024-10-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/111579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow all address spaces to be converted to the default (PR #112248)

2024-10-14 Thread Shilei Tian via cfe-commits
shiltian wrote: I think the default AS is expected to be losslessly converted to other AS but not the other way around, though I understand it is not clearly stated in LangRef or other places and a lot of code just assumes it can. https://github.com/llvm/llvm-project/pull/112248 __

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-10-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/108786 >From c2be824d5935b57a87a7ccf618ee4eecf55b4e3a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 17 Sep 2024 21:47:45 -0400 Subject: [PATCH] [IR] Introduce `T` to `DataLayout` to represent flat address spa

[clang] [lld] [llvm] [mlir] [IR] Introduce `U` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

2024-10-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `U` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

2024-10-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Set noalias.addrspace metadata on atomicrmw (PR #102462)

2024-10-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/102462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Put offloading globals in the `.llvm.rodata.offloading` section (PR #111890)

2024-10-10 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: It looks reasonable to me. https://github.com/llvm/llvm-project/pull/111890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-10-11 Thread Shilei Tian via cfe-commits
shiltian wrote: > The LangRef doesn't need to know why it's undesirable. It's like the n field `n` field? The following? ``` n::... This specifies a set of native integer widths for the target CPU in bits. For example, it might contain n32 for 32-bit PowerPC, n32:64 for PowerPC 64, or n8:16:3

[clang] clang: Fix hipstdpar test relying on default target (PR #111975)

2024-10-11 Thread Shilei Tian via cfe-commits
@@ -1,21 +1,17 @@ -// REQUIRES: x86-registered-target -// REQUIRES: amdgpu-registered-target -// REQUIRES: system-linux shiltian wrote: I'm not sure if the removal of `system-linux` would cause issue. https://github.com/llvm/llvm-project/pull/111975

[clang] [flang] [lldb] [llvm] [mlir] Fix typo "instrinsic" (PR #112899)

2024-10-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. Can't believe this many Lol https://github.com/llvm/llvm-project/pull/112899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Shilei Tian via cfe-commits
shiltian wrote: > > > Just a heads up, this change is gonna break some OpenMP tests, > > > specifically those prefix with `ompx`. > > > > > > Just to clarify, adding the deprecation warning will break them, or the > > eventual, as-of-yet not-scheduled, removal, will? > > On my system, the de

[clang] [flang] [libclc] [llvm] [AMDGPU] Add a new target for gfx1153 (PR #113138)

2024-10-21 Thread Shilei Tian via cfe-commits
@@ -46,7 +46,7 @@ set(all_amdgpu_architectures "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906" "gfx908;gfx90a;gfx90c;gfx940;gfx941;gfx942;gfx1010" "gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035"

[clang] [flang] [libclc] [llvm] [AMDGPU] Add a new target for gfx1153 (PR #113138)

2024-10-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/113138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP] Deprecate the AMDGCN_WAVEFRONT_SIZE macros (PR #112849)

2024-10-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Just a heads up, this change is gonna break some OpenMP tests, specifically those prefix with `ompx`. https://github.com/llvm/llvm-project/pull/112849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/94647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Shilei Tian via cfe-commits
@@ -439,6 +439,26 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +SmallPtrSet VisitedConsts; + +for (Instruction &I : instructions(F)) { shiltian wrote: I don't think it is genera

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-29 Thread Shilei Tian via cfe-commits
@@ -439,6 +451,36 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +{ // FLAT_SCRATCH_INIT shiltian wrote: This is misuse of `initialize`. This code should go to `updateImpl` of the co

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics, start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-11-04 Thread Shilei Tian via cfe-commits
@@ -744,7 +744,10 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) { #include "llvm/Passes/TargetPassRegistry.inc" PB.registerPipelineStartEPCallback( - [](ModulePassManager &PM, OptimizationLevel Level) { + [this](ModulePassManager &PM,

[clang] [lld] [llvm] [mlir] [llvm-project] Fix typo "propogate" (PR #114795)

2024-11-04 Thread Shilei Tian via cfe-commits
shiltian wrote: I'll need to double check my recent PRs (that have not been merged) because I used this word a lot. Lol. https://github.com/llvm/llvm-project/pull/114795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-05 Thread Shilei Tian via cfe-commits
@@ -36,6 +36,8 @@ int main(int argc, char **argv) { #pragma omp depobj(b) update(mutexinoutset) #pragma omp depobj(a) depend(iterator(char *p = argv[argc]:argv[0]:-1), out: p[0]) (void)tmain(a), tmain(b); + omp_depend_t obj; shiltian wrote: Auto-gen check

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to optimizer pipeline (PR #114577)

2024-11-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/114577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to optimizer pipeline (PR #114577)

2024-11-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/114577 >From 76d44f744fc9b859e4ffe151c8c71d0e16d8eb39 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 1 Nov 2024 12:39:52 -0400 Subject: [PATCH] [PassBuilder] Add `ThinOrFullLTOPhase` to optimizer pipeline ---

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to optimizer pipeline (PR #114577)

2024-11-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/114577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/114547 >From 3da52a072583f835b69694b9649ccc66986cd346 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 1 Nov 2024 10:51:20 -0400 Subject: [PATCH] [PassBuilder] Add `LTOPreLink` to early simplication EP call back

[clang] [libc] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-11-05 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,154 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [PassBuilder] Add `LTOPreLink` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#114547** https://app.graphite.dev/github/pr/llvm/llvm-project/114547?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> πŸ‘ˆ * `main` This stack of pull requests is managed by Grap

[clang] [llvm] [PassBuilder] Add `LTOPreLink` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
@@ -478,7 +478,8 @@ class PassBuilder { /// This extension point allows adding optimization right after passes that do /// basic simplification of the input IR. void registerPipelineEarlySimplificationEPCallback( - const std::function &C) { + const std::functio

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase ` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/114547 >From c271a3252ad3bbcf7c251c68244be2be55a9d387 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 1 Nov 2024 12:22:06 -0400 Subject: [PATCH 1/2] [PassBuilder] Replace `bool LTOPreLink` with `ThinOrFullLTOPh

[clang] [llvm] [PassBuilder] Add `LTOPreLink` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/114547 The early simplication pipeline is used in non-LTO and (Thin/Full)LTO pre-link stage. There are some passes that we want them in non-LTO mode, but not at LTO pre-link stage. The control is missing currently. Thi

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-11-01 Thread Shilei Tian via cfe-commits
@@ -683,6 +698,65 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-11-01 Thread Shilei Tian via cfe-commits
@@ -683,6 +698,65 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/114547 >From 56d807b8e73fca6f507056d2670dc4f4682bc921 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 1 Nov 2024 10:51:20 -0400 Subject: [PATCH] [PassBuilder] Add `LTOPreLink` to early simplication EP call back

[clang] [lld] [llvm] [mlir] [IR] Introduce `U` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

2024-10-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [IR] Introduce `U` to `DataLayout` to represent undesirable address space if a target has it (PR #108786)

2024-10-26 Thread Shilei Tian via cfe-commits
shiltian wrote: It seems like we can’t reach consensus on how to move forward with this. I already worked my issue around so I guess we no longer need this PR. https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing list cfe-commits@l

[clang] Fix for OpenMP offloading compilation error with GNU++20 option when using complex header (PR #115306)

2024-11-08 Thread Shilei Tian via cfe-commits
@@ -64,8 +64,13 @@ template __DEVICE__ _Tp norm(const std::complex<_Tp> &__c) { } // conj - -template std::complex<_Tp> conj(const std::complex<_Tp> &__c) { +#ifdef _GLIBCXX20_CONSTEXPR +#define CXX20_CONSTEXPR_DEVICE __DEVICE__ shiltian wrote: I wonder wh

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: LGTM. @alexey-bataev What do you think? https://github.com/llvm/llvm-project/pull/114221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add support for scoped atomic thread fence (PR #115545)

2024-11-08 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,179 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=amdgcn-amd-amdhsa -ffreestanding \ +// RUN: -fvisibility=hidden | FileCheck --check-prefix=AMDGCN %s +//: %clan

[clang] [Clang] Add support for scoped atomic thread fence (PR #115545)

2024-11-08 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,179 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=amdgcn-amd-amdhsa -ffreestanding \ +// RUN: -fvisibility=hidden | FileCheck --check-prefix=AMDGCN %s +//: %clan

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-08 Thread Shilei Tian via cfe-commits
@@ -121,6 +121,7 @@ static const OffloadArchToStringMap arch_names[] = { GFX(909), // gfx909 GFX(90a), // gfx90a GFX(90c), // gfx90c +{OffloadArch::GFX9_4_GENERIC, "gfx9-4-generic", "compute_amdgcn"}, shiltian wrote: In fact, `gfx10-1-generi

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Nov 12, 11:06 PM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/115190). https://github.com/llvm/llvm-project/pull/115190 __

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/115190 >From 15a01715c36063e35cf01043e51da26c60b00246 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 6 Nov 2024 12:49:45 -0500 Subject: [PATCH] [AMDGPU] Introduce a new generic target `gfx9-4-generic` --- cla

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/115190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Hmm, I thought this is already the default one if nothing is specified https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
shiltian wrote: gentle ping https://github.com/llvm/llvm-project/pull/115190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/115190 >From 43ef3b94c4a716134b4f3cdeb1405277cd06f6ea Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 6 Nov 2024 12:49:45 -0500 Subject: [PATCH] [AMDGPU] Introduce a new generic target `gfx9-4-generic` --- cla

<    1   2   3   4   5   6   7   8   9   10   >