From 22c477f934c4d1fa3f7d782d32a3e151f581c686 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 24 Aug 2022 14:46:04 -0500 Subject: [HLSL] Initial codegen for SV_GroupIndex Semantic parameters aren't passed as actual parameters, instead they are populated from intrinsics which are generally lowered to reads from dedicated hardware registers. This change modifies clang CodeGen to emit the intrinsic calls and populate the parameter's LValue with the result of the intrinsic call for SV_GroupIndex. The result of this is to make the actual passed argument ignored, which will make it easy to clean up later in an IR pass. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D131203 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 9df197056664..2ced1c541981 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1703,10 +1703,6 @@ void CodeGenModule::SetLLVMFunctionAttributes(GlobalDecl GD, /*AttrOnCallSite=*/false, IsThunk); F->setAttributes(PAL); F->setCallingConv(static_cast(CallingConv)); - if (getLangOpts().HLSL) { - if (const FunctionDecl *FD = dyn_cast_or_null(GD.getDecl())) - getHLSLRuntime().setHLSLFunctionAttributes(F, FD); - } } static void removeImageAccessQualifier(std::string& TyName) { -- cgit v1.2.3