[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-25 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22c477f934c4: [HLSL] Initial codegen for SV_GroupIndex (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D131203?vs=454677&id=455616#toc Repository: rG LLVM Github Monorepo CHAN

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131203/new/ https://reviews.llvm.org/D131203

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454677. beanz added a comment. Updates based on review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131203/new/ https://reviews.llvm.org/D131203 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/C

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:94 llvm::Function *F, const FunctionDecl *FD) { - if (HLSLShaderAttr *ShaderAttr = FD->getAttr()) { -const StringRef ShaderAttrKindStr = "dx.shader"; -F->addFnAttr(ShaderAttrKindStr

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 453418. beanz added a comment. Handling function attributes appropriately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131203/new/ https://reviews.llvm.org/D131203 Files: clang/lib/AST/Mangle.cpp clang/lib

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:119 + auto *EntryTy = llvm::FunctionType::get(llvm::Type::getVoidTy(Ctx), false); + Function *EntryFn = + Function::Create(EntryTy, Function::ExternalLinkage, FD->getName(), &M); ---

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:19 #include "clang/Basic/TargetOptions.h" +#include "llvm/IR/IntrinsicsDirectX.h" #include "llvm/IR/Metadata.h" python3kgae wrote: > Does this mean CGHLSLRuntime is only for DirectX ba

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:19 #include "clang/Basic/TargetOptions.h" +#include "llvm/IR/IntrinsicsDirectX.h" #include "llvm/IR/Metadata.h" Does this mean CGHLSLRuntime is only for DirectX backend? ==

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 451660. beanz added a comment. This is a fairly significant reworking of this patch to handle entry functions being called (which I hadn't anticipated). There may be some additional tweaks required, but the general flow here is: (1) Don't prevent mangling of

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl:4 +[numthreads(1,1,1)] +void main(unsigned GI : SV_GroupIndex) { +} Does this change plan to support cases where SV_GroupIndex is inside a struct? If yes, we n

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, bogner, jcranmer-intel, python3kgae, pow2clk. Herald added subscribers: Anastasia, arphaman. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Semantic parameters aren't passed as