[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 22fd628687652e7f9d8795c48e9f794fdd684c45 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 13 Feb 2024 21:27:17 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -4185,9 +4185,17 @@ bool SIInstrInfo::isInlineConstant(const MachineOperand &MO, case AMDGPU::OPERAND_REG_INLINE_C_V2FP16: case AMDGPU::OPERAND_REG_INLINE_AC_V2FP16: return AMDGPU::isInlinableLiteralV2F16(Imm); + case AMDGPU::OPERAND_REG_IMM_V2BF16: + case AMDGPU:

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 47b96d282d5416f9dd4c41013d44f8865a1a0d31 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 13 Feb 2024 21:34:44 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 7a517eeab81b45616dd7a1511380f4696304375a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 13 Feb 2024 21:59:52 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-13 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,8 @@ +# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -disassemble -show-encoding < %s | FileCheck %s +# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -disassemble -show-encoding < %s | FileCheck %s + +# CHECK: v_dot2_bf16_bf16 v5, v1, v2, 0x42c8 +0x05,0x00,0x67,0xd6,0x01,0x0

[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)

2024-02-13 Thread Shilei Tian via cfe-commits
shiltian wrote: > I can't tell what you're trying to fix here. Is this fixing a crash? Or is > the check redundant? Or is it necessary for some followup change you want to > make? Sorry, I should have clearly mentioned that. Yes, it is for my followup change #80908. In #80908, we changed the

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

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

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

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

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -emit-obj -verify -fopenmp %s shiltian wrote: `emit-obj` is not needed https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -emit-obj -verify -fopenmp %s shiltian wrote: You can use `-emit-llvm` instead. https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 9ae3562ab4a6fb152c2a92f50b72d86711bbad8b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 23 Jan 2024 12:35:42 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 5eb2678a0a6a55c2d441b322d4eaaa8fe829a30f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 23 Jan 2024 16:14:48 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

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

[clang] [Clang][OpenMP] Add a NULL check (PR #77131)

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

[clang] [Clang][OpenMP] Add a NULL check (PR #77131)

2024-01-16 Thread Shilei Tian via cfe-commits
shiltian wrote: Can you add a test? https://github.com/llvm/llvm-project/pull/77131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/78333 We can directly call `clang -c -x cl -target amdgcn -mcpu=gfx90a test.cl -o test.o` to compile an OpenCL kernel file. However, when `--save-temps` is enabled, it doesn't work because the preprocessed file (`.i`

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-16 Thread Shilei Tian via cfe-commits
shiltian wrote: I'm working on a test case. https://github.com/llvm/llvm-project/pull/78333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 837a9fd2c1fac7dcdf2c8538e6634eccf36ee7b6 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 19 Jan 2024 23:46:54 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

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

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Shilei Tian via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: shiltian wrote: This breaks the build on macOS because the linker doesn't support `--long-plt`. Please fix it or revert the patch. https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits m

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Shilei Tian via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: shiltian wrote: > Oh, that's unfortunate. Let me add a check for `LLVM_USE_LINKER=gold`. AFAIK > it's never used on macOS. It might be better to check linker flag (https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html). https://

[clang] [clang-repl] Fix PLT offset too large linker error on ARM (PR #78959)

2024-01-22 Thread Shilei Tian via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: shiltian wrote: > @shiltian Does that fix the issue for you? Yes, thanks! https://github.com/llvm/llvm-project/pull/78959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 2fb901b2379290b162647f0b6d152b93df1b1e7f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 22 Jan 2024 15:39:19 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (PR #78333)

2024-01-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/78333 >From 6770e41a1bf1b2595f162a09c81760314e5061b2 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 23 Jan 2024 09:27:38 -0500 Subject: [PATCH] [Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation We

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===// +// +// 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: Apach

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

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

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-10-24 Thread Shilei Tian via cfe-commits
shiltian wrote: Waiting for the evaluation, if possible https://github.com/llvm/llvm-project/pull/66919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-10-24 Thread Shilei Tian via cfe-commits
shiltian wrote: I'd prefer to split it into at least one front end and one runtime, both with proper tests. https://github.com/llvm/llvm-project/pull/66919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-10-24 Thread Shilei Tian via cfe-commits
shiltian wrote: By "ompx infrastructure" do you mean the frond end code? https://github.com/llvm/llvm-project/pull/66919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-10-24 Thread Shilei Tian via cfe-commits
shiltian wrote: It's fine that it will generate code that cannot be linked, as long as we don't have runtime use. We just need to check generated IR. https://github.com/llvm/llvm-project/pull/66919 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Offloading][NFC] Move creation of offloading entries from OpenMP (PR #70116)

2023-10-24 Thread Shilei Tian via cfe-commits
shiltian wrote: Can this stuff really be generic? https://github.com/llvm/llvm-project/pull/70116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Emit unsupported directive error (PR #70233)

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

[clang] [Clang][OpenMP] Emit unsupported directive error (PR #70233)

2023-10-25 Thread Shilei Tian via cfe-commits
shiltian wrote: Can you add a small test to check the error message is correctly emitted? You can refer to those diagnosis tests under `clang/test/OpenMP`. https://github.com/llvm/llvm-project/pull/70233 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [OpenMP] Unify the min/max thread/teams pathways (PR #70273)

2023-10-26 Thread Shilei Tian via cfe-commits
@@ -1,68 +1,20 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK1 -// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerp

[clang] [OpenMP] Unify the min/max thread/teams pathways (PR #70273)

2023-10-27 Thread Shilei Tian via cfe-commits
@@ -1,68 +1,20 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck -allow-deprecated-dag-overlap %s -check-prefix=CHECK1 -// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerp

[clang] ebb1092 - [Clang][OpenMP] Added support for nowait target in CodeGen via regular task

2020-09-25 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2020-09-25T22:10:36-04:00 New Revision: ebb1092a2875739d3e9bb6b1fb230c0e0d88ebff URL: https://github.com/llvm/llvm-project/commit/ebb1092a2875739d3e9bb6b1fb230c0e0d88ebff DIFF: https://github.com/llvm/llvm-project/commit/ebb1092a2875739d3e9bb6b1fb230c0e0d88ebff.diff L

[clang] e20d64c - [Clang][OpenMP] Fixed an issue of segment fault when using target nowait

2020-10-26 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2020-10-26T22:33:22-04:00 New Revision: e20d64c3d9d81cad701f31d8481367222c76c787 URL: https://github.com/llvm/llvm-project/commit/e20d64c3d9d81cad701f31d8481367222c76c787 DIFF: https://github.com/llvm/llvm-project/commit/e20d64c3d9d81cad701f31d8481367222c76c787.diff L

[clang] d38788b - [Clang][OpenMP] Avoid unnecessary privatization of mapper array when there is no user defined mapper

2020-10-26 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2020-10-27T00:02:32-04:00 New Revision: d38788b357ad29083eb3b03027db908559aae2a6 URL: https://github.com/llvm/llvm-project/commit/d38788b357ad29083eb3b03027db908559aae2a6 DIFF: https://github.com/llvm/llvm-project/commit/d38788b357ad29083eb3b03027db908559aae2a6.diff L

[clang] 0661328 - [Clang][OpenMP] Added the support for target data nowait

2020-10-28 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2020-10-28T15:53:30-04:00 New Revision: 0661328d7efb81a8ac7f2ca0734a65f9be105f29 URL: https://github.com/llvm/llvm-project/commit/0661328d7efb81a8ac7f2ca0734a65f9be105f29 DIFF: https://github.com/llvm/llvm-project/commit/0661328d7efb81a8ac7f2ca0734a65f9be105f29.diff L

[clang] 5ad038a - [Clang][OpenMP][NVPTX] Replace `libomptarget-nvptx-path` with `libomptarget-nvptx-bc-path`

2021-01-23 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-01-23T14:42:38-05:00 New Revision: 5ad038aafa3a07a4491bf12cf6edf2026f3f17d1 URL: https://github.com/llvm/llvm-project/commit/5ad038aafa3a07a4491bf12cf6edf2026f3f17d1 DIFF: https://github.com/llvm/llvm-project/commit/5ad038aafa3a07a4491bf12cf6edf2026f3f17d1.diff L

[clang] 0f0ce3c - [OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`

2021-02-03 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-02-03T20:58:12-05:00 New Revision: 0f0ce3c12edefd25448e39c4d20718a10d3d42c1 URL: https://github.com/llvm/llvm-project/commit/0f0ce3c12edefd25448e39c4d20718a10d3d42c1 DIFF: https://github.com/llvm/llvm-project/commit/0f0ce3c12edefd25448e39c4d20718a10d3d42c1.diff L

[clang] ca999f7 - [OpenMP][Offloading] Use bitset to indicate execution mode instead of value

2021-09-22 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-09-22T11:40:52-04:00 New Revision: ca999f719117f916b333a794cc8c59984ae40dd2 URL: https://github.com/llvm/llvm-project/commit/ca999f719117f916b333a794cc8c59984ae40dd2 DIFF: https://github.com/llvm/llvm-project/commit/ca999f719117f916b333a794cc8c59984ae40dd2.diff L

[clang] 747b1a6 - [NFC] Remove trailing spaces from some files

2021-09-22 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-09-22T18:17:40-04:00 New Revision: 747b1a67a3dd706ffab9df9ee6f816b75ccaa5b6 URL: https://github.com/llvm/llvm-project/commit/747b1a67a3dd706ffab9df9ee6f816b75ccaa5b6 DIFF: https://github.com/llvm/llvm-project/commit/747b1a67a3dd706ffab9df9ee6f816b75ccaa5b6.diff L

[clang] 33d6609 - [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35

2021-02-20 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-02-20T15:14:13-05:00 New Revision: 33d660939d9acb027f9941f037802936124dad8c URL: https://github.com/llvm/llvm-project/commit/33d660939d9acb027f9941f037802936124dad8c DIFF: https://github.com/llvm/llvm-project/commit/33d660939d9acb027f9941f037802936124dad8c.diff L

[clang] 76151ac - [Clang][OpenMP] Require CUDA 9.2+ for OpenMP offloading on NVPTX target

2021-02-22 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-02-22T11:00:33-05:00 New Revision: 76151acf893ac7bdaf460fdfe8a8494cf477157a URL: https://github.com/llvm/llvm-project/commit/76151acf893ac7bdaf460fdfe8a8494cf477157a DIFF: https://github.com/llvm/llvm-project/commit/76151acf893ac7bdaf460fdfe8a8494cf477157a.diff L

[clang] c41ae24 - [OpenMP][Clang][NVPTX] Only build one bitcode library for each SM

2021-03-08 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2021-03-08T12:03:04-05:00 New Revision: c41ae246ac673e97ec1abdc2b9cbe1989f8682fe URL: https://github.com/llvm/llvm-project/commit/c41ae246ac673e97ec1abdc2b9cbe1989f8682fe DIFF: https://github.com/llvm/llvm-project/commit/c41ae246ac673e97ec1abdc2b9cbe1989f8682fe.diff L

[clang] 5ba8ecb - [Clang][OpenMP] Find the type `omp_allocator_handle_t` from identifier table

2023-01-24 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-24T22:49:05-05:00 New Revision: 5ba8ecb6cc7b76e7124566e53a3bce9393763a20 URL: https://github.com/llvm/llvm-project/commit/5ba8ecb6cc7b76e7124566e53a3bce9393763a20 DIFF: https://github.com/llvm/llvm-project/commit/5ba8ecb6cc7b76e7124566e53a3bce9393763a20.diff L

[clang] 6e18277 - [OpenMP] Implement `omp_get_mapped_ptr`

2023-01-11 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-11T22:05:42-05:00 New Revision: 6e18277a51187ce8e861cdf0ab1395235e5b83d4 URL: https://github.com/llvm/llvm-project/commit/6e18277a51187ce8e861cdf0ab1395235e5b83d4 DIFF: https://github.com/llvm/llvm-project/commit/6e18277a51187ce8e861cdf0ab1395235e5b83d4.diff L

[clang] ae53c7f - [Clang][OpenMP] Fix the issue that a functor is not captured properly in a task region

2023-01-16 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-16T22:35:05-05:00 New Revision: ae53c7f4a21104e2eb84139f3ce4c468e2632590 URL: https://github.com/llvm/llvm-project/commit/ae53c7f4a21104e2eb84139f3ce4c468e2632590 DIFF: https://github.com/llvm/llvm-project/commit/ae53c7f4a21104e2eb84139f3ce4c468e2632590.diff L

[clang] 9c2cfaa - [Clang][OpenMP] Allow `f16` literal suffix when compiling OpenMP target offloading for NVPTX

2023-01-19 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-19T22:24:38-05:00 New Revision: 9c2cfaaada66f323d10e25ac961ce1524d7b5f1f URL: https://github.com/llvm/llvm-project/commit/9c2cfaaada66f323d10e25ac961ce1524d7b5f1f DIFF: https://github.com/llvm/llvm-project/commit/9c2cfaaada66f323d10e25ac961ce1524d7b5f1f.diff L

[clang] 2ebda47 - [Clang][OpenMP] Bail out early if `Scope` is nullptr in case of any crash

2023-01-20 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-20T14:40:24-05:00 New Revision: 2ebda47619d7e8b72d460a955de4f398f637489f URL: https://github.com/llvm/llvm-project/commit/2ebda47619d7e8b72d460a955de4f398f637489f DIFF: https://github.com/llvm/llvm-project/commit/2ebda47619d7e8b72d460a955de4f398f637489f.diff L

[clang] b561c5c - [Clang] Fix test case `clang/test/OpenMP/bug59944.c`

2023-01-20 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-01-20T16:41:03-05:00 New Revision: b561c5c149467c98094c87c0e0d07c3b05f17780 URL: https://github.com/llvm/llvm-project/commit/b561c5c149467c98094c87c0e0d07c3b05f17780 DIFF: https://github.com/llvm/llvm-project/commit/b561c5c149467c98094c87c0e0d07c3b05f17780.diff L

[clang] eb673be - [OMPIRBuilder] Add the support for compare capture

2022-06-01 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2022-06-01T19:53:43-04:00 New Revision: eb673be5ac8510646692f82a606a1f2c10f24828 URL: https://github.com/llvm/llvm-project/commit/eb673be5ac8510646692f82a606a1f2c10f24828 DIFF: https://github.com/llvm/llvm-project/commit/eb673be5ac8510646692f82a606a1f2c10f24828.diff L

[clang] 3a96256 - [Clang][OpenMP] Avoid using `IgnoreImpCasts` if possible

2022-06-02 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2022-06-02T17:45:02-04:00 New Revision: 3a96256b7e292de15ad57438202aeea4818956ba URL: https://github.com/llvm/llvm-project/commit/3a96256b7e292de15ad57438202aeea4818956ba DIFF: https://github.com/llvm/llvm-project/commit/3a96256b7e292de15ad57438202aeea4818956ba.diff L

[clang] b917433 - [NFC][Doc] Finish atomic compare

2022-06-02 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2022-06-02T21:50:07-04:00 New Revision: b917433835473d5a9dff5b1034e861cf5dc9e5bc URL: https://github.com/llvm/llvm-project/commit/b917433835473d5a9dff5b1034e861cf5dc9e5bc DIFF: https://github.com/llvm/llvm-project/commit/b917433835473d5a9dff5b1034e861cf5dc9e5bc.diff L

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-09-20 Thread Shilei Tian via cfe-commits
shiltian wrote: Since that is an extension, we have to check `getLangOpts().OpenMPExtensions`. https://github.com/llvm/llvm-project/pull/66919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-09-20 Thread Shilei Tian via cfe-commits
@@ -347,10 +347,6 @@ if(LIBOMP_OMPD_SUPPORT AND ((NOT LIBOMP_OMPT_SUPPORT) OR (NOT "${CMAKE_SYSTEM_NA set(LIBOMP_OMPD_SUPPORT FALSE) endif() -# OMPX Taskgraph support shiltian wrote: I'm not sure if I asked it before, but if possible can we run some task

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-26 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-targets=nvptx64 %s + +void foo() { +} + +void bar() { +#pragma omp target ompx_bare // expected-error {{unexpected OpenMP clause 'om

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian resolved https://github.com/llvm/llvm-project/pull/66844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Implicitly include the 'cgpu' and 'mgpu' libraries for OpenMP (PR #67557)

2023-09-27 Thread Shilei Tian via cfe-commits
shiltian wrote: If I don't build GPU libc, will it cause a link error? https://github.com/llvm/llvm-project/pull/67557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

2023-09-27 Thread Shilei Tian via cfe-commits
@@ -347,10 +347,6 @@ if(LIBOMP_OMPD_SUPPORT AND ((NOT LIBOMP_OMPT_SUPPORT) OR (NOT "${CMAKE_SYSTEM_NA set(LIBOMP_OMPD_SUPPORT FALSE) endif() -# OMPX Taskgraph support shiltian wrote: The easiest one off the top of my head is SPEC OMP 2012. https://github.

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-27 Thread Shilei Tian via cfe-commits
@@ -752,27 +751,41 @@ void CGOpenMPRuntimeGPU::emitNonSPMDKernel(const OMPExecutableDirective &D, EntryFunctionState EST; WrapperFunctionsMap.clear(); + bool IsBareKernel = D.getSingleClause(); shiltian wrote: So `target teams` is generic mode. Since we

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-27 Thread Shilei Tian via cfe-commits
shiltian wrote: > Where is the code that prevents the init/deinit calls from being created? It's in the early exit. https://github.com/llvm/llvm-project/pull/66844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [LinkerWrapper] Correctly handle multiple image wrappers (PR #67679)

2023-09-28 Thread Shilei Tian via cfe-commits
shiltian wrote: Can we have a test? https://github.com/llvm/llvm-project/pull/67679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LinkerWrapper] Correctly handle multiple image wrappers (PR #67679)

2023-09-28 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/67679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-28 Thread Shilei Tian via cfe-commits
@@ -752,27 +751,41 @@ void CGOpenMPRuntimeGPU::emitNonSPMDKernel(const OMPExecutableDirective &D, EntryFunctionState EST; WrapperFunctionsMap.clear(); + bool IsBareKernel = D.getSingleClause(); shiltian wrote: I made the change in the parent scope such

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-28 Thread Shilei Tian via cfe-commits
https://github.com/shiltian resolved https://github.com/llvm/llvm-project/pull/66844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

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

[clang] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2023-09-29 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/66844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7a80a5d - [NFC][Clang][OpenMP] Fix the test issue of incompatible pointer size

2023-09-29 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-09-29T14:38:34-04:00 New Revision: 7a80a5d3b7d131e87aee3491b2ebc1406488caa4 URL: https://github.com/llvm/llvm-project/commit/7a80a5d3b7d131e87aee3491b2ebc1406488caa4 DIFF: https://github.com/llvm/llvm-project/commit/7a80a5d3b7d131e87aee3491b2ebc1406488caa4.diff L

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-10-05 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/68373 This patch makes `num_teams` and `thread_limit` mandatory for bare kernels, similar to a reguar kernel language that when launching a kernel, the grid size has to be set explicitly. >From 3f88ed4ca8df5e0432afda

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-10-05 Thread Shilei Tian via cfe-commits
shiltian wrote: > Does `thread_limit` directly imply the number of threads? I thought that it > merely set an upper bound such that it cannot be increased beyond that via > environment variables. Based on the spec, yes. However, here since `ompx_bare` is an extension, we can redefine semantic

[clang] [OpenMP][Clang] Force use of `num_teams` and `thread_limit` for bare kernel (PR #68373)

2023-10-06 Thread Shilei Tian via cfe-commits
shiltian wrote: > I think the follow up, to force the user bound for bare kernels, make sense. > I am not sold on this patch though. Why would we disallow users to do the > same looping we do in the deviceRTL while hoping the offload runtime will > pick a good grid size? Because we don't have

[clang] [CodeGen][OpenMP] Set the default schedule for loops to static,1 if TSan is enabled (PR #68891)

2023-10-12 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,161 @@ +/* + * DRB006-indirectaccess2-orig-yes.c -- Archer testcase + */ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// +// See tools/archer/LIC

[clang] [Clang][OpenMP] Clang adding the addrSpace according to DataLayout fix (PR #65483)

2023-09-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian review_requested https://github.com/llvm/llvm-project/pull/65483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Emit unroll directive w/o captured region (PR #65862)

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

[clang] [Clang][OpenMP] Emit unroll directive w/o captured region (PR #65862)

2023-09-09 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/65862: The front end doesn't create captured region for unroll directive. This leads to a crash when `-fopenmp-simd` is used, as reported in #63570. Fix #63570. >From 7ba55161a5d24e9d67c00696bca9e4d06b907689 Mon Sep

[clang] [Clang][OpenMP] Emit unroll directive w/o captured region (PR #65862)

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

[clang] [Clang][OpenMP] Emit unroll directive w/o captured region (PR #65862)

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

[clang] [Clang][OpenMP] Emit unroll directive w/o captured region (PR #65862)

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

[clang] [Clang][OpenMP] Emit unroll directive w/o captured stmt (PR #65862)

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

[clang] [Clang][OpenMP] Emit unroll directive w/o captured stmt (PR #65862)

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

[clang] 00971f0 - [NFC][Doc] Update feature support doc `clang/docs/OpenMPSupport.rst` to correct

2023-06-28 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-06-28T11:07:29-04:00 New Revision: 00971f08604b29437af806263737a131bab1cf49 URL: https://github.com/llvm/llvm-project/commit/00971f08604b29437af806263737a131bab1cf49 DIFF: https://github.com/llvm/llvm-project/commit/00971f08604b29437af806263737a131bab1cf49.diff L

[clang] b8e3077 - [Clang][OpenMP] Fix the issue that list items in `has_device_addr` are still mapped to the target device

2023-05-25 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-05-25T20:19:07-04:00 New Revision: b8e3077d60de73ddcb1511a68af3fdd37fe81cf7 URL: https://github.com/llvm/llvm-project/commit/b8e3077d60de73ddcb1511a68af3fdd37fe81cf7 DIFF: https://github.com/llvm/llvm-project/commit/b8e3077d60de73ddcb1511a68af3fdd37fe81cf7.diff L

[clang] eaf3de6 - [Clang] Fix test case issue introduced by D141627

2023-05-25 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-05-25T20:40:57-04:00 New Revision: eaf3de6970fc6e779310a59fbf8f8452f6b34c55 URL: https://github.com/llvm/llvm-project/commit/eaf3de6970fc6e779310a59fbf8f8452f6b34c55 DIFF: https://github.com/llvm/llvm-project/commit/eaf3de6970fc6e779310a59fbf8f8452f6b34c55.diff L

[clang] 12d8403 - [Clang] Simplify test `clang/test/OpenMP/bug59160.c`

2023-05-25 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2023-05-25T22:12:16-04:00 New Revision: 12d840375d5a81e9ce1050354371c550669de2d7 URL: https://github.com/llvm/llvm-project/commit/12d840375d5a81e9ce1050354371c550669de2d7 DIFF: https://github.com/llvm/llvm-project/commit/12d840375d5a81e9ce1050354371c550669de2d7.diff L

[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)

2024-02-14 Thread Shilei Tian via cfe-commits
shiltian wrote: > Don't see how that could be related; you can losslessly bitconvert between > i16 and bfloat Yes, `canLosslesslyBitCastTo` doesn't allow cast between `i16` and `bfloat`, but it does between two vectors, as long as their sizes are the same. > A cast between float and int sound

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 1488b4e54982be4d3f5bc7f35617effcab52be48 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 14 Feb 2024 09:41:00 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)

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

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 784670dd98c3727d8d8aa25f865b7b299f114bf4 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 14 Feb 2024 13:11:01 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 9fbb1e610b0de65ae51bb90bd35146b5f927a46a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 15 Feb 2024 19:13:44 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

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

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

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

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-15 Thread Shilei Tian via cfe-commits
shiltian wrote: I'll create a ticket about the decoder. https://github.com/llvm/llvm-project/pull/80908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add 'CLANG_ALLOW_IMPLICIT_RPATH' to enable toolchain use of -rpath (PR #82004)

2024-02-16 Thread Shilei Tian via cfe-commits
shiltian wrote: IMHO I prefer to ask/request users to do the right thing. Vendors are totally free to do whatever to be convenient for their customers via their compiler wrappers/drivers, but for the community version, following the convention would be good. https://github.com/llvm/llvm-proje

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

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

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From d95e99ebcefa76ba2e8068f663be86340c14ab5b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 16 Feb 2024 11:29:47 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat Current

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-16 Thread Shilei Tian via cfe-commits
@@ -157,6 +157,27 @@ static uint32_t getLit16Encoding(uint16_t Val, const MCSubtargetInfo &STI) { return 255; } +static uint32_t getLitBF16Encoding(uint16_t Val) { + uint16_t IntImm = getIntInlineImmEncoding(static_cast(Val)); + if (IntImm != 0) +return IntImm; + + /

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-16 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck %s +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1200 -show-encoding %s | FileCheck %s + +v_dot2_bf16_bf16 v5, v1, v2, 100.0 +// CHECK: v_dot2_bf16_bf16 v5, v1, v2, 0x42c8 ; encoding: [0x05,0x00,0x

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

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

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