[PATCH] D136913: [HLSL] support RWByteAddressBuffer.

2022-10-27 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: pow2clk, beanz, bogner. 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. Only RWByteAddressBuffer:

[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] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451917. python3kgae marked 14 inline comments as done. python3kgae added a comment. Remove optional flag for Slot. Update error messages and doc. Add test for empty resource attribute and space only resource attribute. Repository: rG LLVM Github Monore

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

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4022 + let LangOpts = [HLSL]; + let Args = [StringArgument<"Slot", 1>, StringArgument<"Space", 1>]; + let Documentation = [HLSLResourceBindingDocs]; aaron.ballman wrote: > Do you

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:17 +__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In); +__attribute__((clang_builtin_alias(__builtin_fabsf))) float abs(float In); +__attribute__((clang_builtin_alia

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

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452037. python3kgae added a comment. Add fixit for case like space 1. 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/Attr.td

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3 + +const RWBuffer In; +RWBuffer Out; Why add const instead of using Buffer directly? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452232. python3kgae marked an inline comment as done. python3kgae added a comment. Limit to lower case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: c

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:112-113 +} +if (!Tok.is(tok::identifier)) { + Diag(Tok.getLocation(), diag::err_expected) << tok::identifier; + SkipUntil(tok::r_paren, Sto

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

2022-08-12 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 a project: clang. Herald added a subscriber: cfe-commits. Translate HLSLNumThreadsA

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452305. python3kgae added a comment. Change attribute name to hlsl.numthreads Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131799/new/ https://reviews.llvm.org/D131799 Files: clang/lib/CodeGen/CGHLSLRun

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 2 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:47 +void addDisableOptimizations(llvm::Module &M) { + StringRef Key = "dx.disable_optimizations"; + M.addModuleFlag(llvm::Module::ModFlagBehavior::Ov

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452325. python3kgae marked 2 inline comments as done. python3kgae added a comment. Remove mergeHLSLResourceBindingAttr since should not be able to set ResourceBinding more than once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:2893-2894 + else if (const auto *RB = dyn_cast(Attr)) +NewAttr = +S.mergeHLSLResourceBindingAttr(D, *RB, RB->getSlot(), RB->getSpace()); else if (Attr->shouldInheritEvenIfAlreadyPresent() |

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:684 +def warn_drv_dxc_ignore_output_for_preprocess : Warning< + "output compiler options like -Fo ignored with Preprocess">, + InGroup

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3 + +const RWBuffer In; +RWBuffer Out; beanz wrote: > python3kgae wrote: > > Why add const instead of using Buffer directly? > > > Making this const forces the const

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

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D130131#3720552 , @beanz wrote: > Now that I'm seeing the code in D131370 , I > don't know that this is the right way to do things. > > I think using address spaces like this is odd. Addre

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

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452739. python3kgae added a comment. Fix format in AttrDocs.td and avoid name conflict in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/inc

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

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452761. python3kgae marked 3 inline comments as done. python3kgae added a comment. Add more comment about no name conflict for cbuffer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129883/new/ https://revi

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

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + beanz wrote

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

2022-08-18 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 453747. python3kgae added a comment. Update to work around arc error when land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124753/new/ https://reviews.llvm.org/D124753 Files: clang/include/clang/Drive

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

2022-08-18 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 rG140b0bf89902: [HLSL] Set main as default entry. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

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

2022-08-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 454051. python3kgae marked 2 inline comments as done. python3kgae added a comment. Use llvm::formatv. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131799/new/ https://reviews.llvm.org/D131799 Files: cla

[PATCH] D132421: [NFC] [HLSL] Add HLSLExternalSemaSource as ExternalSemaSource instead of ASTContext::ExternalSource.

2022-08-22 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner. 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. Use CompilerInstance::set

[PATCH] D132421: [NFC] [HLSL] Add HLSLExternalSemaSource as ExternalSemaSource instead of ASTContext::ExternalSource.

2022-08-23 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 454888. python3kgae added a comment. When there's no external source set, add HLSLSema as ExternalSource so ASTWriter can access HLSLSema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://

[PATCH] D132421: [NFC] [HLSL] Add HLSLExternalSemaSource as ExternalSemaSource instead of ASTContext::ExternalSource.

2022-08-23 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 454889. python3kgae added a comment. Add newline at end of file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: clang/lib/Frontend/FrontendAction.cpp c

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

2022-08-24 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455389. python3kgae added a comment. Reuse decls already in PCH when initailize HLSLExternalSemaSource. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/D132421 Files: c

[PATCH] D132672: [Docs] [HLSL] Documenting HLSL Entry Functions

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/docs/HLSL/EntryFunctions.rst:11 + +In HLSL entry functions denote the starting point for shader execution. They +must be known at compile time. For all non-library shaders, the compiler assumes In HLSL,

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

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455672. python3kgae marked 10 inline comments as done. python3kgae added a comment. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Add more comment about no name conflict for cbuffer. Add Serialize and JSON dump for HLSLBufferDecl

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

2022-08-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 5 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/AST/Decl.cpp:5228-5230 + if (DC != LexicalParent) { +Result->setLexicalDeclContext(LexicalParent); + } aaron.ballman wrote: > So semantically these are al

[PATCH] D130207: [HLSL] Move DXIL validation version out of ModuleFlags

2022-08-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455817. python3kgae marked 3 inline comments as done. python3kgae added a comment. Remove empty function and replace auto with correct type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130207/new/ https:/

[PATCH] D130207: [HLSL] Move DXIL validation version out of ModuleFlags

2022-08-26 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa0ecb4a2991d: [HLSL] Move DXIL validation version out of ModuleFlags (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130207/new/ ht

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

2022-08-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 455954. python3kgae added a comment. Fix build error and merge conflict. 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.

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

2022-08-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 456046. python3kgae added a comment. Fix build error 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

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner. Herald added a reviewer: aaron.ballman. 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:

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

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

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner. 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. After generated call for

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

2022-09-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 460659. python3kgae added a comment. Limit BitInt vector to byte-sized and power of 2 BitInt. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133634/new/ https://reviews.llvm.org/D133634 Files: clang/inclu

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

2022-09-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Thanks for all the comments. I've limit BitInt vector to BitInt with byte-sized and power of 2 NumBits. For the ABI, is it OK to let mangleType of VectorType treat BitInt like other element types, call mangleType of BitInt for the element type part? Repository:

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

2022-09-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 460958. python3kgae added a comment. Allow BitInt vector for Microsoftmangle and add codeGen tests for BitInt vector. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133634/new/ https://reviews.llvm.org/D1336

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

2022-09-16 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:3111 Extra.mangleSourceName("__vector"); -Extra.mangleType(QualType(ET, 0), Range, QMM_Escape); +Extra.mangleType(QualType(ET ? static_cast(

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

2022-09-17 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/float3.hlsl:1 +// RUN: %clang --driver-mode=dxc -Tlib_6_7 -fcgl -Fo - %s | FileCheck %s + tahonermann wrote: > Does this need to use driver mode?

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

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

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

2022-09-17 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461039. python3kgae added a comment. Only allow redecl custom type checking builtin for HLSL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133737/new/ https://reviews.llvm.org/D133737 Files: clang/lib/A

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

2022-09-18 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGedbf36c5e9e8: [HLSL] [clang] Add vector version of abs for HLSL (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133737/new/ https:/

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

2022-09-18 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461131. python3kgae added a comment. Rebase 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 clang/lib

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

2022-09-18 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461146. 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] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461151. python3kgae added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic

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

2022-09-19 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 rG649a59712ffb: [clang] Allow vector of BitInt (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

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

2022-09-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461251. python3kgae added a comment. Rebase and update test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133668/new/ https://reviews.llvm.org/D133668 Files: clang/lib/Basic/Targets/DirectX.h clang/li

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461271. python3kgae added a comment. Herald added a reviewer: aaron.ballman. Add test for dtor in lib. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133993/new/ https://reviews.llvm.org/D133993 Files: cl

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

2022-09-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461308. python3kgae added a comment. Limit max bitint width to 64 for HLSL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133668/new/ https://reviews.llvm.org/D133668 Files: clang/lib/Basic/Targets/Direc

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/docs/HLSL/HLSLIRReference.rst:12 +The goal of this document is to provide a reference for all the special purpose +IR metadata and attributes used by the HLSL code generation path. + Once we document a metadata

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/docs/HLSL/HLSLIRReference.rst:20 + +The ``hlsl.uavs`` metadata is a list of all the global variables that represent +to UAV resources. Maybe only external global variables? Repository: rG LLVM Github Monor

[PATCH] D132711: [HLSL] add sqrt library function

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:18 +// abs builtins +__attribute__((clang_builtin_alias(__builtin_abs))) int abs(int In); +__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In); This s

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/docs/HLSL/HLSLIRReference.rst:20 + +The ``hlsl.uavs`` metadata is a list of all the global variables that represent +to UAV resources. beanz wrote: > python3kgae wrote: > > Maybe only external global variables?

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

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461695. python3kgae marked 2 inline comments as done. python3kgae added a comment. Move #include "clang/Sema/MultiplexExternalSemaSource.h" into FrontendAction.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-20 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:208 + // ctors/dtors added for entry. + Triple T(M.getTargetTriple()); + if (T.getEnvironment() != Triple::EnvironmentType::Library) { -

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 4 inline comments as done. python3kgae added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:208 + // ctors/dtors added for entry. + Triple T(M.getTargetTriple()); + if (T.getEnvironment() != Triple::EnvironmentType::Library) { -

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

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG079a5ffb0a3f: [HLSL] Support PCH for cc1 mode (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132421/new/ https://reviews.llvm.org/

[PATCH] D134319: [HLSL] add ceil library function

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:18 // abs builtins -__attribute__((clang_builtin_alias(__builtin_abs))) int abs(int In); -__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In); The ch

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

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461751. python3kgae added a comment. Rebase for the PCH fix. 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/Decl.h clang/inclu

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner, bob80905. Herald added subscribers: Anastasia, arphaman. Herald added a reviewer: aaron.ballman. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald

[PATCH] D134330: [Docs] [HLSL] Add note about PCH support

2022-09-20 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner, bob80905. 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. PCH supported f

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461923. python3kgae added a comment. Update comments and format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134326/new/ https://reviews.llvm.org/D134326 Files: clang/lib/Sema/SemaDeclAttr.cpp clang/

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

2022-09-21 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 rG782ac2182c2b: [HLSL] Support cbuffer/tbuffer for hlsl. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806393 , @kazu wrote: > This patch seems to cause several warnings: > > clang/include/clang/AST/Decl.h:4696:15: error: 'getSourceRange' overrides a > member function but is not marked 'override' [-Werror,-Wsugge

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806393 , @kazu wrote: > This patch seems to cause several warnings: > > clang/include/clang/AST/Decl.h:4696:15: error: 'getSourceRange' overrides a > member function but is not marked 'override' [-Werror,-Wsugge

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D129883#3806552 , @kazu wrote: > In D129883#3806507 , @python3kgae > wrote: > >> In D129883#3806393 , @kazu wrote: >> >>> This patch seems

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-21 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 rG52d7ce0cc1a5: [HLSL] Allow SV_GroupIndex for lib profile. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461987. python3kgae added a comment. Rebase 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/Attr.td clang/include/clang/Basic

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461990. python3kgae added a comment. Add Issue link for FIXME. 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/Attr.td clang/

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462039. python3kgae marked 4 inline comments as done. python3kgae added a comment. Add type check for dispatch thread id. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133983#3805761 , @aaron.ballman wrote: > There are no tests for applying this to a global variable, so those should be > added. The global variable in the Subjects is wrong. It should be Field. Support for semantic on f

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462084. python3kgae added a comment. Remove address space and manual align. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130131/new/ https://reviews.llvm.org/D130131 Files: clang/lib/CodeGen/CGDecl.cpp

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added a comment. In D130131#3720552 , @beanz wrote: > Now that I'm seeing the code in D131370 , I > don't know that this is the right way to do things. > > I thin

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

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462085. python3kgae added a comment. Remove nested HLSLBuffer and namespace inside HLSLBuffer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130131/new/ https://reviews.llvm.org/D130131 Files: clang/lib/

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

2022-09-22 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 rGe3fd0b20731f: [HLSL] Add resource binding attribute for HLSL. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

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

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

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

2022-09-22 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462289. python3kgae marked 2 inline comments as done. python3kgae edited the summary of this revision. python3kgae added a comment. Create issue for FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13013

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-22 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462308. python3kgae marked 8 inline comments as done. python3kgae added a comment. Add more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 Files: clang/

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-22 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462311. python3kgae added a comment. Add newline at end of file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 Files: clang/include/clang/Basic/Attr.td clang

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-22 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133983#3808302 , @aaron.ballman wrote: > In D133983#3807284 , @python3kgae > wrote: > >> In D133983#3805761 , >> @aaron.ballman wrote:

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

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

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-23 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462624. python3kgae marked an inline comment as done. python3kgae added a comment. Rebase for allow SV_GroupIndex in lib profile Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133993/new/ https://reviews.llv

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

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

[PATCH] D134617: [HLSL] Support register binding attribute on global variable

2022-09-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: beanz, pow2clk, bogner. Herald added a reviewer: aaron.ballman. 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:

[PATCH] D134617: [HLSL] Support register binding attribute on global variable

2022-09-25 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 462819. python3kgae added a comment. Remove empty line. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134617/new/ https://reviews.llvm.org/D134617 Files: clang/include/clang/Basic/Attr.td clang/include

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-26 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D133993#3816526 , @efriedma wrote: > Why are we using different mechanisms for global constructors in "libraries" > vs. other code? If we need a mechanism in LLVM already, we might as well use > it all the time? For lib

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

2022-09-28 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133668/new/ https://reviews.llvm.org/D133668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D134871: [llvm] [lit] Move %clang_dxc substitution from clang/test

2022-09-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae accepted this revision. python3kgae added a comment. This revision is now accepted and ready to land. LGTM. Thanks for the fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134871/new/ https://reviews.llvm.org/D134871 ___ cfe-com

[PATCH] D134319: [HLSL] add ceil library function

2022-09-29 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe07c80cf777: [HLSL] add ceil library function (authored by bob80905, committed by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134319/new/ h

[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] D134921: [HLSL] add cos library function

2022-09-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:111 +int16_t3 cos(int16_t3); +__attribute__((clang_builtin_alias(__builtin_elementwise_cos))) +int16_t4 cos(int16_t4); why there're integer overloads? Repository: rG LLVM

[PATCH] D134921: [HLSL] add cos library function

2022-09-29 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/CodeGenHLSL/builtins/cos.hlsl:11 +// NO_HALF: define noundef float @"?test_cos_half@@YA$halff@$halff@@Z"( +// NO_HALF: call noundef float @"?cos@@YAMM@Z"(float noundef %0) +half test_cos_half ( half p0 ) {

[PATCH] D134617: [HLSL] Support register binding attribute on global variable

2022-09-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 464346. python3kgae marked 3 inline comments as done. python3kgae added a comment. Ignore local extern decl when check ExternalGlobalVar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134617/new/ https://rev

[PATCH] D134617: [HLSL] Support register binding attribute on global variable

2022-09-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:51 +} + +struct S { aaron.ballman wrote: > Let's add another test for a local extern, like: > ``` > void func() { > extern RWBuffer U : register(u5); > } > ``` N

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 464354. python3kgae marked an inline comment as done. python3kgae added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 Files: clang/includ

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-30 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:167 + for (const auto &Param : Fn->args()) { +if (Param.hasStructRetAttr()) { + // FIXME: support output. beanz wrote: > I m

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-30 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 464392. python3kgae marked an inline comment as done. python3kgae added a comment. Insert position value for sret output to make a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://rev

<    1   2   3   4   5   >