yaxunl updated this revision to Diff 63556.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Revised by Anastia's comments. Disabled warning for sampler enum value by
default.
http://reviews.llvm.org/D21567
Files:
include/clang/AST/OperationKinds.def
include/clang/Basic/Dia
yaxunl updated this revision to Diff 63571.
yaxunl added a comment.
Added test for invalid sampler values.
http://reviews.llvm.org/D21567
Files:
include/clang/AST/OperationKinds.def
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ASTContext.cpp
yaxunl marked 11 inline comments as done.
Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:83
@@ +82,3 @@
+SamplerTy = llvm::PointerType::get(llvm::StructType::create(
+ CGM.getLLVMContext(), "__sampler"),
+ CGM.getContext().getTargetAddressSpace(
Anastas
Author: yaxunl
Date: Wed Jul 13 16:21:05 2016
New Revision: 275318
URL: http://llvm.org/viewvc/llvm-project?rev=275318&view=rev
Log:
[OpenCL] Fixes failures in test/Driver/opencl.cl.
Also fixes strict-aliasing option to only be allowed when OpenCL Version 1.0.
Added testcase in test/Frontend/ope
This revision was automatically updated to reflect the committed changes.
Closed by commit rL275318: [OpenCL] Fixes failures in test/Driver/opencl.cl.
(authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D22170?vs=63722&id=63862#toc
Repository:
rL LLVM
http://reviews.llvm.
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 63897.
yaxunl marked 3 inline comments as done.
yaxunl added a comment.
Revised by Anastasia's comments. This fixes multiple function call of
`__translate_sampler_initializer` for function-scope sampler variables.
yaxunl marked 11 inline comments as done.
Comment at: test/CodeGenOpenCL/sampler.cl:2
@@ +1,3 @@
+// RUN: %clang_cc1 %s -emit-llvm -triple spir-unknown-unknown -o - -O0 |
FileCheck %s
+
+#define CLK_ADDRESS_CLAMP_TO_EDGE 2
Fixed and moved to sema test.
===
yaxunl updated this revision to Diff 64154.
yaxunl added a comment.
Turn on -Wspir-compat for spir target by default. Diagnose invalid sampler
value at Sema instead of Codegen.
https://reviews.llvm.org/D21567
Files:
include/clang/AST/OperationKinds.def
include/clang/Basic/DiagnosticGroups.
yaxunl added inline comments.
Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+// OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+ llvm::APSInt intValue;
tstellarAMD wrote:
>
yaxunl updated this revision to Diff 49232.
yaxunl marked 7 inline comments as done.
yaxunl added a comment.
Revised as Anastasis suggested.
Modified mergeTypes() for un-handled case.
Separate sema tests for condition operator to a new file.
Repository:
rL LLVM
http://reviews.llvm.org/D17412
yaxunl added inline comments.
Comment at: lib/AST/ASTContext.cpp:7605
@@ -7604,3 +7604,3 @@
// If two types are identical, they are compatible.
if (LHSCan == RHSCan)
return LHS;
Anastasia wrote:
> I feel like the AS check should be lifted here instead,
yaxunl updated the summary for this revision.
yaxunl added a reviewer: tstellarAMD.
yaxunl removed a subscriber: tstellarAMD.
yaxunl updated this revision to Diff 49781.
yaxunl added a comment.
Add a test for -backend-option with and w/o target machine as suggested by Tom.
http://reviews.llvm.or
yaxunl marked 7 inline comments as done.
Comment at: include/clang/Basic/Attr.td:701
@@ -699,1 +700,3 @@
+def OpenCLNoSVM : Attr {
+ let Spellings = [GNU<"nosvm">];
aaron.ballman wrote:
> Since the attribute is ignored by clang, you should inherit from IgnoredA
yaxunl added a comment.
Thanks for your comments.
It works like this, e.g.
$ cat prog.ll
declare i32 @foo()
define void @use_foo() {
%a = call i32 @foo()
ret void
}
$ cat lib_common.ll
define linkonce_odr i32 @foo() {
ret i32 1;
}
$ cat lib_opt.ll
define linkonce_odr i32 @foo() {
yaxunl added a comment.
My last example is not proper. In real cases, the functions are overridden by
functions with the same name and semantics but optimized for speed.
Besides, we want unused library functions in lib_common.ll and lib_opt.ll to be
dropped, weak attribute does not achieve that
yaxunl added a comment.
Yes we want the overriding functions to be allowed to be inlined.
Repository:
rL LLVM
http://reviews.llvm.org/D18095
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
yaxunl added a comment.
we can turn off inlining when we build lib_common.ll, then do optimization and
inlining after linking with lib_common.ll and lib_opt.ll. Even if linkonce_odr
allows inlining, it is still OK.
Repository:
rL LLVM
http://reviews.llvm.org/D18095
__
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks.
http://reviews.llvm.org/D17955
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listin
yaxunl marked an inline comment as done.
Comment at: include/clang/Basic/Attr.td:701
@@ -699,1 +700,3 @@
+def OpenCLNoSVM : Attr {
+ let Spellings = [GNU<"nosvm">];
aaron.ballman wrote:
> yaxunl wrote:
> > aaron.ballman wrote:
> > > Since the attribute is ignor
yaxunl updated the summary for this revision.
yaxunl removed rL LLVM as the repository for this revision.
yaxunl updated this revision to Diff 51297.
yaxunl added a comment.
Simplify description of this attribute in AttrDocs since it causes some
confusion.
http://reviews.llvm.org/D18095
Files:
yaxunl added a comment.
If __attribute__((linkonce_odr_linkage)) is not a proper name for explicitly
setting linkage, how about __attribute((linkage=linkonce_odr))? This can be
extended to other linkages too.
http://reviews.llvm.org/D18095
___
cfe
yaxunl marked an inline comment as done.
Comment at: test/Frontend/backend-option.c:2
@@ +1,3 @@
+// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - 2>&1 |
FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - -triple
spir-unknown-unkno
yaxunl updated this revision to Diff 51326.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Add -x cl to the test when compiling it for spir target.
http://reviews.llvm.org/D17552
Files:
lib/CodeGen/BackendUtil.cpp
test/Frontend/backend-option.c
Index: test/Frontend/backen
yaxunl added a comment.
Sorry my previous example may have caused some confusion.
Previously I said I wanted to override function definitions. However the only
reason we want to add this attribute is so that unused functions will be
dropped by the linker.
http://reviews.llvm.org/D18095
___
yaxunl marked 15 inline comments as done.
Comment at: lib/AST/ASTContext.cpp:7613
@@ +7612,3 @@
+if (getLangOpts().OpenCL) {
+ if (LHS.getUnqualifiedType() != RHS.getUnqualifiedType() ||
+ LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers())
p
yaxunl removed rL LLVM as the repository for this revision.
yaxunl updated this revision to Diff 51460.
yaxunl marked 13 inline comments as done.
yaxunl added a comment.
Added comments. Revised test.
http://reviews.llvm.org/D17412
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/AS
yaxunl removed rL LLVM as the repository for this revision.
yaxunl updated this revision to Diff 51821.
yaxunl marked 4 inline comments as done.
yaxunl added a comment.
Revised by Aaron's and Anastasia's comments.
Changed error/warning message for invalid usage of nosvm attribute.
http://review
yaxunl created this revision.
yaxunl added reviewers: Anastasia, pxli168, pekka.jaaskelainen.
yaxunl added subscribers: tstellarAMD, cfe-commits.
Add codegen and diagnostics for opencl_unroll_hint attribute.
The code is based on Khronos OpenCL compiler
(https://github.com/KhronosGroup/SPIR/tree/
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 46390.
yaxunl added a comment.
revised as Xiuli suggested.
http://reviews.llvm.org/D16692
Files:
lib/Sema/SemaLookup.cpp
test/SemaOpenCL/builtin.cl
Index: test/SemaOpenCL/builtin.cl
=
yaxunl updated this revision to Diff 46395.
yaxunl marked an inline comment as done.
yaxunl added a comment.
revised as Anastasia suggested.
http://reviews.llvm.org/D16692
Files:
lib/Sema/SemaLookup.cpp
test/SemaOpenCL/builtin.cl
Index: test/SemaOpenCL/builtin.cl
==
yaxunl updated this revision to Diff 46434.
yaxunl marked 17 inline comments as done.
yaxunl added a comment.
Revised as Anastasia and Xiuli suggested.
http://reviews.llvm.org/D16686
Files:
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKind
yxsamliu wrote:
> We're gradually converging on something that looks like this, subject to bike
> shedding the name
I did not know about this PR. It is interesting that our other discussions lead
to similar solution.
I agree that per-instruction metadata is needed, and the metadata should con
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/81700
>From 6006975bbff9fc0f6fb9b8e24a52d4963ceb774c Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Tue, 13 Feb 2024 10:00:21 -0500
Subject: [PATCH] [HIP] Allow partial linking for `-fgpu-rdc`
`-fgpu-rdc` mod
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/81693
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple
&T,
: T.normalize();
}
+// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all
+// input object or archive files.
+class HIPUndefinedFatBinSymbols {
+publi
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple
&T,
: T.normalize();
}
+// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all
+// input object or archive files.
+class HIPUndefinedFatBinSymbols {
+publi
@@ -36,6 +47,146 @@ static std::string normalizeForBundler(const llvm::Triple
&T,
: T.normalize();
}
+// Collect undefined __hip_fatbin* and __hip_gpubin_handle* symbols from all
+// input object or archive files.
+class HIPUndefinedFatBinSymbols {
+publi
yxsamliu wrote:
This PR caused a regression for AMDMIGraphX
https://github.com/ROCm/AMDMIGraphX/blob/develop/src/targets/gpu/include/migraphx/gpu/prefix_scan_sum.hpp#L57
A reduced test case is:
#include
#include
using namespace std;
```
struct A {
int x;
A(int x_) : x(x_) {}
A(co
yxsamliu wrote:
The issue above seems to be a clang bug to me according to
https://cplusplus.github.io/CWG/issues/1467.html
List-initialization of an object or reference of type T is defined as follows:
If T is a class type and the initializer list has a single element of type cv T
or a class
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/81700
>From d84645f035609e7ece76c1f2eb06637826b7b22a Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Tue, 13 Feb 2024 10:00:21 -0500
Subject: [PATCH] [HIP] Allow partial linking for `-fgpu-rdc`
`-fgpu-rdc` mod
yxsamliu wrote:
> This makes sense overall, though it's very complicated. Generally we just
> need to make sure these things are private to one group of files. There's a
> lot more to parse here compared to the `linker-wrapper`.
>
> Do any of these tests check when called with `-r`? I'm assumi
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/81700
>From 1e9c29c4794ed6d60cf54c902cd0f854afd1aace Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Tue, 13 Feb 2024 10:00:21 -0500
Subject: [PATCH] [HIP] Allow partial linking for `-fgpu-rdc`
`-fgpu-rdc` mod
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/81700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
> I still think we should not need this. DefaultIsPrivate is junk that needs to
> be deleted. Querying for LangAS::Default should always give the answer 0 for
> AMDGPU, which is what this is working around.
>
> This clang notion of address space has nothing to do with your trou
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/97132
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
better add a lit test like
https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/rocm-detect.hip
, but for windows only (`REQUIRES: system-windows`), using
`--print-rocm-search-dirs`, and checks `ROCm installation search path`.
https://github.com/llvm/llvm-project/p
yxsamliu wrote:
The current behavior of clang is expected.
when gpu binary is not specified, it is expected to be used for -fgpu-rdc and
the __hip_gpubin_handle_ symbol needs to be external and unique since they may
need to be merged for partial linking. Make them internal will break partial
@@ -840,8 +840,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() {
FatBinStr = new llvm::GlobalVariable(
CGM.getModule(), CGM.Int8Ty,
/*isConstant=*/true, llvm::GlobalValue::ExternalLinkage, nullptr,
- "__hip_fatbin_" + CGM.getCo
yxsamliu wrote:
you need to update lit test clang/test/CodeGenCUDA/device-stub.cu as it fails
now
[clang/test/CodeGenCUDA/device-stub.cu](https://buildkite.com/llvm-project/github-pull-requests/builds/98392#0191c73e-12f8-4cf3-9618-d3fd752f9149)
https://github.com/llvm/llvm-project/pull/107458
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/107734
to avoid being nondeterministic due to random path in distributed build.
>From 725953ccbdb1f57eaac234cf5729f64a9fdbce13 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Sat, 7 Sep 2024 20:32:48 -0400
Sub
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/107483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/107997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,703 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only
-verify=expected,onhost %s
+// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device
-verify=expected,ondevice %s
+
+
+// Tests to ensure that functions with host and device
@@ -905,10 +907,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction()
{
GpuBinaryHandle = new llvm::GlobalVariable(
TheModule, PtrTy, /*isConstant=*/false, Linkage,
/*Initializer=*/
-CudaGpuBinary ? llvm::ConstantPointerNull::get(PtrTy) :
@@ -30,8 +28,6 @@
// RUN: 2>&1 | FileCheck -check-prefix=LD-R %s
// LD-R: Found undefined HIP fatbin symbol: __hip_fatbin_[[ID1:[0-9a-f]+]]
// LD-R: Found undefined HIP fatbin symbol: __hip_fatbin_[[ID2:[0-9a-f]+]]
-// LD-R: Found undefined HIP gpubin handle symbol: __hip_gpu
@@ -175,7 +175,6 @@ __device__ void device_use() {
// HIP-SAME: section ".hipFatBinSegment"
// * variable to save GPU binary handle after initialization
// CUDANORDC: @__[[PREFIX]]_gpubin_handle = internal global ptr null
-// HIPNEF: @__[[PREFIX]]_gpubin_handle_{{[0-9a-f]+}} =
@@ -905,10 +907,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction()
{
GpuBinaryHandle = new llvm::GlobalVariable(
TheModule, PtrTy, /*isConstant=*/false, Linkage,
/*Initializer=*/
-CudaGpuBinary ? llvm::ConstantPointerNull::get(PtrTy) :
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/102569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
> Thank you for the patch, but RFCs for Clang should be published in
> https://discourse.llvm.org/c/clang/6. PRs doesn't have the visibility we want
> RFCs to have.
Discourse topic created:
https://discourse.llvm.org/t/rfc-add-clang-atomic-control-options-and-pragmas/80641.
T
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/102569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/102661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/96872
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7147,7 +7147,9 @@ void Sema::ProcessDeclAttributeList(
// good to have a way to specify "these attributes must appear as a group",
// for these. Additionally, it would be good to have a way to specify "these
// attribute must never appear as a group" for attributes li
@@ -7163,7 +7165,8 @@ void Sema::ProcessDeclAttributeList(
} else if (const auto *A = D->getAttr()) {
Diag(D->getLocation(), diag::err_opencl_kernel_attr) << A;
D->setInvalidDecl();
-} else if (!D->hasAttr()) {
+} else if (!D->hasAttr() &&
--
yxsamliu wrote:
> > Keeping layout in sync makes sense to me, but I'm completely unfamiliar
> > with the windows side.
> > @rnk is there anything else we need to worry about?
>
> I checked, and I think this routes everything over to the MS record layout
> builder, so it should be comprehensive
yxsamliu wrote:
if a.o depends on b.o in libb.a, and b.o depends on c.o in libb.a, will the
linker wrapper be able to link all the dependencies?
For archive of objects with embedded device bitcode, why not creating an
archive of device bitcode for each required target ID and let lld handle the
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/87532
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/87651
>From fcebb8226599160fd6e6e42356f78d0b1d4367d4 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 4 Apr 2024 12:09:04 -0400
Subject: [PATCH] [CUDA][HIP] Fix record layout on Windows
On windows, record
yxsamliu wrote:
> In general, having different C++ ABIs between the host and device seems like
> an ongoing source of tension and bugs.
I agree. However completely switching to Microsoft ABI on device side does not
work with existing device libraries since they assume Itanium mangling.
Theref
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/86838
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/88293
If a processor belongs to CDNA generation, pre-define macro
`__AMDGCN_CDNA_VERSION__` as an integer.
Fixes: https://github.com/ROCm/llvm-project/issues/59
>From 9016641211513ffc9ef5b90eb78f2be064e6d3b5 Mon Sep
yxsamliu wrote:
> Ping.
You situation is similar to overloading resolution of functions called in
global variable initializer. You may consider using a similar approach as
https://reviews.llvm.org/D158247
https://github.com/llvm/llvm-project/pull/93546
yxsamliu wrote:
ping
Our users keep requesting this feature since they want their HIP code works
with both nvcc and clang. I tested it with real HIP apps and did not see
warnings emitted for clang wrapper headers and HIP system headers. Only
warnings for users' own code were emitted. Also sin
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/93601
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error<
"cannot overload %select{__device__|__global__|__host__|__host__
__device__}2 function %3">;
def note_cuda_ovl_candidate_target_mismatch : Note<
"candidate template ignored: target attributes do not match">;
+def wa
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/94765
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error<
"cannot overload %select{__device__|__global__|__host__|__host__
__device__}2 function %3">;
def note_cuda_ovl_candidate_target_mismatch : Note<
"candidate template ignored: target attributes do not match">;
+def wa
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/77359
>From dd589653a94faba3a458134b5713a82886271c86 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 30 May 2024 16:02:37 -0400
Subject: [PATCH] [CUDA][HIP] warn incompatible redeclare
nvcc warns about th
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \
+// RUN: -isystem %S/Inputs -verify %s
+// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \
+// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s
+// RUN: %clang_cc1 -triple x86_
https://github.com/yxsamliu updated
https://github.com/llvm/llvm-project/pull/77359
>From dd589653a94faba3a458134b5713a82886271c86 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 30 May 2024 16:02:37 -0400
Subject: [PATCH 1/2] [CUDA][HIP] warn incompatible redeclare
nvcc warns abou
https://github.com/yxsamliu edited
https://github.com/llvm/llvm-project/pull/77359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu closed
https://github.com/llvm/llvm-project/pull/77359
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
how does a user initialize/populate this type of objects? by calling a builtin
function?
need a SemaCUDA test to make sure it is defined with %clang_cc1 -triple
x86_64-unknown-gnu-linux -aux-triple amdgcn-amd-amdhsa , like
https://github.com/llvm/llvm-project/blob/main/clang/
@@ -128,12 +128,13 @@ enum class CudaArch {
GFX12_GENERIC,
GFX1200,
GFX1201,
+ AMDGCNSPIRV,
Generic, // A processor model named 'generic' if the target backend defines a
// public one.
LAST,
CudaDefault = CudaArch::SM_52,
- HIPDefault = CudaArch::
yxsamliu wrote:
> > how does a user initialize/populate this type of objects? by calling a
> > builtin function?
>
> yes. The builtin functions will come next.
>
> > need a SemaCUDA test to make sure it is defined with %clang_cc1 -triple
> > x86_64-unknown-gnu-linux -aux-triple amdgcn-amd-amd
yxsamliu wrote:
I am wondering whether prefix the builtin type with `__amdgcn_` would be better
since I envision risk of conflicting with reserved names of other compilers or
standard libraries.
https://github.com/llvm/llvm-project/pull/95276
___
cfe
@@ -0,0 +1,95 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu
verde -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple
yxsamliu wrote:
> > I am wondering whether prefix the builtin type with `__amdgcn_` would be
> > better since I envision risk of conflicting with reserved names of other
> > compilers or standard libraries.
>
> In the patch where the type was introduced we had a brief back-and-forth. I
> chec
@@ -0,0 +1,95 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu
verde -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -x hip -aux-triple
amdgcn-amd-amdhsa %s -fsyntax-only -verify
+
+#define __device__ __attribute__((device))
+
+__device__ __amdgcn_buffer_rsrc_t test_buffer_rsrc_t_device() {} //
expected-warning {{non-void fun
@@ -0,0 +1,19 @@
+// REQUIRES: amdgpu-registered-target
+// RUN: %clang_cc1 -fsyntax-only -verify -triple amdgcn -Wno-unused-value %s
+
yxsamliu wrote:
Add a run line:
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64 -aux-triple amdgcn
-Wno-unused-value
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/95061
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/95957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
These builtins generate atomic instructions in IR but the builtin function name
does not have atomic. Is that a concern? Should they be renamed with atomic in
name?
https://github.com/llvm/llvm-project/pull/95395
___
cfe-commits maili
https://github.com/yxsamliu approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/94830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yxsamliu approved this pull request.
https://github.com/llvm/llvm-project/pull/95276
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yxsamliu wrote:
maybe add a test for non-constant offset?
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
https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/96262
None
>From 16659ca492234b234cc5da2f36563e1d8009620f Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Thu, 20 Jun 2024 21:00:58 -0400
Subject: [PATCH] Enable ASAN in amdgpu toolchain for OpenCL
---
clang
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C,
IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth());
IntPtrTy = llvm::IntegerType::get(LLVMContext,
C.getTargetInfo().getMaxPointerWidth());
- Int8PtrTy = llvm::PointerType::get(LL
@@ -2047,9 +2047,9 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const
char *GlobalName) {
llvm::Type *CtorPFTy = llvm::PointerType::get(CtorFTy,
TheModule.getDataLayout().getProgramAddressSpace());
- // Get the type of a ctor entry, { i32, void ()*, i8* }.
+ /
1101 - 1200 of 1680 matches
Mail list logo