[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-09-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/test/Driver/hlsl-entry.cpp:1 +// RUN:not %clang -cc1 -triple dxil-pc-shadermodel6.3-compute -x c++ -hlsl-entry foo %s 2>&1 | FileCheck %s --check-prefix=NOTHLSL +

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-09-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/hlsl-entry.cpp:1 +// RUN:not %clang -cc1 -triple dxil-pc-shadermodel6.3-compute -x c++ -hlsl-entry foo %s 2>&1 | FileCheck %s --check-prefix=NOTHLSL + Note, test/Driver deliberately discourages

[PATCH] D124751: [HLSL] Support -E option for HLSL.

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

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450115. python3kgae added a comment. Cleanup comments and fix test after rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 Files:

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-08-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. One very nitpick-y comment, otherwise LGTM. Comment at: clang/lib/Sema/SemaDecl.cpp:9841 +if (!NewFD->isInvalidDecl() && +// Skip operator overload which not

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-07-12 Thread Greg Roth via Phabricator via cfe-commits
pow2clk added a comment. Looks to me that all the comments were responded to. I see nothing else worth commenting on. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-06-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Gentle Ping. All the previous issues are fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 ___ cfe-commits mailing list

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-06-06 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 434615. python3kgae added a comment. Fix test fail after rebased on llvm/main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 Files:

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-27 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 3 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11721 + Diag(FD->getLocation(), diag::err_hlsl_missing_numthreads) << "Compute"; + FD->setInvalidDecl(); +} bruno wrote: >

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-27 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 432563. python3kgae added a comment. Add hlsl-entry for cc1 option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 Files: clang/include/clang/Basic/Attr.td

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/SemaHLSL/entry.hlsl:2 +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -Efoo -DWITH_NUM_THREADS -ast-dump -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-compute -x hlsl -Efoo -o

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-26 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi, nice to see this getting in. Comments inline! Comment at: clang/lib/Sema/SemaDecl.cpp:11720 +if (!FD->hasAttr()) { + Diag(FD->getLocation(), diag::err_hlsl_missing_numthreads) << "Compute"; + FD->setInvalidDecl(); You

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 432355. python3kgae added a comment. Herald added a reviewer: aaron.ballman. Add library to HLSLShaderAttr to help convert ShaderType. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-24 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D124751#3529652 , @MaskRay wrote: > In D124751#3513513 , @python3kgae > wrote: > >> In D124751#3513283 , @MaskRay >> wrote: >> >>> Is

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9887 + break; +case llvm::Triple::EnvironmentType::Compute: + ShaderType = HLSLShaderAttr::ShaderType::Compute; If the `HLSLShaderAttr::ShaderType` enum is properly

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D124751#3529652 , @MaskRay wrote: > In D124751#3513513 , @python3kgae > wrote: > >> In D124751#3513283 , @MaskRay >> wrote: >> >>> Is

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D124751#3513513 , @python3kgae wrote: > In D124751#3513283 , @MaskRay wrote: > >> Is there a specification or reference implementation stating that -E is used? >> >>> Option<["--",

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D124751#3513283 , @MaskRay wrote: > Is there a specification or reference implementation stating that -E is used? > >> Option<["--", "/", "-"], "E", > > Do you need the prefix `--`? You may define something like `CLFlag`.

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Is there a specification or reference implementation stating that -E is used? > Option<["--", "/", "-"], "E", Do you need the prefix `--`? You may define something like `CLFlag`. I have missed previous patches, but if `/` options are not necessary, removing them will

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 428209. python3kgae added a comment. Rebase to main for fix merge conflict. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124751/new/ https://reviews.llvm.org/D124751 Files: