Author: Justin Bogner
Date: 2023-11-03T19:03:00-07:00
New Revision: 66785ff779f22a7ae5414961972e6ff36709ad08
URL:
https://github.com/llvm/llvm-project/commit/66785ff779f22a7ae5414961972e6ff36709ad08
DIFF:
https://github.com/llvm/llvm-project/commit/66785ff779f22a7ae5414961972e6ff36709ad08.diff
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/71265
RWBuffer doesn't have a default type in dxc's implementation, so it
shouldn't have one in clang either.
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/71265
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
Author: Justin Bogner
Date: 2023-11-30T10:30:26-08:00
New Revision: 9ce6298b63e3bdd3e3468b30ef5c55743ff1f776
URL:
https://github.com/llvm/llvm-project/commit/9ce6298b63e3bdd3e3468b30ef5c55743ff1f776
DIFF:
https://github.com/llvm/llvm-project/commit/9ce6298b63e3bdd3e3468b30ef5c55743ff1f776.diff
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/73967
A few changes to HLSLExternalSemaSource and its BuiltinTypeDeclBuilder
to make defining buffer types less verbose. This will make it a lot
easier to see what the differences between the various buffer types
are onc
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/71265
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/71265
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/73967
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/73967
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/71265
>From 1779fd08dad4f03ae5e9f1803b8ea3d7dc77c093 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Fri, 3 Nov 2023 19:03:00 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?=
=?UTF-
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/73967
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/74897
None
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/74897
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/74897
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/74897
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s
bogner wrote:
That's a fair point. I went ahead and changed the triple to specify a pixel
shader to avoid any confusion /
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/74897
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/74897
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/78225
None
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/78225
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/78225
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/78225
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/78225
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104447
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104447
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -13,27 +13,52 @@
#include "DXILShaderFlags.h"
#include "DirectX.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
+#include "llvm/InitializePasses.h"
#inclu
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -119,6 +123,119 @@ class OpLowerer {
});
}
+ Value *createTmpHandleCast(Value *V, Type *Ty) {
+Function *CastFn = Intrinsic::getDeclaration(&M, Intrinsic::dx_cast_handle,
+ {Ty, V->getType()});
+CallInst *Cast =
@@ -117,6 +119,10 @@ class ResourceInfo {
MSInfo MultiSample;
+ // We need a default constructor if we want to insert this in a MapVector.
+ ResourceInfo() {}
+ friend class MapVector;
bogner wrote:
It was, yes, but the latest version no longer needs th
@@ -119,6 +123,119 @@ class OpLowerer {
});
}
+ Value *createTmpHandleCast(Value *V, Type *Ty) {
+Function *CastFn = Intrinsic::getDeclaration(&M, Intrinsic::dx_cast_handle,
+ {Ty, V->getType()});
+CallInst *Cast =
@@ -119,6 +123,119 @@ class OpLowerer {
});
}
+ Value *createTmpHandleCast(Value *V, Type *Ty) {
+Function *CastFn = Intrinsic::getDeclaration(&M, Intrinsic::dx_cast_handle,
+ {Ty, V->getType()});
+CallInst *Cast =
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -683,6 +685,14 @@ def Dot4 : DXILOp<56, dot4> {
let attributes = [Attributes];
}
+def CreateHandle : DXILOp<57, createHandle> {
+ let Doc = "creates the handle to a resource";
+ // ResourceClass, RangeID, Index, NonUniform
+ let arguments = [Int8Ty, Int32Ty, Int32Ty,
@@ -119,6 +123,119 @@ class OpLowerer {
});
}
+ Value *createTmpHandleCast(Value *V, Type *Ty) {
+Function *CastFn = Intrinsic::getDeclaration(&M, Intrinsic::dx_cast_handle,
+ {Ty, V->getType()});
+CallInst *Cast =
@@ -0,0 +1,61 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
bogner wrote:
Added a resource that does both of these things to the tests.
https://github.com/llvm/llvm-project/pull/104251
___
llvm-branch-commits mail
@@ -0,0 +1,58 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare i32 @some_val();
+
+define void @test_bindings() {
+ ; RWBuffer Buf : register(u5, space3)
+ %typed0 = call target("dx.TypedBuffer", <4 x float>, 1, 0,
@@ -0,0 +1,53 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.0-compute"
+
+declare i32 @some_val();
+
+define void @test_buffers() {
+ ; RWBuffer Buf : register(u5, space3)
+ %typed0 = call target("dx.TypedBuffer", <4 x float>, 1, 0,
@@ -119,6 +123,142 @@ class OpLowerer {
});
}
+ /// Create a cast between a `target("dx")` type and `dx.types.Handle`, which
+ /// is intended to be removed by the end of lowering. This is used to allow
+ /// lowering of ops which need to change their return or argume
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104446
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104446
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104446
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -12,13 +12,27 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
+#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
static void prettyPrintResources(raw_ostream &OS,
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104446
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -10,23 +10,235 @@
#include "DXILResourceAnalysis.h"
#include "DirectX.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Analysis/DXILResource.h"
#include "llvm/IR/PassManager.h"
+#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
+#include "llvm/Support/FormatAdapt
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104447
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104447
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/106645
This is a follow up to #104252 that returns a struct instead of a vector. If we
decide this is better, I'll presumably include the change in that PR rather
than actually doing a separate follow up.
@@ -683,6 +686,17 @@ def CreateHandle : DXILOp<57, createHandle> {
let stages = [Stages];
}
+def BufferLoad : DXILOp<68, bufferLoad> {
+ let Doc = "reads from a TypedBuffer";
+ // Handle, Coord0, Coord1
+ let arguments = [HandleTy, Int32Ty, Int32Ty];
+ let result = Overl
@@ -236,6 +236,59 @@ class OpLowerer {
lowerToBindAndAnnotateHandle(F);
}
+ void lowerTypedBufferLoad(Function &F) {
+IRBuilder<> &IRB = OpBuilder.getIRB();
+Type *Int32Ty = IRB.getInt32Ty();
+
+replaceFunction(F, [&](CallInst *CI) -> Error {
+ IRB.Se
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+ ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+ ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+ ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104252
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner edited
https://github.com/llvm/llvm-project/pull/104252
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104252
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+ ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.
@@ -0,0 +1,102 @@
+; RUN: opt -S -dxil-op-lower %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.6-compute"
+
+declare void @scalar_user(float)
+declare void @vector_user(<4 x float>)
+
+define void @loadfloats() {
+ ; CHECK: [[BIND:%.*]] = call %dx.types.Handle @dx.op.
https://github.com/bogner closed
https://github.com/llvm/llvm-project/pull/106645
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
bogner wrote:
This isn't the direction we ended up going.
https://github.com/llvm/llvm-project/pull/106645
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104253
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104253
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -30,6 +30,9 @@ def int_dx_handle_fromBinding
[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i1_ty],
[IntrNoMem]>;
+def int_dx_typedBufferLoad
bogner wrote:
No, I plan to add that in a follow up.
https://github.com/llvm/llvm-
@@ -450,6 +462,10 @@ CallInst *DXILOpBuilder::createOp(dxil::OpCode OpCode,
ArrayRef Args,
return *Result;
}
+StructType *DXILOpBuilder::getResRetType(Type *ElementTy) {
+ return ::getResRetType(ElementTy);
bogner wrote:
This pattern isn't great, and I ex
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104252
>From 2f317012985068f7130cdf4976d8821924d404c3 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Mon, 9 Sep 2024 12:16:36 -0700
Subject: [PATCH] Improve comments, move code for clarity
Created using spr 1.3.5-b
@@ -267,45 +267,38 @@ Examples:
@llvm.dx.handle.fromHeap.tdx.RawBuffer_v4f32_1_0(
i32 2, i1 false)
-Buffer Loads and Stores
-
-*relevant types: Buffers*
-
-We need to treat buffer loads and stores from "dx.TypedBuffer"
@@ -259,6 +259,114 @@ class OpLowerer {
lowerToBindAndAnnotateHandle(F);
}
+ /// Replace uses of \c V with the values in the `dx.ResRet` of \c Op. Since
we
bogner wrote:
Nice catch, should be "Intrin", the name of the first parameter. Updated.
http
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104252
>From 2f317012985068f7130cdf4976d8821924d404c3 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Mon, 9 Sep 2024 12:16:36 -0700
Subject: [PATCH 1/2] Improve comments, move code for clarity
Created using spr 1.3
@@ -259,6 +259,114 @@ class OpLowerer {
lowerToBindAndAnnotateHandle(F);
}
+ /// Replace uses of \c V with the values in the `dx.ResRet` of \c Op. Since
we
+ /// expect to be post-scalarization, make an effort to avoid vectors.
+ Error replaceResRetUses(CallInst *I
@@ -289,6 +289,43 @@ class OpLowerer {
});
}
+ void lowerTypedBufferStore(Function &F) {
+IRBuilder<> &IRB = OpBuilder.getIRB();
+Type *Int8Ty = IRB.getInt8Ty();
+Type *Int32Ty = IRB.getInt32Ty();
+
+replaceFunction(F, [&](CallInst *CI) -> Error {
+
bogner wrote:
Please take another look - specifically I'd like some review on the doc changes
to make sure they're clear.
https://github.com/llvm/llvm-project/pull/104253
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://
@@ -388,10 +432,13 @@ class OpLowerer {
case Intrinsic::dx_typedBufferLoad:
lowerTypedBufferLoad(F);
break;
+ case Intrinsic::dx_typedBufferStore:
+lowerTypedBufferStore(F);
+break;
}
Updated = true;
}
-if (Updat
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104253
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104253
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -289,6 +289,43 @@ class OpLowerer {
});
}
+ void lowerTypedBufferStore(Function &F) {
+IRBuilder<> &IRB = OpBuilder.getIRB();
+Type *Int8Ty = IRB.getInt8Ty();
+Type *Int32Ty = IRB.getInt32Ty();
+
+replaceFunction(F, [&](CallInst *CI) -> Error {
--
@@ -94,6 +95,7 @@ class OpLowerer {
DiagnosticInfoUnsupported Diag(*CI->getFunction(), Message,
CI->getDebugLoc());
M.getContext().diagnose(Diag);
+HasErrors = true;
bogner wrote:
Even if we did pa
@@ -289,6 +289,43 @@ class OpLowerer {
});
}
+ void lowerTypedBufferStore(Function &F) {
+IRBuilder<> &IRB = OpBuilder.getIRB();
+Type *Int8Ty = IRB.getInt8Ty();
+Type *Int32Ty = IRB.getInt32Ty();
+
+replaceFunction(F, [&](CallInst *CI) -> Error {
--
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/104253
>From d49a863313c30d3e75205dbffddc8f81980ed25b Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Mon, 9 Sep 2024 17:55:15 -0700
Subject: [PATCH] Propagate HasErrors through return values
Created using spr 1.3.5
@@ -94,6 +95,7 @@ class OpLowerer {
DiagnosticInfoUnsupported Diag(*CI->getFunction(), Message,
CI->getDebugLoc());
M.getContext().diagnose(Diag);
+HasErrors = true;
bogner wrote:
I pushed the `boo
Author: Justin Bogner
Date: 2020-12-03T14:05:51-08:00
New Revision: d5268ebe19252c86549a3c8a9c6b3fa714dbf17c
URL:
https://github.com/llvm/llvm-project/commit/d5268ebe19252c86549a3c8a9c6b3fa714dbf17c
DIFF:
https://github.com/llvm/llvm-project/commit/d5268ebe19252c86549a3c8a9c6b3fa714dbf17c.diff
Author: Justin Bogner
Date: 2020-12-03T14:21:37-08:00
New Revision: 203748e76dae55598f81d0c16c8874dc46b43552
URL:
https://github.com/llvm/llvm-project/commit/203748e76dae55598f81d0c16c8874dc46b43552
DIFF:
https://github.com/llvm/llvm-project/commit/203748e76dae55598f81d0c16c8874dc46b43552.diff
Author: Justin Bogner
Date: 2020-12-09T10:35:07-08:00
New Revision: e6a1187dd867cc0feea4041b22a9bb29aaa3ae48
URL:
https://github.com/llvm/llvm-project/commit/e6a1187dd867cc0feea4041b22a9bb29aaa3ae48
DIFF:
https://github.com/llvm/llvm-project/commit/e6a1187dd867cc0feea4041b22a9bb29aaa3ae48.diff
@@ -189,12 +189,28 @@ struct BuiltinTypeDeclBuilder {
BuiltinTypeDeclBuilder &addArraySubscriptOperators(Sema &S) {
if (Record->isCompleteDefinition())
return *this;
-addArraySubscriptOperator(S, true);
-addArraySubscriptOperator(S, false);
+ASTContext &
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/117018
This method is the same as `operator[]`, except that it returns a value instead
of a reference.
>From 8c9d382ae6d3c6e2dc8a0d738a97f3b3d14d5413 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 19 Nov 2024
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/117018
>From c7ba48c605a8181fb8c73178ea82b231b7e24e28 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Tue, 19 Nov 2024 14:32:44 -0800
Subject: [PATCH 1/2] [HLSL] Add RWBuffer::Load(Index)
This method is the same as
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/121725
This adds handling for raw and structured buffers when lowering resource access
via `llvm.dx.resource.getpointer`.
Fixes #121714
>From 192d20b16e418b89a549e93406f782ac0a0fa093 Mon Sep 17 00:00:00 2001
From: Jus
https://github.com/bogner updated
https://github.com/llvm/llvm-project/pull/121012
>From 53bba63c6a55464ac1872dc60f39510eff426d64 Mon Sep 17 00:00:00 2001
From: Justin Bogner
Date: Thu, 19 Dec 2024 16:33:48 -0700
Subject: [PATCH 1/2] [DirectX] Implement the resource.load.rawbuffer intrinsic
Th
@@ -542,6 +542,48 @@ class OpLowerer {
});
}
+ [[nodiscard]] bool lowerRawBufferLoad(Function &F) {
+Triple TT(Triple(M.getTargetTriple()));
+VersionTuple DXILVersion = TT.getDXILVersion();
+const DataLayout &DL = F.getDataLayout();
+IRBuilder<> &IRB = O
https://github.com/bogner created
https://github.com/llvm/llvm-project/pull/121282
This introduces `@llvm.dx.resource.store.rawbuffer` and generalizes the buffer
store docs under DirectX/DXILResources.
Fixes #106188
>From c49bc4714589cf548a6382ea5a99f31626d3d6a2 Mon Sep 17 00:00:00 2001
From:
bogner wrote:
> ⚠️ undef deprecator found issues in your code. ⚠️
>
> You can test this locally with the following command:
> The following files introduce new uses of undef:
>
> * llvm/lib/Target/DirectX/DXILOpLowering.cpp
> * llvm/test/CodeGen/DirectX/BufferStore-sm61.ll
> * llvm/test/CodeGe
@@ -80,6 +85,99 @@ class RootSignatureLexer {
}
};
+class RootSignatureParser {
+public:
+ RootSignatureParser(SmallVector &Elements,
+ const SmallVector &Tokens,
+ DiagnosticsEngine &Diags);
+
+ // Iterates over the provided token
101 - 200 of 283 matches
Mail list logo