llvm-beanz wrote:
> I was kind of hoping we might be able to generate the accesses off a handle
> during codegen when the global is accessed. I'm not sure if that's possible
> though.
I'm concerned that this will be more complex to make work with the other CBV
syntaxes. For example, the impli
@@ -2412,6 +2412,102 @@ bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl
*New,
return HadError;
}
+// Generally follows PerformScalarCast, with cases reordered for
+// clarity of what types are supported
+bool SemaHLSL::CanPerformScalarCast(QualType SrcTy, QualType D
llvm-beanz wrote:
A couple notes for myself:
* I need to write some AST tests
* Also need to write tests to cover bit fields and unions.
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/123141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/123141
This PR implements HLSL's initialization list behvaior as specified in the
draft language specifcation under
[*Decl.Init.Agg*](https://microsoft.github.io/hlsl-specs/specs/hlsl.html
#Decl.Init.Agg).
This be
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2412,6 +2412,102 @@ bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl
*New,
return HadError;
}
+// Generally follows PerformScalarCast, with cases reordered for
+// clarity of what types are supported
+bool SemaHLSL::CanPerformScalarCast(QualType SrcTy, QualType D
@@ -491,6 +491,81 @@ static bool isTrivialFiller(Expr *E) {
return false;
}
+// emit a flat cast where the RHS is a scalar, including vector
+static void EmitHLSLScalarFlatCast(CodeGenFunction &CGF, Address DestVal,
+ QualType DestTy, llvm::
@@ -2752,7 +2787,17 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
llvm::Value *Zero = llvm::Constant::getNullValue(CGF.SizeTy);
return Builder.CreateExtractElement(Vec, Zero, "cast.vtrunc");
}
+ case CK_HLSLAggregateCast: {
+RValue RV = CGF.EmitAnyEx
@@ -6358,3 +6359,89 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const
PseudoObjectExpr *E,
LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) {
return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV;
}
+
+void CodeGenFunction::Fl
https://github.com/llvm-beanz commented:
I want to spend a little more time going over the tests, but I had a few small
comments. This seems to be mostly right from my initial review.
https://github.com/llvm/llvm-project/pull/118842
___
cfe-commits ma
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/118842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
We talked about this yesterday in a call with @Keenuts and @s-perron.
I think one of the problems we have with HLSL is that we haven't had explicit
address space annotations except for `groupshared` in the past. We do need to
do that in the future, but
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122202
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -253,12 +257,253 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/122820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
The one design question I have here is: should we be bothering to create a
handle for the cbuffer in the frontend at all?
My thought had been that we would instead emit the cbuffer member declarations
as constant address space (2 for DXIL) declarations
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122337
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
> No failures. We would need to have tests for all intrinsics that if its not
> SM 6.2 or greater uses of half would error, but we never did that for any of
> the other intrinsics so we should probably discuss what the test coverage
> should be and apply it broadly.
In pract
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/119820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/122157
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const
JobAction &JA,
}
}
- if (Args.hasArg(options::OPT_forder_file_instrumentation)) {
- CmdArgs.push_back("-forder-file-instrumentation");
- // Enable order file instrumentation when ThinLTO is
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/122105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/122105
#116331 introduced a regression in DXIL testing, and did not address all PR
feedback before merging. @joaosaffran is looking at the regression tracked in
#122052 and will re-land these changes with that fix
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/118580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
> I didn't implement the tokenizer because I found that the extra level of
> abstraction to be redundant/not beneficial with the StringRef operations.
I disagree, and generally string operations tend to muddy up and can lead to
inefficiencies.
> Looking at the DXC implementa
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const
JobAction &JA,
}
}
- if (Args.hasArg(options::OPT_forder_file_instrumentation)) {
- CmdArgs.push_back("-forder-file-instrumentation");
- // Enable order file instrumentation when ThinLTO is
@@ -1531,7 +1531,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) {
// Check if the environment version is valid except wasm case.
llvm::Triple Triple = TC.getTriple();
- if (!Triple.isWasm()) {
+ if (!Triple.isWasm() && Triple.getEnvironment() != llvm::Tripl
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const
JobAction &JA,
}
}
- if (Args.hasArg(options::OPT_forder_file_instrumentation)) {
- CmdArgs.push_back("-forder-file-instrumentation");
- // Enable order file instrumentation when ThinLTO is
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
I don't love the way you re-wrote clang/test/CodeGenHLSL/builtins/length.hlsl.
I'm not a huge fan of the `update_cc_test_checks` workflow, and (as I commented
elsewhere) I really don't like tests that depend on optimizations.
I'm okay with removing the
@@ -1,73 +1,151 @@
-// 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,NATIVE_HALF
-// RUN: %clang_cc1 -
@@ -0,0 +1,139 @@
+#include "clang/Sema/ParseHLSLRootSignature.h"
+
+namespace llvm {
+namespace hlsl {
+namespace root_signature {
+
+// TODO: Hook up with Sema to properly report semantic/validation errors
+bool Parser::ReportError() { return true; }
+
+bool Parser::ParseRootFla
https://github.com/llvm-beanz commented:
Is there a reason that you're just operating on a StringRef buffer instead of
building out a proper tokenizer and parser? It seems to me like root signature
parsing probably warrants full lexer and parser that operates on tokens rather
than just section
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/121799
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/119041
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/116331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/121309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/118569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/121025
Have you ever had that horrible realization that some header you included
defines a macro that matches a commonly used word that appears throughout your
codebase? What kind of horrible person would define `m
@@ -761,7 +762,37 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level
DiagLevel,
return false;
if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
- Edits.push_back(toTextEdit(FixIt, SM, *LangOpts));
+
+ auto R = too
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/118569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -761,7 +762,37 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level
DiagLevel,
return false;
if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
- Edits.push_back(toTextEdit(FixIt, SM, *LangOpts));
+
+ auto R = too
@@ -761,7 +762,37 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level
DiagLevel,
return false;
if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
- Edits.push_back(toTextEdit(FixIt, SM, *LangOpts));
+
+ auto R = too
@@ -342,6 +342,20 @@ llvm::Error Replacements::add(const Replacement &R) {
return llvm::Error::success();
}
+llvm::Error Replacements::addOrMerge(const Replacement &R) {
+ auto Err = add(R);
+ if (Err) {
llvm-beanz wrote:
nit: You could rewrite this as:
`
@@ -149,26 +149,12 @@ class ErrorReporter {
Repl.getLength(),
Repl.getReplacementText());
auto &Entry = FileReplacements[R.getFilePath()];
Replacements &Replacements = Entry.Replaces;
-llvm::Error Err = Rep
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/118569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -761,7 +762,37 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level
DiagLevel,
return false;
if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
- Edits.push_back(toTextEdit(FixIt, SM, *LangOpts));
+
+ auto R = too
https://github.com/llvm-beanz approved this pull request.
This mostly looks good to me. I have a few style nits to use more idomatic
patterns and conform better to LLVM coding standards.
https://github.com/llvm/llvm-project/pull/118569
___
cfe-commits
https://github.com/llvm-beanz commented:
I think this gets really complicated really quickly. The `a` prefix for
arguments seems like a coding style derived from Hungarian Notation, and I
guess I could see an argument for having an option to disregard variable
prefixes when matching the hints,
@@ -890,6 +890,10 @@ CodeGenModule::EmitCXXGlobalInitFunc() {
ModuleInits.push_back(Fn);
}
+ if (getLangOpts().HLSL && getHLSLRuntime().needsResourceBindingInitFn()) {
+CXXGlobalInits.push_back(getHLSLRuntime().createResourceBindingInitFn());
+ }
--
@@ -164,18 +164,18 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool
CBuffer,
return Result;
}
-// Calculate the size of a legacy cbuffer type based on
+// Calculate the size of a legacy cbuffer type in bytes based on
//
https://learn.microsoft.com/en-us/window
@@ -54,78 +54,108 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
auto *DXILValMD = M.getOrInsertNamedMetadata(DXILValKey);
DXILValMD->addOperand(Val);
}
+
void addDisableOptimizations(llvm::Module &M) {
StringRef Key = "dx.disable_optimizations";
@@ -54,78 +54,108 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
auto *DXILValMD = M.getOrInsertNamedMetadata(DXILValKey);
DXILValMD->addOperand(Val);
}
+
void addDisableOptimizations(llvm::Module &M) {
StringRef Key = "dx.disable_optimizations";
@@ -54,78 +54,108 @@ void addDxilValVersion(StringRef ValVersionStr,
llvm::Module &M) {
auto *DXILValMD = M.getOrInsertNamedMetadata(DXILValKey);
DXILValMD->addOperand(Val);
}
+
void addDisableOptimizations(llvm::Module &M) {
StringRef Key = "dx.disable_optimizations";
https://github.com/llvm-beanz requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/119755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-beanz wrote:
Quick sanity check question for @bogner:
In DXC we apply the `fast` flag, which in LLVM 3.7 implies: `nnan ninf nsz
arcp` and includes the modern interpretation of `reassoc`
With this change we are applying: `reassoc nnan ninf nsz arcp afn` (no `fast`
because its meaning is
llvm-beanz wrote:
With how `RUN` lines tend to get copied from test to test, I think it is
probably best to limit how many tests explicitly disable fast math otherwise
they're likely to proliferate across future tests.
https://github.com/llvm/llvm-project/pull/119820
__
@@ -208,37 +208,44 @@ Examples:
.. code-block:: llvm
- ; RWBuffer Buf : register(u5, space3)
- %buf = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)
- @llvm.dx.handle.fromBinding.tdx.TypedBuffer_f32_1_0(
- i32 3, i32 5, i32 1, i32 0, i
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/120466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12338,7 +12338,8 @@ def err_builtin_invalid_arg_type: Error <
"a vector of integers|"
"an unsigned integer|"
"an 'int'|"
- "a vector of floating points}1 (was %2)">;
+ "a vector of floating points|"
+ "a vector of integers or floating points}1 (was %2)">;
-
@@ -1754,6 +1755,17 @@ static bool interp__builtin_vector_reduce(InterpState
&S, CodePtr OpPC,
PrimType ElemT = *S.getContext().classify(ElemType);
unsigned NumElems = Arg.getNumElems();
+ if (ElemType->isRealFloatingType()) {
+if (ID != Builtin::BI__builtin_reduce_a
@@ -9272,6 +9272,8 @@ def err_typecheck_expect_scalar_or_vector : Error<
"a vector of such type is required">;
def err_typecheck_expect_any_scalar_or_vector : Error<
"invalid operand of type %0 where a scalar or vector is required">;
+def err_typecheck_expect_scalar_or_vect
@@ -3139,136 +3151,269 @@ Register
SPIRVInstructionSelector::buildPointerToResource(
return AcReg;
}
-bool SPIRVInstructionSelector::selectFirstBitHigh16(Register ResVReg,
-const SPIRVType *ResType,
-
@@ -3139,136 +3151,269 @@ Register
SPIRVInstructionSelector::buildPointerToResource(
return AcReg;
}
-bool SPIRVInstructionSelector::selectFirstBitHigh16(Register ResVReg,
-const SPIRVType *ResType,
-
@@ -3139,136 +3151,269 @@ Register
SPIRVInstructionSelector::buildPointerToResource(
return AcReg;
}
-bool SPIRVInstructionSelector::selectFirstBitHigh16(Register ResVReg,
-const SPIRVType *ResType,
-
@@ -3139,136 +3151,269 @@ Register
SPIRVInstructionSelector::buildPointerToResource(
return AcReg;
}
-bool SPIRVInstructionSelector::selectFirstBitHigh16(Register ResVReg,
-const SPIRVType *ResType,
-
@@ -17,12 +17,10 @@ double test_int_builtin(double p0) {
double2 test_int_builtin_2(double2 p0) {
return __builtin_hlsl_elementwise_firstbithigh(p0);
- // expected-error@-1 {{1st argument must be a vector of integers
- // (was 'double2' (aka 'vector'))}}
+ // expected-err
@@ -1229,8 +1248,15 @@ FunctionPass *llvm::createSPIRVStructurizerPass() {
PreservedAnalyses SPIRVStructurizerWrapper::run(Function &F,
FunctionAnalysisManager &AF) {
- FunctionPass *StructurizerPass = createSPIRVStructurizerPas
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-llvm -
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -ast-dump %s |
FileCheck %s
+
+// CHECK: FunctionDecl 0x{{[0-9A-Fa-f]+}} <{{.*}}> {{.*}} used branch 'int
(int)'
+// CHECK: AttributedStmt 0x{{[0-9A-Fa-f]+}} <
+// CHECK-NEXT: -HLSLControlFlowHintAttr 0x
@@ -295,6 +296,39 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode
*RMD,
return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx);
}
+// TODO: We might need to refactor this to be more generic,
+// in case we need more metadata to be replaced.
+stat
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/116331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2776,19 +2788,23 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
}
return MIB.constrainAllUses(TII, TRI, RBI);
}
- case Intrinsic::spv_loop_merge:
- case Intrinsic::spv_selection_merge: {
-const auto Opcode = IID == Intrinsic::spv_select
@@ -2081,7 +2081,26 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
}
- Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
+ auto *BrInst = Builder.CreateCondBr(CondV, TrueBloc
https://github.com/llvm-beanz requested changes to this pull request.
Mostly minor nits, but the stuff in `SPIRVStructurizerWrapper::run` has to
change before we land this.
https://github.com/llvm/llvm-project/pull/116331
___
cfe-commits mailing list
llvm-beanz wrote:
> You are correct @llvm-beanz, this change is not needed at all. Sorry for
> wasting your time!
Even a broken clock is right twice a day... me being the broken clock here 😄
It's never a waste to put something up to review if it helps us get to the
right solution.
https://gi
llvm-beanz wrote:
> any chance you could A/B test this on a bootstrap of clang, for instance? To
> help validate that this really is NFC/dead code?
I did a little more archeology, and I'm actually struggling to find any point
in the history where this change was required. The difference betwee
llvm-beanz wrote:
What is the case where an object library wouldn't need to act as
`CLANG_IMPORT`? It seems to me like the object library needs to be built
assuming that it is importing clang symbols unless it is one of the core clang
components.
https://github.com/llvm/llvm-project/pull/1123
@@ -114,7 +114,7 @@ macro(add_clang_library name)
if(TARGET "obj.${name}")
target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC)
endif()
- elseif(NOT ARG_SHARED AND NOT ARG_STATIC)
+ elseif(NOT ARG_SHARED AND NOT ARG_STATIC AND NOT ARG_CLANG_IMPORT
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/119444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9272,6 +9272,8 @@ def err_typecheck_expect_scalar_or_vector : Error<
"a vector of such type is required">;
def err_typecheck_expect_any_scalar_or_vector : Error<
"invalid operand of type %0 where a scalar or vector is required">;
+def err_typecheck_expect_scalar_or_vect
llvm-beanz wrote:
Is this the right solution, or should we be doing something to force the
constructor function to be generated. I'm a little worried that we have one
path for initializing some types of globals and a different approach for other
globals.
https://github.com/llvm/llvm-project/p
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/117781
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2021,28 +2021,10 @@ llvm::DISubroutineType
*CGDebugInfo::getOrCreateInstanceMethodType(
// ThisPtr may be null if the member function has an explicit 'this'
// parameter.
if (!ThisPtr.isNull()) {
-const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();
-
https://github.com/llvm-beanz approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/117885
___
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
+/
@@ -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
@@ -2694,19 +2694,49 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
}
return MIB.constrainAllUses(TII, TRI, RBI);
}
- case Intrinsic::spv_loop_merge:
- case Intrinsic::spv_selection_merge: {
-const auto Opcode = IID == Intrinsic::spv_select
@@ -1206,6 +1202,21 @@ class SPIRVStructurizer : public FunctionPass {
AU.addPreserved();
FunctionPass::getAnalysisUsage(AU);
}
+
+ void createOpSelectMerge(IRBuilder<> *Builder, BlockAddress *MergeAddress) {
+Instruction *BBTerminatorInst = Builder->GetInsertBlo
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode
*RMD,
return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx);
}
+// TODO: We might need to refactor this to be more generic,
+// in case we need more metadata to be replaced.
+stat
@@ -2694,19 +2694,49 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
}
return MIB.constrainAllUses(TII, TRI, RBI);
}
- case Intrinsic::spv_loop_merge:
- case Intrinsic::spv_selection_merge: {
-const auto Opcode = IID == Intrinsic::spv_select
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode
*RMD,
return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx);
}
+// TODO: We might need to refactor this to be more generic,
+// in case we need more metadata to be replaced.
+stat
@@ -2076,7 +2076,28 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
}
- Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
+ auto *BrInst = Builder.CreateCondBr(CondV, TrueBloc
@@ -30,22 +30,36 @@
#include
#include
+#define GENERATE_HLSL_INTRINSIC_FUNCTION_DEFAULT(FunctionName,
\
+ IntrinsicPostfix)
\
+ GENERATE_HLSL_INTRINSIC_FUNCTION(FunctionName, IntrinsicPostfix, 1,
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/117017
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/114544
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -784,6 +785,17 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D,
const ParsedAttr &AL) {
HLSLSV_DispatchThreadIDAttr(getASTContext(), AL));
}
+void SemaHLSL::handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL) {
+ auto *VD = cast(D);
+ if (!isLega
1 - 100 of 804 matches
Mail list logo