@@ -556,46 +562,120 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
@@ -559,46 +563,123 @@ void SemaHLSL::handleShaderAttr(Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
-void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) {
- if (!AL.isArgIdent(0)) {
-Diag(AL.getLoc(), diag::err_attribute_argument_type)
-
https://github.com/bogner approved this pull request.
A couple more very minor comments then this LGTM!
https://github.com/llvm/llvm-project/pull/107160
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
@@ -387,6 +387,23 @@ float3 asin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float4 asin(float4);
+//===--===//
+// asuint builtins
+//===--
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/107292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner commented:
This is going in the right direction but the tests need some work. I made a
couple of comments to point you in the right direction.
We also need to make sure we're testing all of the cases we care about, so we
need tests with inputs of `int`, `uint`, vector
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
bogner wrote:
It's probably better if we remove the `-disable-llvm-passes` and
@@ -387,6 +387,23 @@ float3 asin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float4 asin(float4);
+//===--===//
+// asuint builtins
+//===--
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
+
+
+// CHECK-LABEL: test_asuint4_uint
+// CHECK: ret i32 %0
+export uint test_asuint4_uint(uint
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
+
+
+// CHECK-LABEL: test_asuint4_uint
+// CHECK: ret i32 %0
+export uint test_asuint4_uint(uint
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
+
+
+// CHECK-LABEL: test_asuint4_uint
+// CHECK: ret i32 %0
+export uint test_asuint4_uint(uint
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK
+
+// CHECK: %hlsl.select = select i1
+// CHECK: ret i32 %hlsl.selec
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK
+
+// CHECK: %hlsl.select = select i1
+// CHECK: ret i32 %hlsl.selec
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK
+
+// CHECK: %hlsl.select = select i1
+// CHECK: ret i32 %hlsl.selec
@@ -1603,6 +1603,32 @@ double3 saturate(double3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_saturate)
double4 saturate(double4);
+//===--===//
+// select builtins
+//===---
@@ -2692,14 +2692,19 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
return CGF.CGM.createOpenCLIntToSamplerConversion(E, CGF);
case CK_HLSLVectorTruncation: {
-assert(DestTy->isVectorType() && "Expected dest type to be vector type");
+assert((DestTy->
@@ -2032,26 +2032,42 @@ static bool IsVectorConversion(Sema &S, QualType
FromType, QualType ToType,
if (S.Context.hasSameUnqualifiedType(FromType, ToType))
return false;
+ // HLSL allows implicit truncation of vector types.
+ if (S.getLangOpts().HLSL) {
+auto *ToE
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4828,18 +4830,23 @@ Sema::PerformImplicitConversion(Expr *From, QualType
ToType,
}
case ICK_HLSL_Vector_Truncation: {
// Note: HLSL built-in vectors are ExtVectors. Since this truncates a
- // vector to a smaller vector, this can only operate on argument
https://github.com/bogner approved this pull request.
Just a few style nitpicks. LG!
https://github.com/llvm/llvm-project/pull/104844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/106811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const
TargetExtType *Ty) {
ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts));
}
+ // DirectX intangible types
+ if (Name.starts_with("dx."))
bogner wrote:
Yeah, it's definitely
@@ -0,0 +1,52 @@
+//===-
DirectX.cpp-===//
+//
+// 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: Apa
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s
+
+void foo(__hlsl_resource_t res);
+
+// CHECK: define void
@"?bar@@YAXU__hlsl_resource_t@@@Z"(target("dx.TypedBuffer", <4 x float>, 1, 0,
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const
TargetExtType *Ty) {
ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts));
}
+ // DirectX intangible types
+ if (Name.starts_with("dx."))
+return TargetTypeInfo(PointerType::get(C, 0), Ta
@@ -0,0 +1,33 @@
+; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Make sure SPIRV operation function calls for step are lowered correctly.
+
+; CHECK-D
@@ -320,6 +321,28 @@ static Value *expandPowIntrinsic(CallInst *Orig) {
return Exp2Call;
}
+static Value *expandStepIntrinsic(CallInst *Orig) {
+
+ Value *X = Orig->getOperand(0);
+ Value *Y = Orig->getOperand(1);
+ Type *Ty = X->getType();
+ IRBuilder<> Builder(Orig);
+
@@ -0,0 +1,100 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
+// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_
@@ -0,0 +1,79 @@
+; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s
--check-prefix=CHECK
+; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s |
FileCheck %s --check-prefix=CHECK
+
+; Make sure dxil operation function calls for step are generate
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/106860
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/107129
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -387,6 +387,23 @@ float3 asin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float4 asin(float4);
+//===--===//
+// asuint builtins
+//===--
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -verify-ignore-unexpected
bogner wrote:
I don't think we should be using `-verify-ignore-unex
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -verify-ignore-unexpected
+
+
+export uint4 test_asuint_too_many_arg(float p0, float p1) {
+ return __builtin_
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/107129
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/104856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,52 @@
+//===-
DirectX.cpp-===//
+//
+// 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: Apa
@@ -387,6 +387,65 @@ float3 asin(float3);
_HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin)
float4 asin(float4);
+//===--===//
+// asuint builtins
+//===--
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/107292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
Can we test this?
https://github.com/llvm/llvm-project/pull/108035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
It's a little awkward to do all three of these things together in one change,
but it all looks simple and correct.
https://github.com/llvm/llvm-project/pull/107973
___
cfe-commits mailing list
cfe-
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/107954
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6169,9 +6169,13 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
// Data gathered from HLSL resource attributes
llvm::dxil::ResourceClass ResourceClass;
uint8_t IsROV : 1;
-Attributes(llvm::dxil::ResourceClass ResourceClass,
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// expected-error@+1{{'row_access' attribute cannot be applied to a
declaration}}
+[[hlsl::row_access]] __hlsl_resource_t res0;
+
+// expected-error@+1{{HLSL resource needs to
@@ -6169,9 +6169,13 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
// Data gathered from HLSL resource attributes
llvm::dxil::ResourceClass ResourceClass;
uint8_t IsROV : 1;
-Attributes(llvm::dxil::ResourceClass ResourceClass,
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/104844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/108097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -296,12 +296,13 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl
*D, GlobalVariable *GV) {
for (auto *FD : RD->fields()) {
const auto *HLSLResAttr = FD->getAttr();
const auto *HLSLResClassAttr = FD->getAttr();
+const auto *ROVAttr = FD->getAttr();
@@ -116,12 +116,17 @@ struct BuiltinTypeDeclBuilder {
QualType(TTD->getTypeForDecl(), 0));
}
// add handle member
-llvm::SmallVector Attrs;
Attr *ResourceClassAttr =
HLSLResourceClassAttr::CreateImplicit(Record->getASTContext(), RC);
A
bogner wrote:
What is this attribute supposed to mean? I think we need some design here
before we create the attribute, as it isn't clear to me that a single integer
covers our needs. The texture kinds that need to be representable by this and
whatever other attributes we design are 1D, 2D, 3D
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/103489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
> You're right, a single integer won't be able to match to all those dimension
> kinds. I propose we make an enum, much like llvm::ResourceKind, called
> TextureDimensionKind, that enumerates all the texture kinds you listed above.
> Then I can make the attribute take a single en
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/104479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
The `GENERATE_HLSL_INTRINSIC_FUNCTION` abstraction parts of this look fairly
reasonable, but do we really want/need dx and spirv intrinsics for the "all"
function? This is trivial to generate pretty generic IR for and I don't really
see the value of maintaining that the user wrot
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
@@ -482,15 +484,18 @@ static BuiltinTypeDeclBuilder
setupBufferType(CXXRecordDecl *Decl, Sema &S,
bool IsROV) {
return BuiltinTypeDeclBuilder(Decl)
.addHandleMember()
- .addDefaultHandleConstructor(S, RC)
- .annot
@@ -7333,12 +7333,12 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
} else {
Slot = Str;
}
-
+ QualType Ty = ((clang::ValueDecl *)D)->getType();
bogner wrote:
LLVM avoids C-style casting. This would normally be spelled `QualType QT =
@@ -119,8 +119,10 @@ struct BuiltinTypeDeclBuilder {
ResourceKind RK, bool IsROV) {
if (Record->isCompleteDefinition())
return *this;
-Record->addAttr(HLSLResourceAttr::CreateImplicit(Record->getASTContext(),
-
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
@@ -7367,8 +7367,72 @@ static void handleHLSLResourceBindingAttr(Sema &S, Decl
*D,
return;
}
- // FIXME: check reg type match decl. Issue
- // https://github.com/llvm/llvm-project/issues/57886.
+ VarDecl *VD = dyn_cast(D);
+ HLSLBufferDecl *BD = dyn_cast(D);
+
+ if
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/87346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/88354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -834,34 +841,41 @@ void
DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(
OffendingDecl))
return;
-// We would like to emit the diagnostic even if -Wunguarded-availability is
-// not specified for deployment
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/95155
These are the HLSL specific fixes from #93193. Thanks @klensy!
>From ef5fbb85ba550c1baefc6357e118f339e6d7d5bd Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 11 Jun 2024 10:48:30 -0700
Subject: [PATCH] [H
@@ -4,9 +4,8 @@
void test() {
// CHECK: VarDecl {{.*}} used f3 'vector':'float
__attribute__((ext_vector_type(3)))' cinit
- // CHECK-NEXt: ImplicitCastExpr {{.*}} 'vector':'float
__attribute__((ext_vector_type(3)))'
- // CHECK-NEXt: ImplicitCastExpr {{.*}} 'float'
-
@@ -4,9 +4,8 @@
void test() {
// CHECK: VarDecl {{.*}} used f3 'vector':'float
__attribute__((ext_vector_type(3)))' cinit
- // CHECK-NEXt: ImplicitCastExpr {{.*}} 'vector':'float
__attribute__((ext_vector_type(3)))'
- // CHECK-NEXt: ImplicitCastExpr {{.*}} 'float'
-
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/95155
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/95489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/95999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/96335
The resource class isn't HLSL specific, and we'll need to use it in the DirectX
backend as well.
I've also removed the "invalid" enum value since it isn't needed or used, which
necessitates fixing up the clang a
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/96335
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// previously, this test would result in an error shown below on the line that
+// declares variable a in struct Eg9:
+// error: use of undeclared identifier
+// 'SV_Dispat
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s
-verify
+
+// previously, this test would result in an error shown below on the line that
+// declares variable a in struct Eg9:
+// error: use of undeclared identifier
+// 'SV_Dispat
https://github.com/bogner commented:
Please add some tests that show that we still handle bitfields correctly in
HLSL with this change.
https://github.com/llvm/llvm-project/pull/96346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
bogner wrote:
> > I don't really understand the rationale for this, and it's kind of
> > annoying. Most of the compiler's flags behave in the "last one wins"
> > fashion (such as `-O2` and `-O0`) and it's always been convenient to add
> > the flag you want at the end. Why treat action flags an
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/93847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -834,34 +829,55 @@ void
DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(
OffendingDecl))
return;
-// We would like to emit the diagnostic even if -Wunguarded-availability is
-// not specified for deployment
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -114,18 +114,21 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts,
// here because we don't want to allow arbitrary orderings.
ParsedAttributes CXX11Attrs(AttrFactory);
MaybeParseCXX11Attributes(CXX11Attrs, /*MightBeObjCMessageSend*/ true);
- ParsedAttributes G
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/93879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
Looks like this missed a spot, causing the .hlsl to spir-v tests to fail. I've
put up a fix in #88939
https://github.com/llvm/llvm-project/pull/88455
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
bogner wrote:
> a) Thanks!; b) apologies for the noise; c) this was actually done on purpose,
> I actively eschewed changing Logical SPIRV because it wasn't actually clear
> to me if in the long run it'd have the same AS map / would use numerical 1
> for globals. If Logical SPIRV is going to g
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/88939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/89309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
This feels complicated and not very scalable. I don't think we should be
implementing ad-hoc vtables via a map of function pointers.
It might be worth sketching out a design for an API that can handle the various
cases we're running into here. We need to be able to handle (1) ope
https://github.com/bogner approved this pull request.
Yeah, this is definitely better.
https://github.com/llvm/llvm-project/pull/89130
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
Nathan =?utf-8?q?Gauër?= ,
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
@@ -3101,3 +3130,68 @@ CodeGenFunction::GenerateCapturedStmtFunction(const
CapturedStmt &S) {
return F;
}
+
+namespace {
+// Returns the first convergence entry/loop/anchor instruction found in
@@ -7334,6 +7334,81 @@ static void handleHLSLShaderAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
+static void DiagnoseHLSLResourceRegType(Sema &S, SourceLocation &ArgLoc,
+Decl *D, StringRef &Slot) {
+ // Sa
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -478,33 +478,35 @@ void HLSLExternalSemaSource::defineTrivialHLSLTypes() {
/// Set up common members and attributes for buffer types
static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S,
- ResourceClass RC,
@@ -45,7 +45,7 @@ void foo2() {
extern RWBuffer U2 : register(u5);
}
// FIXME: expect-error once fix
https://github.com/llvm/llvm-project/issues/57886.
-float b : register(u0, space1);
+// float b : register(u0, space1) {}
bogner wrote:
Shouldn't we be addi
@@ -7334,6 +7334,81 @@ static void handleHLSLShaderAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
D->addAttr(NewAttr);
}
+static void DiagnoseHLSLResourceRegType(Sema &S, SourceLocation &ArgLoc,
+Decl *D, StringRef &Slot) {
+ // Sa
@@ -0,0 +1,44 @@
+set(LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ BitWriter
+ Core
+ BinaryFormat
+ MC
+ Target
+ TransformUtils
+ Analysis
+ Passes
+ IRReader
+ Object
+ Option
+ Support
+ TargetParser
+ CodeGen
+ LTO
+ )
+
+set(LLVM_TARGET_DEFINITIONS NVLi
301 - 400 of 866 matches
Mail list logo