[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 456387. python3kgae added a comment. Fix format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/include/clang/Sema/HLSLExternalSemaSource.h clan

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: bogner, beanz, pow2clk. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Preserve vec3 for

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module &M = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) Don't need to generate CtorCalls for lib profile

[PATCH] D132977: [HLSL] Call global constructors inside entry

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:151 + llvm::Module &M = CGM.getModule(); + const auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); + if (!GlobalCtors) beanz wrote: > python3kgae wrote: > > Don't need

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-08-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 456870. python3kgae added a comment. Switch to ImpliedByAnyOf. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132913/new/ https://reviews.llvm.org/D132913 Files: clang/include/clang/Driver/Options.td cl

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:297 + } + IdentifierInfo &HLSL = AST.Idents.get("hlsl", tok::TokenKind::identifier); beanz wrote: > I think the core of what you'e doing here is not far off, but I think

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457081. python3kgae added a comment. Move reuse decl in PCH into BuiltinTypeDeclBuilder. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/include/cl

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:58 +/// them before we initialize the ExternalSemaSource base class. +struct ChainedHLSLExternalSemaSourceMembers { + ChainedHLSLExterna

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-08-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:58 +/// them before we initialize the ExternalSemaSource base class. +struct ChainedHLSLExternalSemaSourceMembers { + ChainedHLSLExterna

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-09-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457191. python3kgae marked an inline comment as done. python3kgae added a comment. Switch to CLMode -P and -Fi. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125655/new/ https://reviews.llvm.org/D125655 Fi

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-09-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457313. python3kgae added a comment. Not need to send -P and -Fi to cc1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125655/new/ https://reviews.llvm.org/D125655 Files: clang/include/clang/Basic/Diagno

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-09-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457329. python3kgae added a comment. Make a full patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125655/new/ https://reviews.llvm.org/D125655 Files: clang/include/clang/Basic/DiagnosticDriverKinds.t

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-09-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457353. python3kgae added a comment. Update warning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125655/new/ https://reviews.llvm.org/D125655 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-09-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457470. python3kgae marked 2 inline comments as done. python3kgae added a comment. Make O0 the same as Od. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files:

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457684. python3kgae added a comment. Rebase to use MultiplexExternalSemaSource. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/include/clang/Sema/

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:78 + // ExternalAST path. + // PrevRecord->setHasExternalLexicalStorage(); + if (PrevRecord->isCompleteDefinition()) { If comment this line out. Th

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 457735. python3kgae added a comment. Merge fix from Chris. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/include/clang/Sema/HLSLExternalSemaSourc

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458585. python3kgae marked 14 inline comments as done. python3kgae added a comment. Parse first and report error on the generated AST. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://revie

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 7 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:59 + +switch (Tok.getKind()) { +case tok::kw_namespace: aaron.ballman wrote: > The approach of using a switch and handling individua

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458807. python3kgae marked 4 inline comments as done. python3kgae added a comment. Use cast to simplify code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 File

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + aaron.ballman wrote: > Just double-checking, but this

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458965. python3kgae added a comment. Only add HLSLSema when not has it in ExternalSource. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/include/c

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 458966. python3kgae added a comment. Only add HLSLExternalSemaSource when ExternalSource is not HLSLExternalSemaSource. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D1

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459090. python3kgae added a comment. Remove attribute for first cbuffer commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://reviews.llvm.org/D129883 Files: clang/include/clang/AST/D

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:79-80 +ParsedAttributes Attrs(AttrFactory); +MaybeParseCXX11Attributes(Attrs); +MaybeParseMicrosoftAttributes(Attrs); + beanz wrote: > aaron.ballman wrote: > > beanz wrote: >

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. python3kgae marked an inline comment as done. Closed by commit rGc9d2b6b92d6c: [HLSL] Preserve vec3 for HLSL. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459149. python3kgae added a comment. Remove useless code since ExternalSource is not be reused when there're more than one Input files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://rev

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1036 +// Only add HLSLSema when not in MultiSource. +if (!MultiSource->HasSource()) + MultiSource->AddSource(HLSLSema.get())

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/float3.hlsl:4 +// Make sure float3 is not changed into float4. +// CHECK:<3 x float> @"?foo@@YAT?$__vector@M$02@__clang@@T12@@Z"(<3 x float> noundef %a) +// CHECK:%[[A_ADDR:.+]] = alloca <3 x float>, align 16

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781494 , @chapuni wrote: > The test fails for -Asserts. Fixed the %0 issue in https://github.com/llvm/llvm-project/commit/71fae33f5e7c1b11e32db695fd24dd50aead737c It passed locally on build with -DLLVM_ENABLE_ASS

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781591 , @chapuni wrote: > The fix looks good. Thanks. > >> Is -DLLVM_ENABLE_ASSERTIONS=ON what you mean by -Asserts? > > Oh excuse me, "-Asserts" was an ancient term, "w/o assertsions" in the > autoconf age. > An

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3781611 , @python3kgae wrote: > In D132913#3781591 , @chapuni wrote: > >> The fix looks good. Thanks. >> >>> Is -DLLVM_ENABLE_ASSERTIONS=ON what you mean by -Asserts? >> >>

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, Anastasia, aaron.ballman, bogner. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove check which disable BitInt as

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-09-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, Anastasia, aaron.ballman, bogner. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. short will be promited to int in Usua

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459359. python3kgae added a comment. Update test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133634/new/ https://reviews.llvm.org/D133634 Files: clang/lib/AST/ASTContext.cpp clang/lib/Sema/SemaType.

[PATCH] D133634: [clang] Allow vector of BitInt

2022-09-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133634#3782999 , @xbolva00 wrote: > Missing IR tests. No issues in codegen? > > Very poor description. Why it was disabled? Why we can enable it now? I'm not sure why it is disabled. I guess it is never enabled and just a

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459519. python3kgae marked an inline comment as done. python3kgae added a comment. Fix test fail caused by not add HLSL builtin Resource type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-09-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133668#3784607 , @aaron.ballman wrote: > In D133668#3783975 , @beanz wrote: > >> In D133668#3783489 , >> @aaron.ballman wrote: >> >>> Ok

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-09-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133668#3784636 , @python3kgae wrote: > In D133668#3784607 , @aaron.ballman > wrote: > >> In D133668#3783975 , @beanz wrote: >> >>> In D1

[PATCH] D133737: [HLSL] [clang] Add vector version of abs for HLSL

2022-09-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner, fhahn, RKSimon. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add vecto

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3786432 , @alexgatea wrote: > This test fails because the actual output has <3 x float>* rather than ptr. > Could you please fix this test case? Thanks for reporting the issue. But I cannot repro the fail. Do you

[PATCH] D132913: [HLSL] Preserve vec3 for HLSL.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D132913#3786679 , @alexgatea wrote: >> Thanks for reporting the issue. >> But I cannot repro the fail. >> Do you mind sharing your cmake command? > > Hmm, I'm just running the command in the test case: > clang --driver-mode

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459833. python3kgae added a comment. Use O0 instead of DxcOptDisable since Od is same as O0. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files: clang/includ

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 459883. python3kgae marked an inline comment as done. python3kgae added a comment. Cleanup per comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files:

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 3 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/Driver/Driver.cpp:5459 + if (AtTopLevel && !isa(JA) && !isa(JA) && + !(IsDXCMode() && C.getArgs().hasArg(options::OPT__SLASH_P))) { if (Arg *FinalOutput = C.getArgs()

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-09-13 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf712c0131f3b: [HLSL]Add -O and -Od option for dxc mode. (authored by python3kgae). Changed prior to commit: https://reviews.llvm.org/D128845?vs=459883&id=459977#toc Repository: rG LLVM Github Monorep

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 460175. python3kgae marked 4 inline comments as done. python3kgae added a comment. Code cleanup per comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 File

[PATCH] D132421: [HLSL] Support PCH for cc1 mode

2022-09-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:55 + } else +PrevDecl = dyn_cast(Found); + assert(PrevDecl && "Unexpected lookup result type."); aaron.ballman wrote: > Is it possible that this finds a dif

[PATCH] D131799: [HLSL] clang codeGen for HLSLNumThreadsAttr

2022-09-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 460288. python3kgae added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131799/new/ https://reviews.llvm.org/D131799 Files: clang/lib/CodeGen/CGHLSLRuntime.cpp clang/test/CodeGenHLSL/

[PATCH] D133958: [HLSL] Pass flags to cc1 based on language

2022-09-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/Driver/hlsl_no_stdinc.hlsl:2 // RUN: %clang_dxc -Tlib_6_7 -fcgl -Fo - %s -### 2>&1 | FileCheck %s --check-prefix=STDINC +// RUN: %clang target dxil-pc-shadermodel6.3-library -o - %s -### 2>&1 | FileCheck %s --check-pr

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-06-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: amccarth, craig.topper, hans, rnk, stefan_reinalter, beanz, pow2clk. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. python3kgae requested review of this revision. Herald added subscribers: cfe-commits, M

[PATCH] D128855: [HLSL] Change WaveActiveCountBits to wrapper of __builtin_hlsl_wave_active_count_bits

2022-06-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: Anastasia, svenvh, jdoerfert, azabaznov, beanz, tra, yaxunl, pow2clk. Herald added subscribers: luke957, s.egerton, simoncook, mgorny. Herald added a reviewer: aaron.ballman. Herald added a project: All. python3kgae requested review o

[PATCH] D128855: [HLSL] Change WaveActiveCountBits to wrapper of __builtin_hlsl_wave_active_count_bits

2022-06-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 441358. python3kgae added a comment. Rebase to fix test fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128855/new/ https://reviews.llvm.org/D128855 Files: clang/include/clang/Basic/Builtins.def cl

[PATCH] D128855: [HLSL] Change WaveActiveCountBits to wrapper of __builtin_hlsl_wave_active_count_bits

2022-06-30 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa591c7ca0d9f: [HLSL] Change WaveActiveCountBits to wrapper of… (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128855/new/ https://

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-07-07 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 443070. python3kgae added a comment. Fix test fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files: clang/include/clang/Basic/TargetOptions.h clang/inc

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-03-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, steven_wu, JonChesterfield. python3kgae added a project: clang. Herald added a subscriber: mgorny. Herald added a reviewer: sscalpone. Herald added a project: All. python3kgae requested review of this revision. Herald added subs

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6916 + Triple Target = S.Context.getTargetInfo().getTriple(); + if (Target.getEnvironment() != Triple::Compute) { +uint32_t Pipeline = It is OK to have SV_GroupIndex on a compute

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 419893. python3kgae added a comment. Herald added a subscriber: ormris. Change lit test to unit test to avoid require build DirectX target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 419954. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-02 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 419991. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:43 +return false; + if (!Version.getMinor()) +return false; beanz wrote: > Do we need to verify this or can we just assume if there is no minor version > specified that

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:61 + +GlobalVariable *replaceCBuffer(CGHLSLRuntime::CBuffer &CB) { + const unsigned CBufferAddressSpace = 4; Anastasia wrote: > I don't think I understand the intent of this funct

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 448403. python3kgae added a comment. Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, kerbowa, jvesely, jholewinski. Take care alignment when layout CBuffer. Add hlsl_cbuffer/tbuffer to clang::LangAS. Change CGHLSLRuntime::CBuffer to CGHL

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 448407. python3kgae added a comment. Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130131/new/ https://reviews.llvm.org/D130131 Files: clang/include/clang/Basic/AddressSpaces.h clang

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:142 + if (!Inner) { +DiagnosticsEngine &Diags = CGM.getDiags(); +unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:142 + if (!Inner) { +DiagnosticsEngine &Diags = CGM.getDiags(); +unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 448414. python3kgae marked an inline comment as done. python3kgae added a comment. Add test for nested cbuffer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130131/new/ https://reviews.llvm.org/D130131 Fi

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-07-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 448435. python3kgae marked 2 inline comments as done. python3kgae added a comment. Remove useless comment. Use llvm::Optional. Use real type instead of auto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130

[PATCH] D130858: [HLSL] emit-obj when set output.

2022-07-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: amccarth, craig.topper, hans, rnk, stefan_reinalter, beanz, pow2clk, bogner. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. python3kgae requested review of this revision. Herald added subscribers: cfe-co

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-08-01 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: aaron.ballman, Anastasia, kuhar, bogner, beanz, pow2clk. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ''register(ID, space)'' like

[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: clang/include/clang/Basi

[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] D130951: [HLSL] CodeGen hlsl resource binding.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450182. python3kgae marked an inline comment as done. python3kgae added a comment. Rename ResBinding and addResourceAnnotation to BufferResBinding and addBufferResourceAnnotation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[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/ https://reviews.llvm.o

[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-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
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] D131238: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6134629af087: [NFC][HLSL] Fix typo in CGHLSLRuntime. (authored by

[PATCH] D131238: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Change setHLSLFnuctionAttributes to setHL

[PATCH] D131239: [NFC][HLSL] Fix typo in CGHLSLRuntime.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Change setHLSLFnuctionAttributes to setHL

[PATCH] D131240: [NFC][HLSL] Fix build error caused missing typo update.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a reviewer: beanz. Herald added a subscriber: Anastasia. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. setHLSLFnuctionAttributes to setHLSLFunct

[PATCH] D131240: [NFC][HLSL] Fix build error caused missing typo update.

2022-08-04 Thread Xiang Li via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb2c9ff727379: [NFC][HLSL] Fix build error caused missing typo upda

[PATCH] D128845: [HLSL]Add -O and -Od option for dxc mode.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450243. python3kgae added a comment. Rebase and fix test fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128845/new/ https://reviews.llvm.org/D128845 Files: clang/include/clang/Basic/TargetOptions.h

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:220 + +// Const subscript operators return copies of elements, non-const return a +// reference so that they are assignable. If we reuse this function for StructuredB

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450377. python3kgae marked 3 inline comments as done. python3kgae added a comment. Rebase and fix merge conflict. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125655/new/ https://reviews.llvm.org/D125655

[PATCH] D130858: [HLSL] emit-obj when set output.

2022-08-05 Thread Xiang Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG549542b494f4: [HLSL] emit-obj when set output. (authored by python3kgae). Changed prior to commit: https://reviews.llvm.org/D130858?vs=448890&id=4

[PATCH] D124753: [HLSL] Set main as default entry.

2022-08-06 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450492. python3kgae marked an inline comment as done. python3kgae added a comment. Rebase and add unit-test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124753/new/ https://reviews.llvm.org/D124753 Files

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-08-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 450978. python3kgae added a comment. Add more test and comment. Also use getTargetAddressSpace. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130131/new/ https://reviews.llvm.org/D130131 Files: clang/inc

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-08-08 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 3 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:61 + +GlobalVariable *replaceCBuffer(CGHLSLRuntime::CBuffer &CB) { + const unsigned CBufferAddressSpace = 4; Anastasia wrote: > pytho

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451262. python3kgae added a comment. Move resource binding attribute validation to Sema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/cl

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451282. python3kgae added a comment. Treat resource binding as "HLSLSemantic". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11875 + for (const auto Param : FD->parameters()) { +if (!Param->hasAttr()) { + Diag(Param->getLocation(), diag::err_hlsl_missing_parameter_annotation) << Param; When param type

[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] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422128. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422272. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422350. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422365. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422377. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Driver/Driver.h clang/in

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 422677. python3kgae added a comment. Code cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122865/new/ https://reviews.llvm.org/D122865 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td c

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added a project: clang. Herald added subscribers: ormris, dexonsmith, okura, jdoerfert, kuter, arphaman, mgorny. Herald added a project: All. python3kgae requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1,

  1   2   3   4   5   >