https://github.com/spall closed https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From 119def060924f13bd1fe07f6d73ce27a1b52ea12 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/8] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From 119def060924f13bd1fe07f6d73ce27a1b52ea12 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/8] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
IRCallArgs[FirstIRArg] = Val;
break;
}
+ } else if (I->getType()->isArrayParameterType()) {
+// use the tmp created by the HLSLOutArgExpr
+/
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
IRCallArgs[FirstIRArg] = Val;
break;
}
+ } else if (I->getType()->isArrayParameterType()) {
+// use the tmp created by the HLSLOutArgExpr
+/
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5322,6 +5324,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo
&CallInfo,
IRCallArgs[FirstIRArg] = Val;
break;
}
+ } else if (I->getType()->isArrayParameterType()) {
+// use the tmp created by the HLSLOutArgExpr
+/
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From 119def060924f13bd1fe07f6d73ce27a1b52ea12 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/7] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
@@ -0,0 +1,134 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: increment
+void increment(inout int Arr[2]) {
+ for (int I = 0; I < 2; I++)
+Arr[0] += 2;
+}
+
+//
@@ -4690,8 +4690,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args,
const Expr *E,
return emitWritebackArg(*this, args, CRE);
}
- assert(type->isReferenceType() == E->isGLValue() &&
- "reference binding to unmaterialized r-value!");
+ assert(type->isArr
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From 0797f19cad4ca9cf605725de1ac838cccacda1fc Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/6] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From 0797f19cad4ca9cf605725de1ac838cccacda1fc Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/6] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic commented:
I'd like to see a testcase for passing an array parameter to another function
which takes an array parameter.
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.l
@@ -4690,8 +4690,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args,
const Expr *E,
return emitWritebackArg(*this, args, CRE);
}
- assert(type->isReferenceType() == E->isGLValue() &&
- "reference binding to unmaterialized r-value!");
+ assert(type->isArr
@@ -5811,9 +5811,12 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const
BinaryOperator *E) {
// This function implements trivial copy assignment for HLSL's
// assignable constant arrays.
LValue CodeGenFunction::EmitHLSLArrayAssignLValue(const BinaryOperator *E) {
- LVal
@@ -4690,8 +4690,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args,
const Expr *E,
return emitWritebackArg(*this, args, CRE);
}
- assert(type->isReferenceType() == E->isGLValue() &&
- "reference binding to unmaterialized r-value!");
+ assert(type->isArr
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: increment
+void increment(inout int Arr[2]) {
+ for (int I = 0; I < 2; I++)
+Arr[0] += 2;
+}
+
+// C
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: increment
+void increment(inout int Arr[2]) {
+ for (int I = 0; I < 2; I++)
+Arr[0] += 2;
+}
+
+// C
https://github.com/pow2clk commented:
Just a drive by review with one additional note while searching for changes
that will be disrupted by the mangling shift.
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@l
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2249,6 +2235,25 @@ static bool IsStandardConversion(Sema &S, Expr* From,
QualType ToType,
SCS.setAllToTypes(ToType);
return true;
+ } else if (argIsLValue && !FromType->canDecayToPointerType() &&
+ S.Context.getCanonicalType(FromType) != S.Context.Ove
@@ -5811,9 +5811,12 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const
BinaryOperator *E) {
// This function implements trivial copy assignment for HLSL's
// assignable constant arrays.
LValue CodeGenFunction::EmitHLSLArrayAssignLValue(const BinaryOperator *E) {
- LVal
@@ -4690,8 +4690,9 @@ void CodeGenFunction::EmitCallArg(CallArgList &args,
const Expr *E,
return emitWritebackArg(*this, args, CRE);
}
- assert(type->isReferenceType() == E->isGLValue() &&
- "reference binding to unmaterialized r-value!");
+ assert(type->isArr
@@ -3830,6 +3830,16 @@ QualType ASTContext::getDecayedType(QualType T) const {
return getDecayedType(T, Decayed);
}
+QualType ASTContext::getConstantArrayFromArrayParameterType(QualType Ty) const
{
+ if (Ty->isConstantArrayType() && !Ty->isArrayParameterType())
+return
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/111047
>From c73ce3707e59242b8ccbb6757a290938c2d39e5e Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 17 Sep 2024 20:25:46 +
Subject: [PATCH 1/5] theoretically fix issue
---
clang/lib/Sema/SemaType.cpp | 4 ++
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 32ffc9fdc2cd422c88c926b862adb3de726e3888
ba56fbdc3c17b973dd4dd5757cf860447ba076d3 --e
llvmbot wrote:
@llvm/pr-subscribers-hlsl
Author: Sarah Spall (spall)
Changes
Get inout/out parameters working for HLSL Arrays.
Utilizes the fix from #109323, and corrects the assignment behavior
slightly to allow for Non-LValues on the RHS.
Closes #106917
---
Patch is 21.41 KiB, trunc
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
Author: Sarah Spall (spall)
Changes
Get inout/out parameters working for HLSL Arrays.
Utilizes the fix from #109323, and corrects the assignment behavior
slightly to allow for Non-LValues on the RHS.
Closes #106917
---
Patch is 21.41 K
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/111047
Get inout/out parameters working for HLSL Arrays.
Utilizes the fix from #109323, and corrects the assignment behavior slightly to
allow for Non-LValues on the RHS.
Closes #106917
>From c73ce3707e59242b8ccbb6757
30 matches
Mail list logo