[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG906e41f4e34d: [HLSL] clang codeGen for HLSLShaderAttr. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450217. python3kgae added a comment. Add -fcgl to make test work without DirectX backend. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 Files: clang/lib/AST/M

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450199. python3kgae added a comment. Rebase to upstream. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 Files: clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CGH

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-06-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 _

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 432947. python3kgae marked an inline comment as done. python3kgae added a comment. Code cleanup to match comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2606 + if (getLangOpts().HLSL && TargetDecl) { +if (const FunctionDecl *FD = dyn_cast_or_null(TargetDecl)) + getHLSLRuntime().addHLSLFunctionAttributes(FuncAttrs, RetAttrs, FD); I

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 432393. python3kgae added a comment. Move addHLSLFunctionAttributes to ConstructAttributeList. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 Files: clang/lib/

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 3 inline comments as done. python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/entry.hlsl:1 +// RUN: %clang --driver-mode=dxc -Tcs_6_1 -Efoo -fcgl -Fo - %s | FileCheck %s + Anastasia wrote: > Is this test here accidental? This

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenHLSL/entry.hlsl:1 +// RUN: %clang --driver-mode=dxc -Tcs_6_1 -Efoo -fcgl -Fo - %s | FileCheck %s + Is this test here accidental? Comment at: clang/test/CodeGenHLSL/shader_type_attr.

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:54 + +void clang::CodeGen::CGHLSLRuntime::setHLSLFnuctionAttributes( +llvm::Function *F, const FunctionDecl *FD) { I don't think you need `clang::CodeGen::`? C

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-24 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 431812. python3kgae added a comment. Treat entry functions as in extern C scope. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124752/new/ https://reviews.llvm.org/D124752 Files: clang/lib/AST/Decl.cpp

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-24 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/AST/Mangle.cpp:138 + // HLSL shader entry function never need to be mangled. + if (getASTContext().getLangOpts().HLSL && D->hasAttr()) Anastasia wrote: > Does HLSL shader entry inherits the same behavio

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/Mangle.cpp:138 + // HLSL shader entry function never need to be mangled. + if (getASTContext().getLangOpts().HLSL && D->hasAttr()) Does HLSL shader entry inherits the same behavior as C-linkage functi

[PATCH] D124752: [HLSL] clang codeGen for HLSLShaderAttr.

2022-05-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: dblaikie, MaskRay, hoy, lebedev.ri. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Tr