@@ -0,0 +1,188 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm::hlsl::rootsig;
+
+namespace clang {
+namespace hlsl {
+
+static std::string FormatTokenKinds(ArrayRef Kinds) {
+ std::string TokenString;
+ llvm::
@@ -0,0 +1,110 @@
+//===--- ParseHLSLRootSignature.h ---*- 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: Ap
@@ -0,0 +1,110 @@
+//===--- ParseHLSLRootSignature.h ---*- 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: Ap
@@ -0,0 +1,188 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm::hlsl::rootsig;
+
+namespace clang {
+namespace hlsl {
+
+static std::string FormatTokenKinds(ArrayRef Kinds) {
+ std::string TokenString;
+ llvm::
@@ -0,0 +1,188 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm::hlsl::rootsig;
+
+namespace clang {
+namespace hlsl {
+
+static std::string FormatTokenKinds(ArrayRef Kinds) {
+ std::string TokenString;
+ llvm::
@@ -0,0 +1,110 @@
+//===--- ParseHLSLRootSignature.h ---*- 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: Ap
@@ -0,0 +1,188 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm::hlsl::rootsig;
+
+namespace clang {
+namespace hlsl {
+
+static std::string FormatTokenKinds(ArrayRef Kinds) {
bogner wrote:
You c
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/132967
___
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/131942
___
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/132828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/133287
___
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/133800
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bogner wrote:
I'm not entirely convinced the generic `ParsedParamState` is the right level of
abstraction. In some ways the declarative nature is nice, but I think it's
quite a bit more complex than a simple recursive descent here.
Warning - lots of untested and never compiled code follows. C
https://github.com/bogner approved this pull request.
The fact that we get memcpy here points out some of the issues we have with
representing cbuffers - it would really be nicer if this ended up generating
elementwise copies instead. However, I think fixing that is out of the scope of
this ch
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/136234
___
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.
Looks good
https://github.com/llvm/llvm-project/pull/136386
___
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/136386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,29 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; Test that only metadata nodes that are valid in DXIL are allowed through
+
+target triple = "dxilv1.0-unknown-shadermodel6.0-compute"
+
+; Function Attrs: noinline nounwind memory(readwrite, inaccessiblemem: non
@@ -0,0 +1,29 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; Test that only metadata nodes that are valid in DXIL are allowed through
+
+target triple = "dxilv1.0-unknown-shadermodel6.0-compute"
+
+; Function Attrs: noinline nounwind memory(readwrite, inaccessiblemem: non
@@ -0,0 +1,29 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; Test that only metadata nodes that are valid in DXIL are allowed through
+
+target triple = "dxilv1.0-unknown-shadermodel6.0-compute"
+
+; Function Attrs: noinline nounwind memory(readwrite, inaccessiblemem: non
@@ -176,6 +185,9 @@ class DXILPrepareModule : public ModulePass {
VersionTuple ValVer = MetadataInfo.ValidatorVersion;
bool SkipValidation = ValVer.getMajor() == 0 && ValVer.getMinor() == 0;
+// construct whitelist of valid metadata node kinds
bogn
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/137004
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner commented:
Description / commit message needs to be updated to match how this ended up,
but otherwise this is looking pretty good. A couple of minor comments inline.
https://github.com/llvm/llvm-project/pull/136386
___
cfe-co
@@ -0,0 +1,39 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; This test tests the whitelist inside of DxilPrepare.cpp.
+; It ensures that certain metadata nodes are removed that aren't
+; in the whitelist, and that certain nodes may remain that
+; are on the whitelist.
+
+
@@ -1,108 +1,160 @@
-// RUN: %clang_cc1 -std=hlsl202x -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 \
-// RUN: -DFNATTRS="noundef nofpclass(nan inf)"
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/137898
___
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/137898
These tests had checks across multiple functions, because none of the hlsl
header implementation functions were inlined. Switch the run lines to use -O1
instead of -disable-llvm-passes and rewrite the tests to a
@@ -106,3 +102,17 @@ float3 test_lerp_uint64_t3(uint64_t3 p0) { return lerp(p0,
p0, p0); }
// CHECK: %hlsl.lerp = call reassoc nnan ninf nsz arcp afn <4 x float>
@llvm.[[TARGET]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x
float> %{{.*}})
// CHECK: ret <4 x floa
@@ -277,6 +277,12 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
// lerp builtins overloads
//===--===//
+template
+constexpr __detail::enable_if_t<(N > 1 && N <= 4), vector>
-
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/137877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/137877
>From a6c359a02712277ba2feab9e2f1be1caf8fa650e Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 29 Apr 2025 11:59:37 -0700
Subject: [PATCH] [HLSL] Overloads for `lerp` with a scalar weight
This adds overl
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/137877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,108 +1,160 @@
-// RUN: %clang_cc1 -std=hlsl202x -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 \
-// RUN: -DFNATTRS="noundef nofpclass(nan inf)"
bogner wrote:
> I have a strong suspicion all the `*-overload.hlsl` tests have the same
> mistake and are also incorrect and need to updated. Can you file a ticket for
> investigating\cleaning up the other overload tests. Not work you have to do,
> but we should at least track that it needs ot
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/137898
Rate limit ยท GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-se
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/137898
___
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/137985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -106,3 +102,17 @@ float3 test_lerp_uint64_t3(uint64_t3 p0) { return lerp(p0,
p0, p0); }
// CHECK: %hlsl.lerp = call reassoc nnan ninf nsz arcp afn <4 x float>
@llvm.[[TARGET]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x
float> %{{.*}})
// CHECK: ret <4 x floa
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/134570
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/135876
>From de6d197193e758d649cbebe6d96cd8e5af95d9ac Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 15 Apr 2025 15:05:21 -0700
Subject: [PATCH 1/2] [HLSL] Don't invoke `dxv` from `clang-dxc` for text
output
@@ -3278,6 +3284,9 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD)
{
<< static_cast(RT);
}
}
+
+ if (!HasBinding && VD->getType()->isHLSLResourceRecord())
+SemaRef.Diag(VD->getLocation(), diag::warn_hlsl_implicit_binding);
bog
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/135909
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/135909
>From cabe20bfd129a574f978c2a10e4f66a04cb85794 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Wed, 2 Apr 2025 11:34:00 -0700
Subject: [PATCH 1/6] [HLSL] Add a warning for implicit bindings
Implicit bindings
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -Wno-error=hlsl-implicit-binding -triple
dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify
+
+// expected-warning@+1 {{resource has implicit register binding}}
+cbuffer cb0 {
+ int a;
+}
+
+// No warning - this is an elemen
@@ -14,6 +14,12 @@ RWBuffer c;
// No warning - explicit binding.
RWBuffer d : register(u0);
+// No warning - explicit binding.
+RWBuffer dd : register(space1);
bogner wrote:
Yes, you're correct. I've updated the latest, though this is commented out now
becau
@@ -3278,6 +3284,9 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD)
{
<< static_cast(RT);
}
}
+
+ if (!HasBinding && VD->getType()->isHLSLResourceRecord())
bogner wrote:
Good catch! Added some tests with arrays and updated this to
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/135876
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/135909
>From cabe20bfd129a574f978c2a10e4f66a04cb85794 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Wed, 2 Apr 2025 11:34:00 -0700
Subject: [PATCH 1/2] [HLSL] Add a warning for implicit bindings
Implicit bindings
bogner wrote:
> As a general comment, your approach of just checking for the existence of the
> binding attribute may not in itself be sufficient. Consider this PR:
> https://github.com/llvm/llvm-project/pull/135287/files There is a potential
> case where the binding attribute has a slot = -1,
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/136747
___
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/136386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
@@ -161,6 +161,15 @@ class DXILPrepareModule : public ModulePass {
Builder.getPtrTy(PtrTy->getAddressSpace(;
}
+ static llvm::SmallVector getCompatibleInstructionMDs(Module &M) {
+llvm::SmallVector ret = {
bogner wrote:
Bet
https://github.com/bogner commented:
This looks pretty good, but the test needs to also cover the positive cases. We
should show that dx.nonuniform and MD_range, for example, are *not* removed.
This can probably be done in the same test file unless you think it's
worthwhile to split it up.
ht
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
@@ -0,0 +1,80 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+source_filename = "C:\\Users\\jbatista\\Desktop\\particle_life.hlsl"
+target datalayout =
"e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
+target triple = "dxilv1.0-unknown-shader
bogner wrote:
> Are there offload test suite tests to go with this?
https://github.com/llvm-beanz/offload-test-suite/pull/83
https://github.com/llvm/llvm-project/pull/137391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
@@ -0,0 +1,39 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; This test tests the whitelist inside of DxilPrepare.cpp.
+; It ensures that certain metadata nodes are removed that aren't
+; in the whitelist, and that certain nodes may remain that
+; are on the whitelist.
---
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/136386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,39 @@
+; RUN: opt -S --dxil-prepare %s | FileCheck %s
+
+; This test tests the whitelist inside of DxilPrepare.cpp.
+; It ensures that certain metadata nodes are removed that aren't
+; in the whitelist, and that certain nodes may remain that
+; are on the whitelist.
+
+
@@ -11360,6 +11360,14 @@ static void AnalyzeAssignment(Sema &S, BinaryOperator
*E) {
static void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
SourceLocation CContext, unsigned diag,
bool pruneControl
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/135830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -309,6 +309,9 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args,
StringRef BoundArch,
}
bool HLSLToolChain::requiresValidation(DerivedArgList &Args) const {
+ if (!Args.hasArg(options::OPT_dxc_Fo))
+return false;
bogner wrote:
I'm not sure I
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/135876
Running `clang-dxc` with textual output was emitting various spurious warnings
(if `dxv` wasn't on your path) or errors (if it was). Avoid these by not
attempting to run this tool when it doesn't make sense to d
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/137378
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -189,6 +201,9 @@ class DXILPrepareModule : public ModulePass {
for (auto &BB : F) {
IRBuilder<> Builder(&BB);
for (auto &I : make_early_inc_range(BB)) {
+
+ I.dropUnknownNonDebugMetadata(DXILCompatibleMDs);
+
if (I.getOpcode() == Ins
https://github.com/bogner commented:
A minor comment on naming of the builtins but this generally looks good
https://github.com/llvm/llvm-project/pull/135120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
@@ -1,34 +1,117 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -Wno-hlsl-implicit-binding -triple
dxil-pc-shadermodel6.3-library -emit-llvm -disabl
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/135120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4801,6 +4801,18 @@ def HLSLResourceGetPointer : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLResourceCreatePoisonHandle : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_resource_createpoisonhandle"];
+ let Attributes = [NoThrow];
+
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/137877
This adds overloads for the `lerp` function that accept a scalar for the weight
parameter by splatting it into the appropriate vector.
Fixes #137827
>From 64cc675721623a793d06a1208089dc9431409835 Mon Sep 17 00:
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/135120
___
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/137720
___
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/137690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bogner commented:
A couple of minor comments. The direction seems reasonable to me, but it'd be
good to get someone more familiar with the Parser and AST to weigh in.
https://github.com/llvm/llvm-project/pull/137690
___
cfe-commits
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
@@ -5209,6 +5211,92 @@ void
Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) {
}
}
+void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs)
{
+ assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list");
+ IdentifierInfo *R
bogner wrote:
This doesn't seem right. Are we just misusing `DiagnosticInfoUnsupported` here?
The `Function` argument for `DiagnosticInfoWithLocationBase` is clearly meant
to be part of the location (as evidenced by the "in function XYZ" part of the
message). I suspect that we should really be
@@ -139,7 +139,7 @@ class DiagnosticInfo {
using DiagnosticHandlerFunction = std::function;
class DiagnosticInfoGeneric : public DiagnosticInfo {
- const Twine &MsgStr;
+ const Twine MsgStr;
bogner wrote:
All of the Twine usage in Diagnostic info is super s
@@ -756,9 +756,10 @@ class OpLowerer {
case Intrinsic::not_intrinsic:
continue;
default: {
-DiagnosticInfoUnsupported Diag(
-F, "Unsupported intrinsic for DXIL lowering");
-M.getContext().diagnose(Diag);
+std::string Msg =
@@ -0,0 +1,7 @@
+// RUN: %if clang-dxc %{not %clang_dxc -T lib_6_3 %s 2>&1 | FileCheck %s %}
bogner wrote:
I don't think there's a `clang-dxc` feature, so I suspect this just never runs
at all. This will fail if the DirectX backend isn't available, so I don't th
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/136580
___
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/137999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,39 @@
+//===- HLSLTargetInfo.h
---===//
+//
+// 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
https://github.com/bogner commented:
This is looking pretty good, though I have some misgivings about
`CommonHLSLTargetCodeGenInfo` and think it might be better to introduce a
`HLSLLayoutBuilder` that can be used by targets as necessary instead. If you
take that suggestion a couple of my comme
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/124886
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
-void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) {
- if (D->getStorageClass() == SC_Static) {
-// For static inside cbuffer, take as global st
@@ -0,0 +1,39 @@
+//===- HLSLTargetInfo.h
---===//
+//
+// 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
@@ -56,9 +75,18 @@ llvm::Type
*DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM,
return llvm::TargetExtType::get(Ctx, TypeName, {ElemType}, Ints);
}
- case llvm::dxil::ResourceClass::CBuffer:
-llvm_unreachable("dx.CBuffer handles are not implemented yet");
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
-void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) {
- if (D->getStorageClass() == SC_Static) {
-// For static inside cbuffer, take as global st
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
-void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) {
- if (D->getStorageClass() == SC_Static) {
-// For static inside cbuffer, take as global st
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
-void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) {
- if (D->getStorageClass() == SC_Static) {
-// For static inside cbuffer, take as global st
@@ -0,0 +1,39 @@
+//===- HLSLTargetInfo.h
---===//
+//
+// 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,39 @@
+//===- HLSLTargetInfo.h
---===//
+//
+// 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
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
-void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) {
- if (D->getStorageClass() == SC_Static) {
-// For static inside cbuffer, take as global st
https://github.com/bogner approved this pull request.
https://github.com/llvm/llvm-project/pull/127670
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
801 - 900 of 967 matches
Mail list logo